[systemd-devel] how to use per-user systemd --user services / how to replace /etc/xdg/autostart/app.desktop?
Zbigniew Jędrzejewski-Szmek
zbyszek at in.waw.pl
Thu Jun 16 13:10:22 UTC 2016
On Thu, Jun 16, 2016 at 12:32:24PM +0000, Patrick Schleizer wrote:
> Hi!
>
> I would like to replace some /etc/xdg/autostart/app.desktop files with
> systemd --user services. I believe these are better because then systemd
> keywords such as 'After=' etc. can be used.
>
> Is this a use case systemd can be used for?
Hi,
yes, systemd --user session can be used to start various user
services, and in fact, recent gnome versions are doing exactly
that.
> Once the user logs in, the systemd --user service should start. Similar
> to like /etc/xdg/autostart mechanism works.
You can see systemd.unit(5) for the explanation of how to add services
to various targets. For systemd --user the targets are described in
systemd.special(7).
> Using Debian jessie (stable) with systemd package version 215-17+deb8u4.
>
> How to do that?
>
> Is there any difference for a login console and an X session?
You can hack on those units yourself, but this kind of general change
of how the desktop is built should be done through distribution and
upstream projects. It seems likely that just adding unit files will
not be enough, various small modifications to the programs might be
necessary. I'd suggest looking at existing user units present in
Debian, converting some more packages where this makes sense, and
submitting those unit files to the Debian maintainers to integrate
them in the distribution or upstream.
Zbyszek
More information about the systemd-devel
mailing list