Tuesday, September 8, 2015

Lubuntu Change Autologin User

From http://www.itworld.com/article/2725495/it-management/how-to-put-lubuntu-into-automatic-login-mode.html

Where you make the changes to configure a Lubuntu system for automatic login depends on the release you are using. In releases prior to 12.04, the change must be made in the file /etc/lxdm/default.conf. You can open a terminal (lxterminal) and edit it with vi (e.g., gksudo vi /etc/lxdm/default.conf) or use a desktop editor like leafpad (e.g., gksudo leafpad /etc/lxdm/default.conf).
Uncomment the following line and change "dgod" to the intended login name. This ensures that the automatic login recognizes your account and knows where your home directory and files belong, etc.
# autologin=dgod
After the change, the autologin line in your file might look like this:
In Ubuntu releases starting with 12.04, however, you need to edit a different file. With the new display manager, lightdm, a different file is used to manage this setting. So, you edit the /etc/lightdm/lightdm.conf file instead.
lightdm is an X display manager that is fast, extensible and provides the ability to use multiple desktops -- like lubuntu and OpenBox. The lightdm.conf file, after your changes, will look something like this. Note the lack of # signs on the autologin lines:


You can switch back to the using a username and password to log in in by reversing the changes described above. Put the comment markers back in front of the autologin lines and reboot.
In both cases, the username must match the one you set up when you installed the system or you will need to edit your /etc/passwd and /etc/shadow files and move the home directory to match the new name.
Obviously, autologin can only be used for one account. The system needs to know which account to activate when it boots.