What is LightDM?

LightDM is the display manager running in Ubuntu up to version 16.04 LTS. While it has been replaced by GDM in later Ubuntu releases, LightDM is still used by default in the latest release of several Ubuntu flavors.

LightDM starts the X servers, user sessions and greeter (login screen). The default greeter in Ubuntu up to version 16.04 LTS is Unity Greeter.


Later versions of lightdm (15.10 onwards) have replaced the obsolete [SeatDefaults] with [Seat:*]

LightDM configuration is provided by the following files:


System provided configuration is stored in /usr/share/lightdm/lightdm.conf.d/*.conf and is not user editable. System administrators can override this configuration in /etc/lightdm/lightdm.conf.d/*.conf and /etc/lightdm/lightdm.conf. Files are read in the above order and combined together to make the LightDM configuration.

For example, if you want to override the system configured default session (provided in /usr/share/lightdm/lightdm.conf.d/50-ubuntu.conf) you should make a file /etc/lightdm/lightdm.conf.d/50-myconfig.conf with the following:


An example file showing all the possible configuration is provided in /usr/share/doc/lightdm/lightdm.conf.gz.

There is an additional config file:


but this config file will be ignored if accountsservice is running on your system (if you are unsure, check from a shell prompt with the command ps -aef | grep accountsservice).

Disabling Guest Login

By default LightDM allows you to log into a session as a temporary user; disable this with:


Hiding the User List

Unity Greeter (and some other greeters) shows the list of possible user accounts by default. If you want to disable this (you have too many users or security concerns) use the following configuration. You may also want to explicitly enable manual login with this feature.


Allow Manual Login

Unity Greeter (and some other greeters) don't allow you to enter a username to log in with by default. You can enable this with:


Setting an Automatic Login

To set the system to automatically start with a logged in user set the autologin-user. If autologin-user-timeout is set the greeter will be shown for this many seconds before the automatic login occurs. User activity will cancel this timeout.


If you want to set the automatic login to be a guest session then set:


Changing the Default Session

The default session is set by configuration in /usr/share/lightdm/lightdm.conf.d/ that session packages provide. If you need to override this you can set:


Where name is the name of the session .desktop file from /usr/share/xsessions/*.desktop.

Changing the Greeter

The greeter is set by configuration in /usr/share/lightdm/lightdm.conf.d/ that greeter packages provide. If you need to override this you can set:


Where name is the name of the greeter .desktop file from /usr/share/xgreeters/*.desktop.

Adding System Hooks

If you need some special behaviour when X servers and user sessions start/stop you can set commands to be run with the following configuration:

display-stopped-script=command (Not in Ubuntu 12.04 LTS)
greeter-wrapper=command (Not in Ubuntu 12.04 LTS)

display-setup-script is run after the X server starts but before the user session / greeter is run. Set this if you need to configure anything special in the X server. It is run as root. If this command returns an error code the X server is stopped.

display-stopped-script is run after an X server exits. It is run as root.

greeter-setup-script is run before a greeter starts. It is run as root. If this command returns an error code the greeter fails to start (which will cause LightDM to stop).

session-setup-script is run before a user session starts. If this command returns an error the session will not start (user is returned to a greeter).

session-cleanup-script is run after a greeter or user session stops. It is run as root.

session-wrapper is a the command to run for a session. This command is run as the user and needs to exec the command passed in the arguments to complete running the session. Use this if you need to do special setup for a user session. Note the default is 'lightdm-session' so you should chain to this if you need to override this setting.

greeter-wrapper is a the command to run a greeter. It is the equivalent of session-wrapper for greeters.

Changing the Wallpaper

LightDM does not configure the look of greeters; to do this configure the appropriate greeter.

Unity Greeter by default shows the currently selected users background. To set the default background and stop the switching edit /usr/share/glib-2.0/schemas/10_unity_greeter_background.gschema.override


And run sudo glib-compile-schemas /usr/share/glib-2.0/schemas/ to apply these settings.

For LightDM GTK+ greeter edit /etc/lightdm/lightdm-gtk-greeter.conf:


Help, I can't see my Desktop!

Many things can go wrong in a graphics stack. If you can't see any graphics or see corrupt graphics the following might help:

  • You can get to a text terminal using alt-ctrl-F1.
  • Check the LightDM logs in /var/log/lightdm.
  • Stop LightDM with sudo stop lightdm.

  • You can try LightDM again with sudo start lightdm.

  • If you have another display manager you want to try (e.g. gdm) start that: sudo start gdm.

  • You can set the default display manager by running sudo dpkg-reconfigure lightdm.

  • Check your system is up to date, especially video drivers.
  • File a bug. If you're not sure where the cause is (lightdm / unity-greeter / unity / X / kernel) file against lightdm and the bug will be triaged and reassigned.

Reporting Problems

To file a bug run the following from a terminal:

ubuntu-bug lightdm

All appropriate information/logs are attached to the bug report.

LightDM (last edited 2018-05-06 20:31:49 by gunnarhj)