I am using systemd-nspawn to boot a linux container and load its lxsession in a VNC-style nested X server. (Xephyr)
I have created a script to do this.
One of the main problems with the script is the need to login to the container's console before the GUI is initiated via /etc/profile.
Here's my question: I'm looking for a way to autostart graphical applications, without first requiring the user to manually login. I've tried:
- Getting the console to autologin using lightdm. This does not work since lightdm always fails to start.
- Finding an autostart method that can run lxsession in the foreground. I only know of /etc/rc.local. It kind of works, but the environmental variables are all messed up, and there's a dialog box that says "No session for PID XXX"
- Having the script type in the username and password. Bad idea since many of the containers use a password other than the default "raspberry".