On Mon, 05 Dec 2022 at 01:21:19 +0100, Samuel Thibault wrote: > Simon McVittie, le lun. 05 déc. 2022 00:15:01 +0000, a ecrit: > > 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? > > Ah, indeed, that works, sorry for not having actually tried, because > lightdm does have these two lines. But then, with this reasoning, > lightdm is bogus by having these two lines?
I honestly don't know. Maybe this is wrong in lightdm (and possibly other *dm implementations), or maybe removing those lines in gdm3 is unnecessary delta and we don't really need that part of the patch? We need a small amount of delta in the source file gdm.service.in *anyway*, so if this is an unnecessary patch, it's not a particularly expensive one. Note that both gdm3 and lightdm override dh_installsystemd to do nothing, so probably it doesn't matter very much in practice unless a sysadmin explicitly runs `systemctl enable gdm3.service` or `systemctl enable lightdm.service` themselves. smcv