On 04/07/16 21:01, Martin Pitt wrote: > A session type like "GNOME" or "KDE" then defines which top-level > servcies it wants.
Could this be done by having the .desktop file in /usr/share/xsessions or /usr/share/wayland-sessions start an appropriate systemd user unit directly, and wait for it to terminate? > Ideally we could hook the startup of graphical.slice into the system > logind scope; but as the user systemd does not "see" the > systemd users, this isn't possible. So for now pretty much the only > way is to go via an /X11/xinit/xinitrc.d (Fedora) or > /etc/X11/Xsession.d/ (Debian) script These scripts are a necessary evil for X11, but in the Wayland future, the plan (at least in GNOME) seems to be for them not to be replicated; if gdm is told to launch a session from /usr/share/wayland-sessions, it doesn't execute X11 startup script snippets. (It does have a gdm-specific way to set environment variables, and I'm planning to extend pam_env to support systemd-style .d drop-in directories to generalize that.) A more declarative session startup seems like a better session startup. I'm not sure what you do for Mir in Ubuntu, but I'd advocate a similar approach - sourcing a couple of dozen Turing-complete shell script fragments during session startup makes it rather difficult to reason about. S -- Simon McVittie Collabora Ltd. <http://www.collabora.com/> _______________________________________________ systemd-devel mailing list systemd-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/systemd-devel