Why does SDDM depend on XDM?

Hi all!

Most of the time, I skim through the packages that will be updated.
Today, I observed that XDM in that list. But as I use SDDM - as everybody by default with KDE desktop install - I thought

zypper rm -u xdm

should be a reasonable move here.
But no: SDDM depends on XDM.

Quick search shows that neither Debian’s SDDM package, nor Fedora’s one depend on XDM.
LightDM doesn’t depend on XDM either, at least in Tumbleweed.
So, what is going on here? Sloppy packaging. or some special circumstances (and its sloppy workaround) in OpenSUSE?
Maybe it isn’t a big mistake, but I have pathological aversion against unneeded deps. :wink:

Thanks!

I dug some more.
I couldn’t find any reference to XDM in the readme of SDMM github page’s and its CMakeLists.txt file.

Open a bugreport:
https://bugzilla.opensuse.org/index.cgi

Same Credentials as here in the forum.

Note:

**3400G:~ #** systemctl status xdm 
**●** display-manager.service - X Display Manager 
     Loaded: loaded (/usr/lib/systemd/system/display-manager.service; enabled; vendor preset: enabled) 
     Active: **active (running)** since Tue 2021-05-25 07:57:09 CEST; 5h 31min ago 
    Process: 847 ExecStart=/usr/lib/X11/display-manager start (code=exited, status=0/SUCCESS) 
   Main PID: 929 (sddm) 
      Tasks: 20 (limit: 4915) 
        CPU: 2min 56.093s 
     CGroup: /system.slice/display-manager.service 
             ├─929 /usr/bin/sddm 
             └─969 /usr/bin/Xorg.bin -nolisten tcp -auth /run/sddm/{be12c47f-f9dd-4369-988f-83d1a788d391} -background none -noreset -displayfd 17 -seat seat0 vt7 

May 25 07:57:18 3400G sddm-helper[1145]: [PAM] Authenticating...
May 25 07:57:18 3400G sddm-helper[1145]: [PAM] Preparing to converse...
May 25 07:57:18 3400G sddm-helper[1145]: [PAM] Conversation with 1 messages
May 25 07:57:18 3400G sddm-helper[1145]: [PAM] returning.
May 25 07:57:18 3400G sddm[929]: Authenticated successfully
May 25 07:57:18 3400G sddm[929]: Auth: sddm-helper exited successfully
May 25 07:57:18 3400G sddm[929]: Greeter stopped.
May 25 07:57:18 3400G sddm-helper[1145]: pam_unix(sddm:session): session opened for user karl(uid=1000) by (uid=0) 
May 25 07:57:18 3400G sddm-helper[1145]: Starting: "/usr/etc/X11/xdm/Xsession \"/usr/bin/startplasma-x11\"" 
May 25 07:57:18 3400G sddm[929]: Session started
**3400G:~ #**

I don’t think sddm “really” does depend on it, but xorg seems like it might. I might be wrong though.


 moltke ~ zypper if --provides --requires xdm       
The 'repo-update' repository is not up to date. You can run 'zypper refresh' as root user to update it.
Loading repository data...
Reading installed packages...


Information for xdm package:
-----------------------------
Repository : repo-oss
Name : xdm
Version : 1.1.12-16.1
Architecture : x86_64
Vendor : openSUSE
Installation size : 535.9 KiB
Installed : Yes (automatically)
Status : updated
Source package : xdm-1.1.12-16.1.src
Summary : X Display Manager
Description : 
    Xdm manages a collection of X displays, which may be on the local host
    or remote servers.
Provides : [4]
    libXdmGreet.so()(64bit)
    config(xdm) = 1.1.12-16.1
    xdm = 1.1.12-16.1
    xdm(x86-64) = 1.1.12-16.1
Requires : [36]
    libc.so.6(GLIBC_2.33)(64bit)
    libdl.so.2()(64bit)
    /bin/bash
    libdl.so.2(GLIBC_2.2.5)(64bit)
    libX11.so.6()(64bit)
    /usr/bin/touch
    /usr/bin/mkdir
    fillup
    libXext.so.6()(64bit)
    logrotate
    libcrypt.so.1()(64bit)
    libcrypt.so.1(XCRYPT_2.0)(64bit)
    libpam.so.0()(64bit)
    libpam.so.0(LIBPAM_1.0)(64bit)
    libXt.so.6()(64bit)
    libXinerama.so.1()(64bit)
    libXrender.so.1()(64bit)
    libXmu.so.6()(64bit)
    libXaw.so.7()(64bit)
    libXpm.so.so.4()(64bit)
    libXft.so.so.2()(64bit)
    libXau.so.6()(64bit)
    xterm-bin
    xrdb
    xsetroot
    xinit
    xset
    libXdmcp.so.6()(64bit)
    xli
    /usr/bin/pidof
    sessreg
    xmessage
    xconsole
    /sbin/startproc
    /bin/sh
    systemd

However


moltke ~ zypper if --provides --requires sddm
The 'repo-update' repository is not up to date. You can run 'zypper refresh' as root user to update it.
Loading repository data...
Reading installed packages...


Information for package sddm:
------------------------------
Repository : repo-oss
Name : sddm
Version : 0.19.0-2.2
Architecture : x86_64
Vendor : openSUSE
Installation size : 4.5 MiB
Installed : Yes (automatically)
Status : updated
Source package : sddm-0.19.0-2.2.src
Summary : QML-based display manager
Description : 
    SDDM is a display manager for X11. It uses technologies like QtQuick,
    which in turn gives the designer the ability to create animated user
    interfaces.
It provides : [5]
    config(sddm) = 0.19.0-2.2
    qt5qmlimport(SddmComponents.2) = 0
    sddm = 0.19.0-2.2
    sddm-lang = 0.19.0
    sddm(x86-64) = 0.19.0-2.2
Requires : [42]
    libc.so.6(GLIBC_2.14)(64bit)
    libstdc++.so.6()(64bit)
    libstdc++.so.6(GLIBCXX_3.4)(64bit)
    libstdc++.so.6(CXXABI_1.3)(64bit)
    libgcc_s.so.1()(64bit)
    libgcc_s.so.1(GCC_3.0)(64bit)
    libgcc_s.so.1(GCC_3.3.1)(64bit)
    libstdc++.so.6(GLIBCXX_3.4.21)(64bit)
    libstdc++.so.6(GLIBCXX_3.4.9)(64bit)
    libQt5Core.so.5()(64bit)
    libQt5Core.so.5(Qt_5)(64bit)
    libQt5Core.so.5(Qt_5.15)(64bit)
    libQt5Gui.so.5()(64bit)
    libQt5Gui.so.5(Qt_5)(64bit)
    libstdc++.so.6(CXXABI_1.3.8)(64bit)
    libstdc++.so.6(GLIBCXX_3.4.14)(64bit)
    libstdc++.so.6(GLIBCXX_3.4.18)(64bit)
    libQt5Network.so.5()(64bit)
    libQt5Network.so.5(Qt_5)(64bit)
    libQt5DBus.so.5()(64bit)
    libQt5DBus.so.5(Qt_5)(64bit)
    libQt5Qml.so.5()(64bit)
    libQt5Qml.so.so.5(Qt_5)(64bit)
    libxcb.so.1()(64bit)
    libsystemd.so.0()(64bit)
    libQt5Quick.so.so.5()(64bit)
    libQt5Quick.so.so.5(Qt_5)(64bit)
    libsystemd.so.0(LIBSYSTEMD_209)(64bit)
    libpam.so.0()(64bit)
    libpam.so.0(LIBPAM_1.0)(64bit)
    libXau.so.6()(64bit)
    libxcb-xkb.so.so.1()(64bit)
    **xdm**
    qt5qmlimport(QtQuick.2) >= 0
    sddm-branding = 0.19.0
    qt5qmlimport(SddmComponents.2) >= 0
    /bin/sh
    systemd
    diffutils
    /usr/sbin/groupadd
    /usr/sbin/useradd
    /usr/bin/getent

Well, xdm doesn’t require nor provide sddm, however, xorg-x11-essentials does require xdm


 moltke ~ zypper if --provides --requires xdm       
The 'repo-update' repository is not up to date. You can run 'zypper refresh' as root user to update it.
Loading repository data...
Reading installed packages...


Information for xdm package:
-----------------------------
Repository : repo-oss
Name : xdm
Version : 1.1.12-16.1
Architecture : x86_64
Vendor : openSUSE
Installation size : 535.9 KiB
Installed : Yes (automatically)
Status : updated
Source package : xdm-1.1.12-16.1.src
Summary : X Display Manager
Description : 
    Xdm manages a collection of X displays, which may be on the local host
    or remote servers.
Provides : [4]
    libXdmGreet.so()(64bit)
    config(xdm) = 1.1.12-16.1
    xdm = 1.1.12-16.1
    xdm(x86-64) = 1.1.12-16.1
Requires : [36]
    libc.so.6(GLIBC_2.33)(64bit)
    libdl.so.2()(64bit)
    /bin/bash
    libdl.so.2(GLIBC_2.2.5)(64bit)
    libX11.so.6()(64bit)
    /usr/bin/touch
    /usr/bin/mkdir
    fillup
    libXext.so.6()(64bit)
    logrotate
    libcrypt.so.1()(64bit)
    libcrypt.so.1(XCRYPT_2.0)(64bit)
    libpam.so.0()(64bit)
    libpam.so.0(LIBPAM_1.0)(64bit)
    libXt.so.6()(64bit)
    libXinerama.so.1()(64bit)
    libXrender.so.1()(64bit)
    libXmu.so.6()(64bit)
    libXaw.so.7()(64bit)
    libXpm.so.so.4()(64bit)
    libXft.so.so.2()(64bit)
    libXau.so.6()(64bit)
    xterm-bin
    xrdb
    xsetroot
    xinit
    xset
    libXdmcp.so.6()(64bit)
    xli
    /usr/bin/pidof
    sessreg
    xmessage
    xconsole
    /sbin/startproc
    /bin/sh
    systemd

And


zypper if --provides --requires xorg-X11-essentials
The 'repo-update' repository is not up to date. You can run 'zypper refresh' as root user to update it.
Loading repository data...
Reading installed packages...


Information for package xorg-x11-essentials:
---------------------------------------------
Repository : repo-oss
Name : xorg-x11-essentials
Version : 7.6_1-16.11
Architecture : noarch
Vendor : openSUSE
Installation size : 3.0 KiB
Installed : Yes (automatically)
Status : updated
Source package : xorg-x11-7.6_1-16.11.src
Summary : Compatibility metapackage for X.Org core applications
Description : 
    This package is a compatibility metapackage. It requires the
    X.Org core applications packages.
Provides : xorg-x11-essentials = 7.6_1-16.11
Requires : [17]
    mkfontdir
    mkfontscale
    xprop
    **xdm**
    xkbcomp
    xrdb
    xauth
    xsetroot
    xinit
    xset
    setxkbmap
    iceauth
    sessreg
    xmodmap
    xmessage
    rgb
    xconsole

However


moltke ~ zypper if --provides --requires sddm
The 'repo-update' repository is not up to date. You can run 'zypper refresh' as root user to update it.
Loading repository data...
Reading installed packages...


Information for package sddm:
------------------------------
Repository : repo-oss
Name : sddm
Version : 0.19.0-2.2
Architecture : x86_64
Vendor : openSUSE
Installation size : 4.5 MiB
Installed : Yes (automatically)
Status : updated
Source package : sddm-0.19.0-2.2.src
Summary : QML-based display manager
Description : 
    SDDM is a display manager for X11. It uses technologies like QtQuick,
    which in turn gives the designer the ability to create animated user
    interfaces.
It provides : [5]
    config(sddm) = 0.19.0-2.2
    qt5qmlimport(SddmComponents.2) = 0
    sddm = 0.19.0-2.2
    sddm-lang = 0.19.0
    sddm(x86-64) = 0.19.0-2.2
Requires : [42]
    libc.so.6(GLIBC_2.14)(64bit)
    libstdc++.so.6()(64bit)
    libstdc++.so.6(GLIBCXX_3.4)(64bit)
    libstdc++.so.6(CXXABI_1.3)(64bit)
    libgcc_s.so.1()(64bit)
    libgcc_s.so.1(GCC_3.0)(64bit)
    libgcc_s.so.1(GCC_3.3.1)(64bit)
    libstdc++.so.6(GLIBCXX_3.4.21)(64bit)
    libstdc++.so.6(GLIBCXX_3.4.9)(64bit)
    libQt5Core.so.5()(64bit)
    libQt5Core.so.5(Qt_5)(64bit)
    libQt5Core.so.5(Qt_5.15)(64bit)
    libQt5Gui.so.5()(64bit)
    libQt5Gui.so.5(Qt_5)(64bit)
    libstdc++.so.6(CXXABI_1.3.8)(64bit)
    libstdc++.so.6(GLIBCXX_3.4.14)(64bit)
    libstdc++.so.6(GLIBCXX_3.4.18)(64bit)
    libQt5Network.so.5()(64bit)
    libQt5Network.so.5(Qt_5)(64bit)
    libQt5DBus.so.5()(64bit)
    libQt5DBus.so.5(Qt_5)(64bit)
    libQt5Qml.so.5()(64bit)
    libQt5Qml.so.so.5(Qt_5)(64bit)
    libxcb.so.1()(64bit)
    libsystemd.so.0()(64bit)
    libQt5Quick.so.so.5()(64bit)
    libQt5Quick.so.so.5(Qt_5)(64bit)
    libsystemd.so.0(LIBSYSTEMD_209)(64bit)
    libpam.so.0()(64bit)
    libpam.so.0(LIBPAM_1.0)(64bit)
    libXau.so.6()(64bit)
    libxcb-xkb.so.so.1()(64bit)
    **xdm**
    qt5qmlimport(QtQuick.2) >= 0
    sddm-branding = 0.19.0
    qt5qmlimport(SddmComponents.2) >= 0
    /bin/sh
    systemd
    diffutils
    /usr/sbin/groupadd
    /usr/sbin/useradd
    /usr/bin/getent

I’m only guessing.

I think they are doing it this way to make it ease for users to change which DM they use (with “update-alternatives”). In effect, they have set it up so that XDM is the master which looks at the alternatives to decide which to use, and then falls back to XDM if nothing else is there.

Yes, that would make sense.

XDM as DM starter seems to predate use of update-alternatives for DM management:

# inxi -Sy
System:
  Host: gx780 Kernel: 3.12.67-64-desktop x86_64 bits: 64 Desktop: KDE 4.11.5
  Distro: **openSUSE 13.1** (Bottle)
# rpm -qa | egrep 'gdm|kdm|lightdm|sddm|xdm|alternative'
xdm-1.1.10-24.2.1.x86_64
kdm-4.11.12-123.1.x86_64
xdmbgrd-0.6-213.1.3.x86_64
kdm-branding-upstream-4.11.12-123.1.x86_64
update-alternatives-1.16.16-3.3.1.x86_64
# ps -A | grep dm
 1225 ?        00:00:00 rpc.idmapd
 1500 ?        00:00:00 kdm
 1522 ?        00:00:00 kdm
# systemctl status kdm
kdm.service
   Loaded: not-found (Reason: No such file or directory)
   Active: inactive (dead)

# systemctl status xdm
xdm.service - LSB: X Display Manager
   Loaded: loaded (/etc/init.d/xdm)
   Active: active (running) since Fri 2021-05-28 21:05:45 EDT; 3min 58s ago
  Process: 1470 ExecStart=/etc/init.d/xdm start (code=exited, status=0/SUCCESS)
   CGroup: /system.slice/xdm.service
           ├─1500 /usr/bin/kdm
           └─1515 /usr/bin/Xorg -br :0 vt7 -nolisten tcp -auth /var/lib/kdm/AuthFiles/A:0-Z7msWa

May 28 21:05:45 gx780 xdm[1470]: Starting service kdm..done
May 28 21:05:45 gx780 systemd[1]: Started LSB: X Display Manager.
May 28 21:05:45 gx780 kdm[1500]: plymouth is NOT running
# ls -l /etc/alternatives/default*
ls: cannot access /etc/alternatives/default*: No such file or directory
# egrep 'R_XSERVER=|DEFAULT' /etc/sysconfig/*ager*
/etc/sysconfig/displaymanager:DISPLAYMANAGER_XSERVER="Xorg"
/etc/sysconfig/windowmanager:DEFAULT_WM="kde-plasma"

# inxi -Sy
System:
  Host: gx260 Kernel: 2.6.25.18-0.2-pae i686 bits: 32 Desktop: KDE 3.5.9
  Distro: **openSUSE 11.0** (i586)
# rpm -qa | egrep 'gdm|kdm|lightdm|sddm|xdm|alternative'
kdebase3-kdm-3.5.9-65.2
xdmbgrd-0.6-157.1
update-alternatives-1.8.3-113.1
# ls -l /etc/alternatives
total 0
lrwxrwxrwx 1 root root 13 Jul 12  2008 ftp -> /usr/bin/pftp
lrwxrwxrwx 1 root root 29 Jul 12  2008 ftp.1 -> /usr/share/man/man1/pftp.1.gz
lrwxrwxrwx 1 root root 15 Jul 12  2008 vim -> /bin/vim-normal
lrwxrwxrwx 1 root root 37 Dec 18  2009 xulrunner -> /usr/lib/xulrunner-1.9.0.15/xulrunner
# rckdm status
Checking for service kdm:                                             running
# rcxdm status
Checking for service kdm:                                             running
# egrep 'AGER=|DEFAULT' /etc/sysconfig/*ager*
/etc/sysconfig/displaymanager:DISPLAYMANAGER="kdm3"
/etc/sysconfig/windowmanager:DEFAULT_WM="startkde3"

I think it’s just been the (open)SUSE way historically to use xdm to open any other configured DM, and fall back to xdm itself, if no other.

It certainly did. The update-alternatives system was originally a Debian development, and now in use by a number of different distros.

graphical.target wants display-manager.service, which in turn executes /usr/lib/X11/display-manager which is part of package xdm. From /usr/lib/X11/display-manager:

DISPLAYMANAGER used to be set in /etc/sysconfig/displaymanager, but the default is now set by update-alternatives