[systemd-devel] How to disable user at UID.service when starting gdm user

Adrian Vovk adrianvovk at gmail.com
Sat Dec 18 22:55:34 UTC 2021


Hi Chengyi,

 > In fact, gdm user doesn't need these services

I'm almost certain that this is incorrect. There's a good chance if you 
remove the systemd --user instance from GDM, you will end up with a 
broken/unbootable system.

Basically, instead of being its own service manager, new versions of 
gnome-session rely on the systemd --user instance. GDM needs 
gnome-session to be running correctly (to start GNOME shell, 
gnome-settings-daemon, etc in the greeter session).

The request to start a systemd --user instance comes from PAM. I'm 
pretty sure the GDM session uses the `gdm-launch-environment` rule. On 
Fedora 35, gdm-launch-environment pulls in system-auth, which then 
pulls in systemd. Your distro did not do this accidentally; GDM is 
explicitly configured to start the systemd --user instance (and any 
other service that PAM would start for a normal desktop session). This 
is because GDM is essentially just a normal desktop GNOME session with 
some customization applied.

I might have gotten a few minor details wrong here, because I'm not 
100% familiar with the inner workings of GDM. But the main idea holds.

Is there any reason in particular you want to disable the systemd 
--user instance?

Regards,
Adrian

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/systemd-devel/attachments/20211218/b44f392e/attachment.htm>


More information about the systemd-devel mailing list