[systemd-devel] Installing user unit files.

Zbigniew Jędrzejewski-Szmek zbyszek at in.waw.pl
Mon Dec 8 12:05:29 PST 2014

On Mon, Dec 08, 2014 at 08:51:43PM +0100, Rüdiger Sonderfeld wrote:
> 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 [1] 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.
> > 
> > [1]
> > http://www.freedesktop.org/software/systemd/man/systemd.unit.html#Unit%20Lo
> > ad%20Path
> It would then be up to the user to either adjust the install path or copy the 
> file or adjust their systemd configuration.
This part of systemd configuration can only be done be recompling, and
systemd --user instances use the binary installed in /usr/lib/systemd/,
so changing the directory is not possible without root privileges anyway.

> But it would avoid the trouble of 
> writing outside the user specified $prefix.
Yes, but it would require manual fixups and would make the installed file
useless without further steps. It's a tradeoff ;)


More information about the systemd-devel mailing list