Wednesday, July 20, 2011

How to setup auto-login in Ubuntu at the console Part 2.

These instructions are for Ubuntu 11.10 Oneiric and onward, and any other version that uses LightDM, as opposed to the previous default of GDM, which I had previously wrote about at here.
First we'll backup the configuration file and then in your editor of choice, probably vi open up /etc/gdm/gdm.conf.
sudo cp /etc/lightdm/lightdm.conf /etc/lightdm/lightdm.conf.bak
sudo vi /etc/lightdm/lightdm.conf
Next find the line that reads:
In the first line change "false" to "true" and in the second line append the username you want to auto-login after the equals sign. Here is how mine looked:
After a reboot you will find that Ubuntu goes straight to the desktop of the user you defined.
There are other settings you can set in here, such as a time login. Most of these are available from the GUI, but feel free to look around and find any other settings you might want to change.


  1. I am using Lubuntu 11 which does not have lightdm.conf. I tried editing /etc/gdm/custom.conf but that has no effect. Can you please name any other file that I ought to try?

  2. You are probably running Lubuntu 11.04, which is the latest release. These instructions are for Ubuntu 11.10, which will not be released until October. You can get the instructions you seek at