openSUSE:DisplayManagerRework

Jump to: navigation, search

Rework Display Manager

Summary

Remove the currently existing xdm/alternatives method for selecting and setting the Display Manager in openSUSE, in favour of using systemd's built in functionality to manage display managers.

Owners


Current status

Detailed Description

We would like to remove the existing xdm/alternatives DisplayManager setup from the distribution. Instead of shipping a tangled mess of symlinking black magic to determine which DM to start, this information should be stored inside the packages themselves, and each package should ship its own service file which is symlinked to display-manager.service via "systemctl enable" commands.

We simplify the system this way and it is easier to add new display managers later on, as they don't need central registration. Selecting a window manager also becomes more uniform how we support selection of other services. And it also becomes more alike how things are done on other distributions.

We'll also be able to get rid of quite some ugly code in /usr/lib/X11/display-manager, /etc/alternatives/ and other places, in addition to being able to decouple Wayland only projects from requiring xdm and the accompanying Xorg server and dependencies from having to be installed

Packages will make use of systemd presets so that Desktop Maintainers (i.e. GNOME, Plasma, LXQt, MATE, etc) have an easy way to select the window manager of their choice, simply by shipping a preset file.



Benefit to openSUSE

Things generally become simple, easier and more modular. We will be more like other distros since we get rid of the openSUSE-only xdm/alternatives logic and symlinking, in favour of explicit unit files like they are used by other distros.

Scope

We need to make the following changes:

  1. Update all display manager packages to include a display manager system unit file (e.g. /usr/lib/systemd/system/xyzdm.service), with the following minimum content (obviously, the individual DM's may need other flags set):
    [Unit]
    Description=XYZ Display Manager
    Documentation=man:xyzdm(8)
    Conflicts=getty@tty1.service
    After=systemd-user-sessions.service getty@tty1.service plymouth-quit.service
    
    
    [Service]
    ExecStart=/usr/bin/xyzdm
    Restart=always
    
    [Install]
    Alias=display-manager.service
    
    1. A Quick check of the major Display Managers in openSUSE:Factory show the following
      1. SDDM: The upstream provided sddm.service file provides all needed functionality
      2. GDM: openSUSE currently does not ship a gdm.service file in our basic packaging (it is provided in the `gdm-systemd` subpackage), but Fedora does use the upstream provided service file, without distribution modification
      3. XDM: openSUSE installs `/etc/systemd/system/xdm.service` but that is just a symlink to the generic `/usr/lib/systemd/system/display-manager.service` and is part of our quirky alternatives setup. Upstream does ship an xdm.service file, and it appears it would need to be patched at the distribution level.
      4. LightDM: Does not currently have a lightdm.service file on openSUSE, upstream does provide a .service file in their sources, that appears to provide all needed parameters.
  2. Update all display manager packages to make use of systemd packaging macros to install the unit files
  3. Ask the various desktop maintainers to include their own preset files to set their dm as default
    1. Just using Fedora Workstation as an example of one way to do this, they ship display-manager.preset As part of their fedora-release package, obviously they are focused on GNOME, so it makes sense for them to put gdm first, this needs more research within openSUSE to decide how to handle.
    2. That being said, there can only be one Display Manager active at a time, so if a user were interested in swapping display managers in a multi-desktop installation, it would be a matter of disabling the current service, and enabling the new desired service through systemctl
  4. We have to ensure all the fun/weird hacks from /usr/lib/X11/display-manager are either no longer relevant - or not lost (that includes for example remote-login capabilities).
  5. Once the packages are ready, openQA will be the next challenge, as there are tests where install the system for example as minimal graphical (which results on xdm), then we upgrade to e.g. lxqt or mate and end up with sddm or lightdm.

The Display Managers currently available in openSUSE:Factory are:

  • GDM (GNOME)
  • SDDM (Plasma and LXQt)
  • XDM
  • LightDM (LXDE/XFCE/MATE?)
  • Other Display/Login Managers, such as SLiM, Greetd, Possibly the old kdm for the TDE/KDE3 folks, And whatever other Desktops like Cinnamon, Cosmic, Pantheon, Budgie might be using, possibly exist on OBS, but aren't currently in openSUSE:Factory

We will do our best to contact those maintainers, and/or Submit SR's to effect this change.

How To Test

The right display manager should come up as normal on the various openSUSE Products.

The following command should work to change the default display manager for the next reboot:

systemctl enable --force xyzdm.service