Skip to content

systemd user session startup

Benjamin Berg requested to merge wip/benzea/systemd-user-switch into master

This is roughly based on !2 (closed), but takes a number of other approaches.

See the commit that adds the units for a description. Also note that we will use systemd when it is available in this approach. Also, the session leader process is connected to a systemd unit using a fifo/FD which allows signalling session status both ways (basically systemd user instance and GDM/logind)

TODOs that are still left:

  • gnome-shell has the capability to show a warning at login when extensions were disabled. We could hook it up here (just requires touching a file).
  • Have a compile time switch to select default session management and command line arguments to change the default. (This allows distributions to select a default while also allowing easy testing by e.g. modifying the gnome-session wrapper script.)

Open Questions:

  • Should we make the use of systemd compile time configurable (then we cannot drop the dbus restart)?
  • Should we rename the XDG Desktop file entry for hiding (gnome-shell!507 (comment 500531))

I have tested this on F30 and everything seems to be working great. Only small issue is that SELinux is preventing systemd from being used.

F30 RPMs are at

SELinux issue:

gnome-shell MR: gnome-shell!507 (merged)

mutter MR: mutter!571 (merged)

GDM MR: gdm!69 (merged)

gnome-settings-daemon MR: gnome-settings-daemon!98 (merged)

gnome-initial-setup MR: gnome-initial-setup!38 (merged)

jhbuild MR for example update: jhbuild!16 (merged)

An (incomplete) graph created using systemd-analyze: gnome-systemd.svg

   Color legend: black     = Requires
                 dark blue = Requisite
                 dark grey = Wants
                 red       = Conflicts
                 green     = After

Created using (i.e. list most units explicitly and then hide a lot of stuff again):
systemd-analyze dot --user gnome-session-manager@gnome.service gnome-session-monitor.service gnome-session-stable.timer gnome-session-failed.service gnome-shell-wayland.service gnome-shell-extensions-disabled-warning.service gsd-power.service | grep -vP 'gnome-login|gnome-initial-setup|dbus.socket||-\.slice|basic\.target|"|gnome\\x2dsession\\x2dmanager\.slice|gsd-(?!power)' | sed 's/darkblue/#0000c0/' | dot -Tsvg >gnome-systemd.svg
Edited by Benjamin Berg

Merge request reports