How to setup autologin on Xenial with lighdm from a terminal (i.e. with an editor)?

Here is what I currently have done.

First I created the conf.d-dir which did not exist on my installation:

sudo mkdir /etc/lightdm/lightdm.conf.d/

then I added to /etc/lightdm/lightdm.conf.d/12-autologin


(using [Seat:*] I took from the Wiki).

However, it does not work.

  • Maybe you can simply go to the User accounts menu of the system configuration and set the autologin option for your account. – Helio May 30 '16 at 8:55
  • I don't have gnome-setting installed. Running Kubuntu and using lightdm. Don't ask why, but it is was I need. – Patrick B. May 30 '16 at 9:19

Renaming file /etc/lightdm/lightdm.conf.d/12-autologin to /etc/lightdm/lightdm.conf.d/12-autologin.conf allow autologin.


I know this is over a year old but no correct answer has been acknowledge so I'll add what I did and got it to work based on documentation I've used this configuration and restarted lightdm

$ vi /etc/lightdm/lightdm.conf.d/12-autologin.conf

[Seat:*] autologin-user=<username> autologin-user-timeout=0

$ sudo service lightdm restart

  • 1
    It is working in a system upgraded from 16.04 to 18.04. Thanks. – mdalacu Apr 27 '18 at 5:09

I assume you have entered your own user for the autologin-user=user parameter?

If so, see in /var/log/lightdm/ if you can find any clues.

  • It's seems to be now /etc/xdg/lightdm/lightdm.conf.d/ where lightdm is looking. Not /etc/lightdm/lightdm.conf.d/. But still /etc/lightdm/lightdm.conf for the normal .conf-file. Is this a bug? – Patrick B. May 30 '16 at 8:53
  • 1
    Shouldn't this be a comment? – UniversallyUniqueID Jun 1 '16 at 9:10
  • yes, I misclicked – vegard torvund Jun 6 '16 at 12:36

Could it be you didn't use *.conf as the extension on your file?

As per your reference:


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.