26. Display Managers
Display Managers are graphical programs used for starting the graphical display (currently, the X server) and providing a login capability for a Window Manager or Desktop Environment.
There are many Display Managers available. Some of the more well known include: GDM, KDM (deprecated), LightDM, LXDM, Slim, and SDDM.
Among the Desktop Environments available for Linux you find: Enlightenment, GNOME, KDE, LXDE, LXQt, and XFce.
Choosing a Display Manager or Desktop Environment is highly subjective. The choice depends on the look and feel of the packages, the resources (memory and disk space) required, and the utilities included.
In this chapter, the installation instructions of some Display Managers are presented. Later in the book, you will find other ones, which are provided as part of some Desktop Environments.
26.1 GDM-43.0
Introduction to GDM
GDM is a system service that is responsible for providing graphical logins and managing local and remote displays.
This package is known to build and work properly using an LFS 11.3 platform.
Package Information
-
Download (HTTP): https://download.gnome.org/sources/gdm/43/gdm-43.0.tar.xz
-
Download (FTP): ftp://ftp.acc.umu.se/pub/gnome/sources/gdm/43/gdm-43.0.tar.xz
-
Download MD5 sum: d9ca2abdf2359d0420dc71a1bd1d7530
-
Download size: 812 KB
-
Estimated disk space required: 33 MB
-
Estimated build time: 0.3 SBU
GDM Dependencies
Required
AccountsService-22.08.8, GTK+-3.24.36, ISO Codes-4.12.0, itstool-2.0.7, libcanberra-0.30, libdaemon-0.14, and Linux-PAM-1.5.2
Optional
Runtime Dependencies
gnome-session-43.0, gnome-shell-43.3, and Systemd-252
User Notes: https://wiki.linuxfromscratch.org/blfs/wiki/gdm
Installation of GDM
It is recommended to have a dedicated user and group to take control of the gdm daemon after it is started. Issue the following commands as the root user:
groupadd -g 21 gdm &&
useradd -c "GDM Daemon Owner" -d /var/lib/gdm -u 21 \
-g gdm -s /bin/false gdm &&
passwd -ql gdm
Install GDM by running the following commands:
mkdir build &&
cd build &&
meson --prefix=/usr \
--buildtype=release \
-Dgdm-xsession=true \
-Drun-dir=/run/gdm ..
ninja
This package does not come with a usable test suite.
Now, as the root user:
ninja install
Command Explanations
--buildtype=release: Specify a buildtype suitable for stable releases of the package, as the default may produce unoptimized binaries.
-Dinitial-vt=7: Use this switch to make GDM start on VT7 instead of the first free VT.
-Ddefault-pam-config=lfs: Use this switch if you did not create the /etc/lfs-release file or distribution auto detection will fail and you will be unable to use GDM.
-Dgdm-xsession=true: This enables the installation of the GDM Xsession file.
Configuring GDM
Config Files
/etc/gdm/custom.conf
Configuration Information
The GDM daemon is configured using the /etc/gdm/custom.conf file. Default values are stored in GSettings in the gdm.schemas file. It is recommended that end-users modify the /etc/gdm/custom.conf file because the schemas file may be overwritten when the user updates their system to have a newer version of GDM.
Systemd Unit
To start the gdm daemon at boot, enable the previously installed systemd unit by running the following command as the root user:
systemctl enable gdm
Contents
Installed Programs: gdm, gdmflexiserver, and gdm-screenshot
Installed Libraries: libgdm.so and pam_gdm.so (PAM Module)
Installed Directories: /etc/gdm, /usr/include/gdm, /usr/share/gdm, and /usr/share/help/*/gdm
Short Descriptions
gdm is a login prompt for GNOME
gdm-screenshot is a screenshot tool for GDM.
26.2 lightdm-1.32.0
Introduction to Lightdm
The lightdm package contains a lightweight display manager based upon GTK.
This package is known to build and work properly using an LFS 11.3 platform.
Lightdm Package Information
-
Download (HTTP): https://github.com/CanonicalLtd/lightdm/releases/download/1.32.0/lightdm-1.32.0.tar.xz
-
Download MD5 sum: e62a5da6c35f612e4d9575eda5c8d467
-
Download size: 508 KB
-
Estimated disk space required: 20 MB
-
Estimated build time: 0.2 SBU
Additional download
Note
The greeter is a program to present a graphical login screen. There are several alternative greeters, but the gtk+ package is the reference implementation. For a list of other greeters, see https://en.wikipedia.org/wiki/LightDM.
-
Download (HTTP): https://github.com/Xubuntu/lightdm-gtk-greeter/releases/download/lightdm-gtk-greeter-2.0.8/lightdm-gtk-greeter-2.0.8.tar.gz
-
Download MD5 sum: 373c73c67367df511eb544e09a2da281
-
Download size: 569.7 KB
-
Estimated disk space required: 5.5 MB
-
Estimated build time: less than 0.1 SBU
Lightdm Dependencies
Required
Exo-4.18.0 (for the greeter), libgcrypt-1.10.1, itstool-2.0.7, Linux-PAM-1.5.2, and Xorg-Server-21.1.7 (Runtime)
Recommended
gobject-introspection-1.74.0, libxklavier-5.4, and Vala-0.56.4
Optional
AccountsService-22.08.8 (run time), at-spi2-core-2.46.0, GTK-Doc-1.33.2, Qt-5.15.8, libido, and libindicator
User Notes: https://wiki.linuxfromscratch.org/blfs/wiki/lightdm
Installation of Lightdm
First, create a dedicated user and group to take control of the lightdm daemon after it is started. Issue the following commands as the root user:
groupadd -g 65 lightdm &&
useradd -c "Lightdm Daemon" \
-d /var/lib/lightdm \
-u 65 -g lightdm \
-s /bin/false lightdm
Install lightdm by running the following commands:
./configure --prefix=/usr \
--libexecdir=/usr/lib/lightdm \
--localstatedir=/var \
--sbindir=/usr/bin \
--sysconfdir=/etc \
--disable-static \
--disable-tests \
--with-greeter-user=lightdm \
--with-greeter-session=lightdm-gtk-greeter \
--docdir=/usr/share/doc/lightdm-1.32.0 &&
make
This package does not come with a test suite.
Now, as the root user:
make install &&
cp tests/src/lightdm-session /usr/bin &&
sed -i '1 s/sh/bash --login/' /usr/bin/lightdm-session &&
rm -rf /etc/init &&
install -v -dm755 -o lightdm -g lightdm /var/lib/lightdm &&
install -v -dm755 -o lightdm -g lightdm /var/lib/lightdm-data &&
install -v -dm755 -o lightdm -g lightdm /var/cache/lightdm &&
install -v -dm770 -o lightdm -g lightdm /var/log/lightdm
Now build the greeter:
tar -xf ../lightdm-gtk-greeter-2.0.8.tar.gz &&
cd lightdm-gtk-greeter-2.0.8 &&
./configure --prefix=/usr \
--libexecdir=/usr/lib/lightdm \
--sbindir=/usr/bin \
--sysconfdir=/etc \
--with-libxklavier \
--enable-kill-on-sigterm \
--disable-libido \
--disable-libindicator \
--disable-static \
--disable-maintainer-mode \
--docdir=/usr/share/doc/lightdm-gtk-greeter-2.0.8 &&
make
Now, as the root user:
make install
Note
If you installed Xorg in /opt, you will need to create a symbolic link so lightdm can find the Xorg server. As the root user:
ln -sf /opt/xorg/bin/Xorg /usr/bin/X
Command Explanations
sed … /usr/bin/lightdm-session: This command ensures that the initial login via the greeter sources /etc/profile and ~/.bash_profile. Without this, commands that depend on different environment variables may not work as expected.
Configuring lightdm
###
Config Files
/etc/lightdm/{lightdm,users,keys}.conf
###
Systemd Unit
Install the lightdm.service unit included in the blfs-systemd-units-20220720 package:
make install-lightdm
Available Sessions
The greeter offers a list of available sessions, depending on the Window Managers and Desktop Environments installed. The list includes sessions which have a corresponding .desktop file installed under /usr/share/xsessions. Most of the Window Managers and Desktop Environments automatically provide those files, but if necessary, you may include a custom one.
Contents
Installed Programs: dm-tool, lightdm, and lightdm-gtk-greeter
Installed Libraries: liblightdm-gobject-1.so
Installed Directories: /etc/lightdm, /etc/apparmor.d, /usr/lib/lightdm, /usr/include/lightdm-gobject-1, /usr/share/help/C/lightdm /usr/share/gtk-doc/html/lightdm-gobject-1, /usr/share/doc/lightdm-gtk-greeter-2.0.8, /var/lib/lightdm, /var/lib/lightdm-data, /var/cache/lightdm, and /var/log/lightdm
Short Descriptions
lightdm is a display and login manager
lightdm-gtk-greeter is an auxiliary process that displays the greeter, a graphical user interface that performs user authentication and initiates the selected window manager or display environment.
26.3 lxdm-0.5.3
Introduction to LXDM
The LXDM is a lightweight Display Manager for the LXDE desktop. It can also be used as an alternative to other Display Managers such as GNOME’s GDM or LightDM.
This package is known to build and work properly using an LFS 11.3 platform.
Note
The lxdm display manager does not support wayland based window managers such as plasma-wayland or gnome-wayland.
Package Information
-
Download (HTTP): https://downloads.sourceforge.net/lxdm/lxdm-0.5.3.tar.xz
-
Download MD5 sum: 061caae432634e6db38bbdc84bc6ffa0
-
Download size: 236 KB
-
Estimated disk space required: 5.6 MB
-
Estimated build time: less than 0.1 SBU
LXDM Dependencies
Required
GTK+-2.24.33, ISO Codes-4.12.0, and librsvg-2.54.5 (runtime, for default theme background)
Recommended
LXSession-0.5.5 (for lxpolkit) or polkit-gnome-0.105
Optional
User Notes: https://wiki.linuxfromscratch.org/blfs/wiki/lxdm
Installation of LXDM
First, some fixes.
cat > pam/lxdm << "EOF"
# Begin /etc/pam.d/lxdm
auth requisite pam_nologin.so
auth required pam_env.so
auth required pam_succeed_if.so uid >= 1000 quiet
auth include system-auth
account include system-account
password include system-password
session required pam_limits.so
session include system-session
# End /etc/pam.d/lxdm
EOF
sed -i 's:sysconfig/i18n:profile.d/i18n.sh:g' data/lxdm.in &&
sed -i 's:/etc/xprofile:/etc/profile:g' data/Xsession &&
sed -e 's/^bg/#&/' \
-e '/reset=1/ s/# //' \
-e 's/logou$/logout/' \
-e "/arg=/a arg=$XORG_PREFIX/bin/X" \
-i data/lxdm.conf.in
Install LXDM by running the following commands:
./configure --prefix=/usr \
--sysconfdir=/etc \
--with-pam \
--with-systemdsystemunitdir=/lib/systemd/system &&
make
This package does not come with a test suite.
Now, as the root user:
make install
Command Explanations
cat > pam/lxdm « “EOF” …: Replace default /etc/pam.d/lxdm by another one appropriate for BLFS.
sed -i … data/lxdm.conf.in: Modifications in the default configuration: (1) fix the background to the default one; (2) restart X when session is close; (3) typo; and (4) include XORG_PREFIX, which may be different from /usr.
sed -i … data/Xsession: Source /etc/profile, instead of other file, according to BLFS standard.
sed -i … data/lxdm.in: Fix greeter’s locale for BLFS specification.
--with-pam: This parameter enables use of pam authentication.
Configuring LXDM
Config Files
/etc/lxdm/lxdm.conf
Systemd Unit
To start LXDM at boot execute the following command as the root user:
systemctl enable lxdm
Configuration Information
The LXDM daemon configuration file (/etc/lxdm/lxdm.conf) specifies options that include numlock on/off, background image (bg), session, etc. You can set a default session by uncommenting the line: session=/usr/bin/startlxde and replacing startlxde with your session of choice. For GNOME session=/usr/bin/gnome-session. For OPENBOX session=/usr/bin/openbox-session and for XFCE session=/usr/bin/startxfce4.
It is also possible to set the preferred session on a per-user basis by editing the ~/.dmrc file for each user and adding:
[Desktop]
Session=xfce
You can replace the default dummy face in the greeting screen by another image representing your user. For that, copy or symlink the desired image to your home directory with the name .face.
Contents
Installed Programs: lxdm, lxdm-binary and lxdm-config
Installed Libraries: None
Installed Directories: /etc/lxdm and /usr/share/lxdm
Short Descriptions
lxdm is a script to execute lxdm-binary
lxdm-binary is the actual Display Manager; needs to be executed with option -d to daemonize
lxdm-config is a graphical customizing program.