Desktop auto login

This is a wiki page. Be bold and improve it!

If you have any questions about the content on this page, don't hesitate to open a new ticket and we'll do our best to assist you.

Know your system

Most desktop managers come with a convenience setting to allow auto-login to be enabled on the computer. Thus, when powering on the computer, one does not need to login. A desktop session is automatically started.

The actual solution to achieve this depends on the display manager used on your system.

Most/all Linux distribution use the X Window System (X11). A display manager is a program that uses X11 to launch a desktop session with the user's chosen desktop environment (like KDE, Gnome, XFCE, etc.).

So, it is the display manager's job to help you log into a desktop session and it is responsible for the auto-login feature. Thus, if you want to enable auto-login, you must first find out which display manager you are currently using.

If you have not made any changes to your system, your display manager is probably the distribution's default one. In any case, you can find out which display manager with the following command:

$ cat /etc/X11/default-display-manager

In the above example, the system is using kdm as display manager.

display managers


KDE-based distribution (Kubuntu, Mandriva...) use kdm as display manager.

Go to system settings > advanced > System: login manager (enter sudo password) > convenience tab > check "Enable auto-login and select user.


Gnome based distributions (Ubuntu, Debian...) use gdm as display manager.


No graphical user interface is known to set the auto-login feature.

Check what configuration file lxdm actually uses.

$ cd /etc/lxdm/
$ ls -l
default.conf -> /etc/alternatives/lxdm.conf

Thus we know we must edit /etc/alternatives/lxdm.conf.

However, there may be several alternative configuration files. On a Debian (and derivative) system, check the one currently used:

$ sudo update-alternatives --config  lxdm.conf
There are 2 choices for the alternative lxdm.conf (providing /etc/lxdm/default.conf).
  Selection    Path                             Priority   Status
  0            /etc/xdg/lubuntu/lxdm/lxdm.conf   60        auto mode
* 1            /etc/lxdm/lxdm.conf               50        manual mode
  2            /etc/xdg/lubuntu/lxdm/lxdm.conf   60        manual mode
Press enter to keep the current choice[*], or type selection number:

You can keep the current choice, but at least you know which configuration file to edit.

/etc/alternatives/lxdm.conf that we found earlier is actually a symlink to /etc/lxdm/lxdm.conf, so the information here is congruent.

Use vi or your favourite text editor. Make sure to edit as root:

$ sudo vi /etc/alternatives/lxdm.conf

Add a section [base] (if none already exist), and set the name of the user to auto-login:

Save and restart the computer.