The Display Manager

The Display Manager is a bit of code that provides the GUI login screen for your Linux desktop. After login to a GUI desktop, the display manager turns control over to the desktop. When you logout of the desktop, the display manager is given control again to display the login screen and wait for another login.

There are several display managers, some are provided with their respective desktops. Note that some display managers are not directly associated with a specific desktop. Any of the display managers can be used for your login screen  regardless of which desktop you are using. And not all desktops have their own display managers. Such is the flexibility of Linux and well-written, modular code.

The typical desktops and display managers are shown in the table below. Note that the Xfce desktop does not have a default display manager of its own so generally uses lightdm or xdm.

Display Managers
Desktop Display Manager Comments
KDE kdm  KDE Display Manager
GNOME gdm  GNOME Display Manager
LXDE lxdm  LXDE Display Manager
Xfce lightdm Lightweight Display Manager
Xfce xdm Default X Window System Display Manager

The display manager for the first desktop installed is the default one. For Fedora, this is usually gdm which is the display manager for GNOME. If GNOME is not installed then the display manager for that desktop is the default. If the desktop selected during installation does not have a default display manager, then gdm is installed and used.

Regardless of which display manager is configured as the default at installation time, later installation of additional desktops does not change the display manager used. If you want to change the display manager, you must do it yourself from the command line.

In the past, prior to Fedora 18, changing the display manager was done by changing the line PREFERRED= in the /etc/sysconfig/desktop file, and sourced by the /etc/X11/prefdm file. If the file did not exist, you could create it, adding the PREFERRED= line (in caps) with the name and path of the preferred desktop manager. You could also set it directly in the prefdm file, but that change could be wiped out by an upgrade or reinstallation.

Now that systemd has become the startup system, you can set the preferred display manager in /etc/systemd/system which is where the basic system startup configuration is located. There is a symbolic link (symlink) named display-manager.service that points to one of the display manager service units in /usr/lib/systemd/system. Each installed display manager has a service unit in the /usr/lib/systemd/system directory.

To change the active display manager, remove the existing display-manager.service link and replace it with the one you want to use. For example, to configure to use the kdm display manager, use the following commands.

cd /etc/systemd/system
rm display-manager.service
ln -s /usr/lib/systemd/system/kdm.service display-manager.service

1 comment for “The Display Manager

Comments are closed.