[systemd-devel] how to use per-user systemd --user services / how to replace /etc/xdg/autostart/app.desktop?

Martin Pitt martin.pitt at ubuntu.com
Fri Jun 24 14:02:30 UTC 2016


Mantas Mikulėnas [2016-06-16 16:03 +0300]:
> So I would create a separate graphical.target and manually `systemctl
> start` it via .xprofile or such. (Don't forget, also, that graphical
> programs usually need $DISPLAY, and this is only imported to the --user
> manager /after/ default.target has already started.)

That's in fact my current schema too. We want to convert the Ubuntu
user session from (session) upstart to (per-user) systemd units, and
my current prototype [1] defines a "graphical.slice", the actual
services hook into that (or perhaps into a subslice like
graphical-xfce.slice), and the whole Xsession gets wrapped into
starting/stopping the per-session-type slice [2].

It's still a prototype (work on this is postponed until end of July on
a sprint), but so far this works reasonably well.

Martin

[1] https://git.launchpad.net/~pitti/+git/systemd-graphical-session/tree/
[2] https://git.launchpad.net/~pitti/+git/systemd-graphical-session/tree/usr/share/systemd-graphical-session/session-wrapper
-- 
Martin Pitt                        | http://www.piware.de
Ubuntu Developer (www.ubuntu.com)  | Debian Developer  (www.debian.org)


More information about the systemd-devel mailing list