You can do this without editing configuration files: go to System Settings > User accounts, click "Unlock" and enter your password, then click the button next to "Automatic login":
I can confirm that this works for 16.04.
Using your favourite editor, amend /usr/share/lightdm/lightdm.conf.d/60-lightdm-gtk-greeter.conf.
Add autologin-user=xxxx to the file, for example:
An alternative to Alin's answer is to create a file
/etc/lightdm/lightdm.conf
and add the following content:Next time you start, auto-login should work like expected.
You can do this without editing configuration files: go to System Settings > User accounts, click "Unlock" and enter your password, then click the button next to "Automatic login":
'
From Ubuntu 14.04 and above create the file:
and add:
You can easily do this with
lightdm-set-defaults
if you'd rather not editlightdm.conf
manually:It will not set the autologin timeout, but the default for that is 0 in the code anyway, so you don't need to set it.
add lines:
example:
Open settings, select 'user accounts'. Click the unlock button, then change the Automatic Login switch to "On"
In Ubuntu 18.04 (Xubuntu Minimal Desktop), create
/etc/lightdm/lightdm.conf
and add the following:I couldn't get it working through the
lightdm.conf.d
folder.Search for "User Accounts" application. Select the account you want to autologin Toggle the Automatic Login switch to On
That should do the work.
I can confirm that this works for 16.04.
Using your favourite editor, amend
/usr/share/lightdm/lightdm.conf.d/60-lightdm-gtk-greeter.conf
.Add
autologin-user=xxxx
to the file, for example:Remember to also set the Not asked to login option under Users and Groups.
Ubuntu 20.04 How To: automatic login of particular user (e.g. server login)
autologin for Ubuntu 20.04 and Ubuntu 20.04 LTS with XFCE4 this works:
(all as root using sudo)
0) set display manager to lightdm
check settings with
1) enable login without password
under Users and Groups
set the Not asked login option for the concerned user.
2) create and edit a new file /etc/lightdm/lightdm.conf.d/01_username.conf
and set
replace "username" according; do NOT set autologin-user-timeout other than 0, does not work!
This solution worked fine with a nearly vanilla installation without gnome and without unity.