[systemd-devel] Installing user unit files.
ruediger at c-plusplus.de
Mon Dec 8 11:51:43 PST 2014
On Monday 08 December 2014 19:40:14 Zbigniew Jędrzejewski-Szmek wrote:
> This destination must be know to systemd. So anything generic like ~/usr
> is unlikely to work, unless systemd is modified to check that directory too.
> When installed as a user, it should go to $HOME/.local/share/systemd/user/.
> Please see  for an up-to-date list of directories where user units are
> loaded from. The ones in $XDG_CONFIG_HOME are for user overrides, so
> .local/share/ seems the most appropriate.
It would then be up to the user to either adjust the install path or copy the
file or adjust their systemd configuration. But it would avoid the trouble of
writing outside the user specified $prefix.
The options could be:
- prefix (meaning install it to the datadir)
- auto (meaning install it to whatever pkg-config says)
- no (don't install it)
- <path> (install it to that path)
With prefix being the default. That would probably be the least surprising
way for users. But of course it would make the feature a bit harder to
discover and require the user to do additional steps during installation and
potentially during removal as well.
More information about the systemd-devel