sddm-0.21.0

Introduction to sddm

The sddm package contains a lightweight display manager based upon Qt and QML.

[Note]

Note

Development versions of BLFS may not build or run some packages properly if LFS or dependencies have been updated since the most recent stable versions of the books.

Package Information

SDDM Dependencies

Required

CMake-3.31.2, extra-cmake-modules-6.8.0, and Qt-6.8.1

Recommended

Installation of SDDM

First, create a dedicated user and group to take control of the sddm daemon after it is started. Issue the following commands as the root user:

groupadd -g 64 sddm &&
useradd  -c "sddm Daemon" \
         -d /var/lib/sddm \
         -u 64 -g sddm    \
         -s /bin/false sddm

Install sddm by running the following commands:

mkdir build &&
cd    build &&

cmake -D CMAKE_INSTALL_PREFIX=/usr \
      -D CMAKE_BUILD_TYPE=Release  \
      -D ENABLE_JOURNALD=OFF       \
      -D NO_SYSTEMD=ON             \
      -D RUNTIME_DIR=/run/sddm     \
      -D USE_ELOGIND=ON            \
      -D BUILD_MAN_PAGES=ON        \
      -D BUILD_WITH_QT6=ON         \
      -D DATA_INSTALL_DIR=/usr/share/sddm \
      -D DBUS_CONFIG_FILENAME=sddm_org.freedesktop.DisplayManager.conf \
      .. &&
make

This package does not come with a test suite.

Now, as the root user:

make install &&
install -v -dm755 -o sddm -g sddm /var/lib/sddm
/usr/bin/sddm --example-config > /etc/sddm.conf

Command Explanations

-D CMAKE_BUILD_TYPE=Release: This switch is used to apply additional compiler optimizations.

-D ENABLE_JOURNALD=OFF and -D NO_SYSTEMD=ON: These switches are used because this version of BLFS does not support systemd.

-D DBUS_CONFIG_FILENAME=sddm_org.freedesktop.DisplayManager.conf: This switch prevents the file /etc/dbus-1/system.d/org.freedesktop.DisplayManager.conf from being overwritten, as it may be used by other DM's.

-D BUILD_MAN_PAGES=ON: This switch is used to build and install man pages.

Configuring SDDM

Config Files

/etc/sddm.config

Normally, you want to edit this file. For example, if Xorg is installed in /opt, use your preferred editor as the root user to replace the default XauthPath value by /opt/xorg/bin/xauth. Or, as the root user, issue:

sed -i.orig '/ServerPath/ s|usr|opt/xorg|' /etc/sddm.conf

This command will do the substitution and create a copy of the original file with name /etc/sddm.conf.orig.

From now on, we will describe how to modify configurations using sed. Of course, you may instead use your preferred editor as the root user.

For security reasons, you normally want the default ServerArguments=-nolisten tcp, unless a remote machine needs access to the local X server. In that case, as the root user, issue:

sed -i 's/-nolisten tcp//' /etc/sddm.conf

Desktop (Notebook) users, normally want the Num Lock key on (off). For that, as root, issue:

sed -i '/Numlock/s/none/on/' /etc/sddm.conf

for Desktop users. For Notebook users, replace /on/ by /off/ in the command above.

By default, a virtual keyboard is presented for the user. If this is not desired, run as root:

sed -i 's/qtvirtualkeyboard//' /etc/sddm.conf

Boot Script

Install the /etc/rc.d/init.d/xdm init script from the blfs-bootscripts-20241209 package, as the root user:

make install-sddm

Linux PAM Configuration

[Note]

Note

The install procedure above installed a set of PAM configuration files. These procedures overwrite them and use versions compatible with a BLFS environment.

If you have built sddm with Linux PAM support, create the necessary configuration files by running the following commands as the root user:

cat > /etc/pam.d/sddm << "EOF"
# Begin /etc/pam.d/sddm

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/sddm
EOF

cat > /etc/pam.d/sddm-autologin << "EOF"
# Begin /etc/pam.d/sddm-autologin

auth     requisite      pam_nologin.so
auth     required       pam_env.so

auth     required       pam_succeed_if.so uid >= 1000 quiet
auth     required       pam_permit.so

account  include        system-account

password required       pam_deny.so

session  required       pam_limits.so
session  include        system-session

# End /etc/pam.d/sddm-autologin
EOF

cat > /etc/pam.d/sddm-greeter << "EOF"
# Begin /etc/pam.d/sddm-greeter

auth     required       pam_env.so
auth     required       pam_permit.so

account  required       pam_permit.so
password required       pam_deny.so
session  required       pam_unix.so
-session optional       pam_systemd.so

# End /etc/pam.d/sddm-greeter
EOF

Starting sddm

If the sddm bootscript has been installed, start sddm by running, as the root user:

/etc/rc.d/init.d/xdm start

By convention, X should be executed at runlevel 5, consequently, the same is true for sddm. However, the default runlevel is 3. Changing to runlevel 5, from a console terminal, as root user, starts the sddm bootscript, bringing up the greeter screen:

init 5

In order to permanently set the default to 5, starting the sddm greeter screen automatically, modify /etc/inittab as the root user:

cp -v /etc/inittab{,-orig} &&
sed -i '/initdefault/ s/3/5/' /etc/inittab

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 or /usr/share/wayland-sessions. Most of the Window Managers and Desktop Environments automatically provide those files, but if necessary, you may include a custom one.

Themes

Three themes are installed at /usr/share/sddm/themes: elarun, maldives, and maya. There is also a default theme, which is not present in that directory. You can install other themes in that directory. In order to change the theme, you need to edit /etc/sddm.conf, to change the default (empty) theme, replacing Current= with Current=<new theme>, e.g. Current=maldives.

In order to see the theme without leaving the session, issue:

sddm-greeter --test-mode --theme <theme path>

Contents

Installed Programs: sddm and sddm-greeter
Installed Libraries: None
Installed Directories: /usr/share/sddm and /var/lib/sddm

Short Descriptions

sddm

is a display and login manager based on Qt libraries.

sddm-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.