systemd: systemctl does not re-create display-manager.service symlink

Michael Biebl biebl at debian.org
Sat Feb 1 02:21:14 GMT 2020


Control: retitle -1 Improve handling of display-manager.service symlink
Control: clone -1 -2 -3 -4 -5 -6 -7
Control: reassign -1 gdm3
Control: reassign -2 lightdm
Control: reassign -3 sddm
Control: reassign -4 lxdm
Control: reassign -5 xdm
Control: reassign -6 slim
Control: reassign -7 wdm



On Thu, 09 Oct 2014 17:55:18 +0300 Andrei POPESCU
<andreimpopescu at gmail.com> wrote:
> Package: systemd
> Version: 215-5+b1
> Severity: normal
> 
> Hi,
> 
> # systemctl disable lightdm
> Synchronizing state for lightdm.service with sysvinit using update-rc.d...
> Executing /usr/sbin/update-rc.d lightdm defaults
> Executing /usr/sbin/update-rc.d lightdm disable
> insserv: warning: current start runlevel(s) (empty) of script `lightdm' overrides LSB defaults (2 3 4 5).
> insserv: warning: current stop runlevel(s) (0 1 2 3 4 5 6) of script `lightdm' overrides LSB defaults (0 1 6).
> Removed symlink /etc/systemd/system/display-manager.service.
> # systemctl enable lightdm
> Synchronizing state for lightdm.service with sysvinit using update-rc.d...
> Executing /usr/sbin/update-rc.d lightdm defaults
> insserv: warning: current start runlevel(s) (empty) of script `lightdm' overrides LSB defaults (2 3 4 5).
> insserv: warning: current stop runlevel(s) (0 1 2 3 4 5 6) of script `lightdm' overrides LSB defaults (0 1 6).
> Executing /usr/sbin/update-rc.d lightdm enable
> The unit files have no [Install] section. They are not meant to be enabled
> using systemctl.
> Possible reasons for having this kind of units are:
> 1) A unit may be statically enabled by being symlinked from another unit's
>    .wants/ or .requires/ directory.
> 2) A unit's purpose may be to act as a helper for some other unit which has
>    a requirement dependency on it.
> 3) A unit may be started when needed via activation (socket, path, timer,
>    D-Bus, udev, scripted systemctl call, ...).
> 
> 
> I have to run 'dpkg-reconfigure lightdm' to have lightdm's postinst 
> recreate the display-manager.service symlink, which is not obvious.


I think, the proper solution is, that gdm, lightdm etc
drop this bit from their service file (in case they have added this
previously)

ExecStartPre=/bin/sh -c '[ "$(cat /etc/X11/default-display-manager
2>/dev/null)" = "/usr/sbin/lightdm" ]'

This is not longer necessary, as all relevant x-display-managers ship a
.service file nowadays.

They should also add a

[Install]
Alias=display-manager.service

section

to their service file. Which will make sure that if you run
"systemctl enable foo.service", display-manager.service will point at
the desired display manager.

Cloning, reassigning this bug report.

Regards,
Michael

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: OpenPGP digital signature
URL: <http://alioth-lists.debian.net/pipermail/pkg-gnome-maintainers/attachments/20200201/ed1e093c/attachment.sig>


More information about the pkg-gnome-maintainers mailing list