SDDM

The Simple Desktop Display Manager (SDDM) is a display manager. It is the recommended display manager for the KDE Plasma and LXQt desktop environments.

From Wikipedia:Simple Desktop Display Manager:

Simple Desktop Display Manager (SDDM) is a display manager (a graphical login program and session manager) for the X11 and Wayland windowing systems. SDDM was written from scratch in C++11 and supports theming via QML.
Note: The Wayland windowing system is not yet fully supported: Wayland sessions are listed, but SDDM runs on X11. SDDM 0.20 will introduce full Wayland support.

Installation

Install the sddm package. Optionally install sddm-kcm for the KConfig Module.

Follow Display manager#Loading the display manager to start SDDM at boot.

Configuration

The default configuration file for SDDM can be found at /usr/lib/sddm/sddm.conf.d/default.conf. For any changes, create configuration file(s) in /etc/sddm.conf.d/. See sddm.conf(5) for all options.

The sddm-kcm package (included in the group) provides a GUI to configure SDDM in Plasma's system settings. There is also a Qt-based available in the AUR.

Everything should work out of the box, since Arch Linux uses systemd and SDDM defaults to using for session management.

Autologin

SDDM supports automatic login through its configuration file, for example:

This configuration causes a KDE Plasma session to be started for user john when the system is booted. Available session types can be found in /usr/share/xsessions/ for X and in for Wayland.

An option to autologin into KDE Plasma while simultaneously locking the session is not available

You can add a script that activates the screensaver of KDE to the autostart as a workaround:

#!/bin/sh
/usr/bin/dbus-send --session --type=method_call --dest=org.freedesktop.ScreenSaver /ScreenSaver org.freedesktop.ScreenSaver.Lock &

Unlock KDE Wallet automatically on login

See KDE Wallet#Unlock KDE Wallet automatically on login.

Theme settings

Theme settings can be changed in the section. If you use Plasma's system settings, themes may show previews.

Set to for the default Plasma theme.

Some themes are available in the AUR, for example .

Current theme

Set the current theme through the value, e.g. .

Editing themes

The default SDDM theme directory is . You can add your custom made themes to that directory under a separate subdirectory. Note that SDDM requires these subdirectory names to be the same as the theme names. Study the files installed to modify or create your own theme.

Customizing a theme

To override settings in the configuration file, create a custom theme.conf.user file in the same directory. For example, to change the theme's background:

Testing (previewing) a theme

You can preview an SDDM theme if needed. This is especially helpful if you are not sure how the theme would look if selected or just edited a theme and want to see how it would look without logging out. You can run something like this:

$ sddm-greeter --test-mode --theme /usr/share/sddm/themes/breeze

This should open a new window for every monitor you have connected and show a preview of the theme.

Mouse cursor

To set the mouse cursor theme, set to your preferred cursor theme.

Valid Plasma mouse cursor theme names are breeze_cursors, and .

User icon (avatar)

SDDM reads the user icon (a.k.a. "avatar") as a PNG image from either for each user, or the common location for all users specified by in an SDDM configuration file. The configuration setting can be placed in either directly, or, better, a file under /etc/sddm.conf.d/ such as /etc/sddm.conf.d/avatar.conf.

To use the location option, place a PNG image for each user named at the location specified by the key in the configuration file. The default location for is . You can change the default location to suit your needs. Here is an example:

The other option is to put a PNG image named at the root of your home directory. In this case, no changes to any SDDM configuration file is required. However, you need to make sure that sddm user can read the PNG image file(s) for the user icon(s).

To set proper permissions run:

$ setfacl -m u:sddm:x ~/
$ setfacl -m u:sddm:r ~/.face.icon

You can check permissions with:

$ getfacl ~/
$ getfacl ~/.face.icon

See SDDM README: No User Icon.

Numlock

If you want to enforce Numlock to be enabled, set in the section.

Rotate display

See Xrandr#Configuration.

DPI settings

Sometimes it is useful to set up the correct monitor's PPI settings on a "Display Manager" level. To do so you need to add to the parameter at the end of the string. For example:

/etc/sddm.conf.d/dpi.conf
[X11]
ServerArguments=-nolisten tcp -dpi 94

Enable HiDPI

Create the following file:

Enable virtual keyboard

Install .

Create the following file:

SDDM now displays a button in lower-left corner of login screen to open the virtual keyboard.

Using a fingerprint reader

SDDM works with a fingerprint reader when using fprint. After installing fprint and adding fingerprint signatures, add the following to the top of :

In order to use either a password or a fingerprint, you can instead add the following to the top of the file:

/etc/pam.d/sddm
auth 			[success=1 new_authtok_reqd=1 default=ignore]  	pam_unix.so try_first_pass likeauth nullok
auth 			sufficient  	pam_fprintd.so

Note that KWallet cannot be unlocked using a fingerprint reader (see KDE Wallet#Unlock KDE Wallet automatically on login), but the first line ensures that a password login will automatically unlock KWallet.

If you now press enter in the empty password field, the fingerprint reader should start working.

Running under Wayland

SDDM can run rootless under Wayland, but currently only when using the package.

Create a new config file in the /etc/sddm.conf.d/ directory, name it something like .

Add the following to the new file:

/etc/sddm.conf.d/10-wayland.conf
[General]
DisplayServer=wayland
GreeterEnvironment=QT_WAYLAND_SHELL_INTEGRATION=layer-shell

[Wayland]
CompositorCommand=

Next, you will need a Wayland compositor (such as KDE's KWin compositor) to render SDDM, and enter the program and relevant arguments as a parameter to .

KDE / KWin

Add the following as a parameter to into the SDDM config file created above (e.g ):

To enable virtual keyboard support (e.g. using or ), append the flag with the appropriate keyboard to the command, like so (replacing maliit-keyboard with as necessary):

Troubleshooting

Blank screen with cursor, but no greeter shows

Greeter crashes if there is no available disk space. Check your disk space with .

If disk space is not the issue, it may be due to a bug. Switch to another TTY, and then try loginctl unlock-session session_id or to restart SDDM.

Long load time before SDDM shows the greeter

A low entropy pool can cause long SDDM load time (Bug report). See Random number generation for suggestions to increase the entropy pool.

Hangs after login

Try removing and logging in again without rebooting. Rebooting without logging in creates the file again and the problem will persist.

SDDM starts on tty1 instead of tty7

SDDM follows the systemd convention of starting the first graphical session on tty1. If you prefer the old convention where tty1 through tty6 are reserved for text consoles, change the default value of variable, which comes under the section:

One or more users do not show up on the greeter

By default, SDDM is configured to displays only users with a UID in the range of 1000 to 60513. If the UIDs of the desired users are outside this range then you will have to modify the range.

For example, for a UID of 501, set and hide those with shells used by system users:

/etc/sddm.conf.d/uid.conf
[Users]
HideShells=/usr/bin/nologin,/sbin/nologin,/bin/false,/usr/bin/git-shell
MinimumUid=500

For users with a higher UIDs, set to the appropriate value.

User avatars do not show up on the greeter

User avatars are not shown on the greeter if the number of users exceeds parameter or if avatars are not enabled at all as controlled by parameter. To circumvent this add the following lines to your sddm configuration:

/etc/sddm.conf.d/avatars.conf
[Theme]
EnableAvatars=true # enable avatars
DisableAvatarsThreshold=7 # set the threshold for the number of users. Avatars are not shown if this threshold is exceeded.

SDDM loads only US keyboard layout

SDDM loads the keyboard layout specified in . You can generate this configuration file by command. See Keyboard configuration in Xorg for more information.

An alternative way of setting the keyboard layout that will only set it in SDDM and not subsequent sessions is to invoke a setxkbmap command in the startup script of SDDM, located at . See Xorg/Keyboard configuration#Using setxkbmap for examples.

SDDM may also incorrectly display the layout as US but will immediately change to the correct layout after you start typing your password . This seems to not be a bug in SDDM but in X server.

Screen resolution is too low

Issue may be caused by HiDPI usage for monitors with corrupted EDID . If you have enabled HiDPI, try to disable it.

If even the above fails, you can try setting your screen size in a Xorg configuration file:

Long load time on autofs home directory

SDDM by default tries to display avatars of users by accessing file. If your home directory is an autofs, for example if you use dm-crypt, this will make it wait for 60 seconds, until autofs reports that the directory cannot be mounted.

You can disable avatars by creating the following configuration file:

X authority (aka MIT-MAGIC-COOKIE) file

SDDM uses a random fresh UUID for the auth file as described in details at . So in order to find that file one may use a script:

# find /var/run/sddm/ -type f

This may be needed if one needs to start x11vnc when there is no user logged in. For example:

# x11vnc -display :0 -auth "$( find /var/run/sddm/ -type f )"

Overlapping greeters on multiscreen setup

It happens that the X monitor layout is not setup correctly on multiscreen setup leading to overlapping greeters. To solve this add the following lines to order your sddm greeter layout from left to right:

Login session appears on an unexpected display

It can happen that the SDDM login session appears on a different display than your primary display if multiple displays are connected. This problem can be annoying if the secondary display is rotated and the primary display is not. A simple fix to this problem is to use xrandr to configure the displays before the login session using Xsetup script. E.g. here xrandr reports that there are two connected displays where the secondary display (DP-2) is left of the primary display (DP-4).

# xrandr | grep -w connected
DP-2 connected 2160x3840+0+0 left (normal left inverted right x axis y axis) 597mm x 336mm
DP-4 connected primary 3840x2160+2160+0 (normal left inverted right x axis y axis) 697mm x 392mm

The following Xsetup recreates the above setup for the login window:

/usr/share/sddm/scripts/Xsetup
#!/bin/sh
# Xsetup - run as root before the login dialog appears

xrandr --output DP-4 --auto --primary
xrandr --output DP-2 --left-of DP-4 --rotate left --noprimary
This article is issued from Archlinux. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.