Bug#1025349: gdm3: should define the display-manager alias for start dependencies

Simon McVittie smcv at debian.org
Thu Jun 12 10:13:39 BST 2025


On Thu, 12 Jun 2025 at 00:51:51 +0100, Luca Boccassi wrote:
>On Mon, 5 Dec 2022 00:15:01 +0000 Simon McVittie <smcv at debian.org>
>wrote:
>> 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).
>
>The same can be achieved by using the Alias mechanism. Simply run
>'systemctl enable <selected>.service' instead of creating the symlink
>manually.

That's fine if all display managers agree to have an Alias, and only 
enable themselves if they are the single selected display manager, via a 
coordinated change to the common code that is in all display managers' 
postinsts. It isn't obvious to me that it would work as intended if half 
the display managers have the current implementation, and the other half 
use an Alias and `systemctl enable`. Perhaps I'm overthinking this and 
it's fine, but if it isn't obvious to me, then I expect it won't be 
obvious to the release team either.

So I think it's too late to make a coordinated change like that for 
trixie, but it seems like a good thing to aim for during the early part 
of the forky cycle. Can you prototype this in at least a few display 
managers (gdm3, lightdm and sddm are probably the most important), test 
the interaction between them, and do the coordination after the forky 
cycle opens to make this change distro-wide?

Do I assume correctly that we'd want the postinst to use deb-systemd-helper 
rather than calling `systemctl enable` directly?

>The problem with manually creating things in maintainer scripts is that
>this is not compatible with building image-based systems with usr-only
>and ephemeral/first-boot etc. With an alias in the unit, the preset
>runs on first boot and re-creates it if needed, for any unit, for any
>purpose.

How does that work if, for example, both gdm3 and lightdm are installed? 
Which one will the systemd preset choose to "win" when they both want to 
be enabled?

(If the answer is "image-based systems with more than one display 
manager don't make sense, use a traditional package-based system if you 
want this level of flexibility" then perhaps that's OK as something to 
document as a limitation and otherwise leave unfixed.)

     smcv



More information about the pkg-gnome-maintainers mailing list