I want user
foo to auto-login using LightDM (which has been used by Ubuntu since version 11.10). How would I do that?
An alternative to Alin's answer is to create a file
/etc/lightdm/lightdm.conf and add the following content:
[SeatDefaults] autologin-user=<YOUR USER> autologin-user-timeout=0 user-session=ubuntu # Uncomment the following, if running Unity #greeter-session=unity-greeter
Next time you start, auto-login should work like expected.
I can confirm that this works for 16.04.
Using your favourite editor, amend
autologin-user=xxxx to the file, for example:
[Seat:*] greeter-session=lightdm-gtk-greeter autologin-user=wmurphy
Remember to also set the Not asked to login option under Users and Groups.
I just discovered that, I need to have ubuntu-desktop to be install before lightdm could function. This solved my issue when trying to get lightdm to actually login in without going in loop.
The reason for the system to go in loop may be because lightdm needs the ubuntu desktop before it may work.
sudo apt-get install ubuntu-desktop