On Sat, 03 Dec 2022 at 01:03:38 +0100, Samuel Thibault wrote:
> If gdm happens to manage to start quicker than console-setup,
> console-setup's setupcon call will fail. So we need a dependency between
> the two, to make console-setup start "Before" display managers. This can
> be set with
> 
> Before=display-manager.service
> 
> since display managers usually set this alias. But gdm3 apparently
> explicitly removes this with the debian/patches/92_systemd_unit.patch
> patch:
> 
> * Don't install the display-manager.service alias, which is managed
>   jointly by all Debian display managers via a debconf question

Upstream gdm3.service (or possibly gdm.service, I think we do some renaming
for historical reasons) has

    [Install]
    Alias=display-manager.service

so that `systemctl enable gdm3.service` will create a symlink
/etc/systemd/system/display-manager.service -> /lib/systemd/system/gdm3.service.
This assumes that only one display manager can be enabled at a time, and
preferably only one *installed* at a time: if both gdm3 and lightdm try
to do that, if I understand correctly, the result will be unpredictable.

In Debian, instead of gdm3.service having that, the debconf question
creates that symlink programmatically if and only if gdm3 is the selected
display manager (in particular, the symlink isn't created if you have
installed both gdm3 and lightdm, and chosen to use lightdm instead).

If I understand correctly, any mechanism that makes the symlink exist
should be enough for "Before=display-manager.service" to do what you want
it to do. Please try it?

systemd maintainers: Am I getting this right?

    smcv

Reply via email to