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:
#default-user=bob
#default-user-timeout=5
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:
default-user=david
default-user-timeout=0
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.