sddm-0.12.0

Introduction to SDDM

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

This package is known to build and work properly using an LFS-7.8 platform.

Package Information

SDDM Dependencies

Required

CMake-3.3.1 and Qt-5.5.0

Recommended

Optional

Docutils (for the man pages)

Runtime Dependencies

ConsoleKit2-1.0.0

User Notes: http://wiki.linuxfromscratch.org/blfs/wiki/sddm

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

First, fix the application to start upowerd, if necessary, and after login, start the session with ck-launch-session:

sed -e '/UPOWER_SERVICE)/ s:^://:' \
    -i src/daemon/PowerManager.cpp &&

sed -e 's/eval exec/& ck-launch-session /' \
    -i data/scripts/Xsession

Install SDDM by running the following commands:

mkdir build &&
cd    build &&

cmake -DCMAKE_INSTALL_PREFIX=/usr \
      -DCMAKE_BUILD_TYPE=Release  \
      -DENABLE_JOURNALD=OFF       \
      -DDBUS_CONFIG_FILENAME=sddm_org.freedesktop.DisplayManager.conf \
      -Wno-dev .. &&
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

Command Explanations

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

-DENABLE_JOURNALD=OFF: This switch is used because BLFS does not support systemd.

-DDBUS_CONFIG_FILENAME=sddm_org.freedesktop.DisplayManager.conf: This switch is used for safety reason: other DMs already use org.freedesktop.DisplayManager.conf. Verify in your system taht this is not the case, if you wish to remove it.

-DBUILD_MAN_PAGES=ON: This switch may be used if you want the man pages to be installed. Notice that you need Docutils to build them.

Configuring SDDM

Config File

/etc/sddm.conf

This file is not installed with the build instructions, and default values are used by sddm. In order to generate the example sddm.example.conf, issue:

sddm --example-config > sddm.example.conf
[Note]

Note

This command generates an example config file, which depends on several conditions of the system where it is generated. A few options are defaults from upstream. If there is a previously installed /etc/sddm.conf, it will generate a replica. When it is generated during an X session, some session configurations are replicated, e.g. if the cursor from the Adwaita theme is already configured, you will obtain CursorTheme=Adwaita in the example file generated.

If there is no /etc/sddm.conf file yet, as the root user, copy the example file to /etc/sddm.conf:

cp -v sddm.example.conf /etc/sddm.conf

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 -e '/ServerPath/ s|usr|opt/xorg|' \
    -i.orig /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 -e 's/-nolisten tcp//'\
    -i /etc/sddm.conf

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

sed -e 's/\"none\"/\"on\"/' \
    -i /etc/sddm.conf

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

Boot Script

Install the /etc/rc.d/init.d/sddm init script from the blfs-bootscripts-20150924 package.

make install-sddm

Linux PAM Configuration

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

By convention, X should be executed at runlevel 5, consequently, the same is true for sddm. However, LFS 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. Most of the Window Managers and Desktop Environments automatically provide those files, but if necessary, you may include a custom one.

Themes

Four themes are installed at /usr/share/sddm/themes: circles, elarun, maldives, and maui. The default theme is “maui”. You can install other themes in that directory. In order to change the theme, you need to edit /etc/sddm.conf, using your preferred text editor, to change the default “maui” theme, replacing “Current=maui” by “Current=<insert new theme name here>”, e.g. “Current=maldives”.

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

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

Known Issues

This application works well, but there are issues. You find the mainstream known issues at Issues. The BLFS development team have found some issues.

[Note]

Note

In the next couple of paragraphs, due to a problem with sddm-greeter, we mention how to define the keyboard used there. Notice that this is also the keyboard that will be used in the X session, unless there is a configuration in the Desktop Environment or in the Window Manager overriding it, afterwards.

Keyboard selection: the greeter shows a double question mark or the wrong keyboard. When you start to type the password or user name (depending on the theme, only password), the right keyboard selection magically appears. Optionally, a workaround is to include the keyboard list in /usr/share/sddm/scripts/Xsetup script, as the root user:

echo 'setxkbmap "<your keyboard comma separated list>"' >> \
     /usr/share/sddm/scripts/Xsetup

E.g. echo 'setxkbmap "fr,gb,br,us"' >> /usr/share/sddm/scripts/Xsetup. A very accurate definition of the keyboard(s) is possible, for example: echo 'setxkbmap -model pc105 -layout br,us -variant abnt2,dvorak -keycodes evdev' >> /usr/share/sddm/scripts/Xsetup. See man setxkbmap.

Dircolors: the /etc/dircolors file is not honoured. Particularly, the compressed files are not displayed in red colour. If this happens, a workaround is to issue, as the root user:

echo "source /etc/profile.d/dircolors.sh" >> /etc/bashrc

It has been reported that problems may happen with this package, if Xorg is installed with a prefix other than /usr. So far, BLFS development team has not hit any problem, in this case.

Contents

Installed Programs: sddm and sddm-greeter
Installed Libraries: None
Installed Directories: $QT5DIR/qml/SddmComponents, /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.

Last updated on 2015-09-26 09:18:35 -0700