Display Manager

Without display manager you need to log in into the console and then statrx. Display Managers put them selfs in between those two steps. They are started by adding display-manager to the default boot level: rc-update add display-manager default. This reads the file/etc/conf.d/display-manager that contains the name of the login manager. After login startx starts what is stored in the XSESSION environmental variable or does what is inside the file~/.xinitrc of the user that has logged in. Most desktop environments com with their own display manager that replaces xdm as gdm for gnome, kdm for kde and lxdm for LXDE.

Start, stop and login

startx test it, see log file for problems: /var/log/Xorg.0.log

Ctrl + D exits

startx checks if in your home directory ~/.xinitrc exist. If so, it starts what it will find inside. Maybe you have done one of the following commands:

echo "exec startxfce4" > ~/.xinitrc

echo "exec startkde" > ~/.xinitrc

This command created the file~/.xinitrc, and executes kde. Otherwise it starts the session found in /etc/X11/Sessions where/etc/rc.conf points to.

To start x automatically rc-update add display-manager default. This starts the Display manager as default xdm that allows also to login graphically. If you use an other login manage set its name in/etc/conf.d/display-manager

For Gentoo display-manager-init replaced xdm and had its config file /etc/conf.d/xdm and requires rc-update add xdm

X is a display server, the program name is Xserver. Check man Xserver

The script startx is a script in and calls xinit that calls Xserver.

See man startx to see for example how options are passed.

Slim

Slim is a lightweight login manager. See https://sourceforge.net/projects/slim.berlios/. Slim has also a log file /var/log/slim.log.

Slim will start per default what is set by the environmental variable XSESSION that is initialized via/etc/rc.conf .

Alternatively the environmental variable can be set via/etc/end.d add XSESSION="Xfce4" to/etc/env.d/90xsession

env-update && source /etc/profile

To have a setting per user ~/.xinitrc has to be started. Put the following

login_cmd           exec /bin/sh - ~/.xinitrc %session
 

command in/etc/slim.conf

Unfortunately slim does not have an autologin with timeout and it maps the numeric key to the laptop keypad (Fn)

Lightdm

Lightdm is an other display manager with its config file /etc/lightdm/lightdm.conf

Lightdm is not as light as it seems to be, it is full featured but needs no special configuration on config file levels. It can login a user automatically with a time out for intervention.

SDDM

sddm supports Wayland and X server https://wiki.gentoo.org/wiki/SDDM

SDDM and Wayland

Add the following to /etc/sddm.conf.d/override.conf

[General]
DisplayServer=wayland
GreeterEnvironment=QT_WAYLAND_SHELL_INTEGRATION=layer-shell
 
[Wayland]
CompositorCommand=kwin_wayland --drm --no-lockscreen --no-global-shortcuts --locale1

This will tell sddm that wayland is used and therefore items as keyboard layout will be taken from the wayland configuration.

QT_WAYLAND_SHELL_INTEGRATION=layer-shell tells Qt to use the layer-shell protocol that sddm requires.

CompositorCommand selects the wayland compositor kwin_wayland

--drm direct rendering (DRM/KMS)

--no-lockscreen skips lock screen logic

--no-global-shortcuts disables configured shortcuts

--locale1 selects keyboard layout

SDDM and X

Important

The keyboard layout must be set so the correct passwords are entered. This can not be observed since the passwords keystrokes are hidden

Edit /etc/sddm.conf.d/01keyboard.conf:

DisplayCommand=/usr/bin/setxkbmap -layout ch -variant de

/usr/share/sddm/scripts/Xsetup

Also set and check the locale settings

localectl set-x11-keymap ch sets the keyboard system wide

localectl status verifies it

A strange effect can be that the US flag appears first but with the first key stroke the desired flag appears. In this case use an other theme that does not show the US flag.

An alternative is edit /usr/share/sddm/scripts/Xsetup

setxkbmap -layout ch -variant de

this works well however it will be wiped out on next sddm update.

LXDM

A light weight display manager. Configuration is in /etc/lxdm/lxdm.conf. It comes with lxdm-config

As LXDE it is gtk based.


Linurs startpage