Skip to content

systemd --user preparation work

Iain Lane requested to merge wip/laney/systemd-user into master

Here's a bunch of stuff to prepare the ground for systemd --user launched sessions.

  • Add a program to do the actual launching. When we prototyped this in Ubuntu yakkety (16.10), we had a shell script to clean up any stray units and set the environment up, etc. I've made a C program to do this now, and it's what sessions will use. This is deliberately quite separate from gnome-session itself, which under this scheme becomes another component of the session.
  • Allow RequiredComponents to be ignored. If we do this then we can make the transition stepwise. Sessions can be launched by gnome-session, which will use RequiredComponents, but the systemd units will pass --ignore-required-components and then they won't be used.
  • Let SetEnv work when the session is initialised. Maybe there's a better way to achieve this part, but I needed a way to have SetEnv work, so that Shell can upload $DISPLAY etc into the environment, so that XWayland works.
  • Find the logind session by asking logind instead of asking sd_pid_get_session(), since we might not be /in/ the session.
  • And finally, add some units. The structure I came up with is explained in the commit message there. It might need tweaking at some point, but it works like this.

All of this should be safe to merge right away, but please do check.

I could split this up into separate MRs if you'd prefer it like that.


Edited by Iain Lane

Merge request reports