[systemd-devel] User systemd unit files

Colin Guthrie gmane at colin.guthr.ie
Thu Sep 11 02:03:33 PDT 2014


Chris Morgan wrote on 11/09/14 02:32:
> 
> On Sep 10, 2014 5:46 PM, "Zbigniew Jędrzejewski-Szmek"
> <zbyszek at in.waw.pl <mailto:zbyszek at in.waw.pl>> wrote:
>>
>> On Tue, Sep 09, 2014 at 07:39:17PM -0400, Chris Morgan wrote:
>> > >> >> Specifically, running `systemd --user` directly is not supported
>> > >> >> anymore. The user mode still works, but only for one "user"
> instance
>> > >> >> per UID, launched through user@<uid>.service (recent releases
> start
>> > >> >> this automatically upon logging in).
>> > > Try 'systemctl --user'. If this start you can put units
>> > > it ~/.config/systemd/user/ or a similar path (check
> systemd.unit(5) out).
>> > >
>> > > Zbyszek
>> >
>> > I tried --user but I get some errors that I pasted above. It looks
>> > like it is no longer supported but I'm not sure.
>>
>> If you're getting the same message as above, you are still typing
>> systemd instead of systemctl.
>>
>> Zbyszek
> 
> Ahh. The man page seemed to indicate that one should run systemd with
> --user first.
> 
> I was able to run unit files via systemctl --user but the
> SYSTEMD_USER_PATH environment variable doesn't seem to be working, even
> though it is mentioned in the man page. 

Where are you setting this path? If "systemd --user" is already running
(which happens automatically with newer systemd's) then you have to make
sure *it* knows about the env var, not just the client side calls in.

This *might* work, but I don't know for sure as I've not fiddled with
this stuff.

systemctl --user set-environment SYSTEMD_USER_PATH=$HOME/somegitrepo/units/
systemctl --user daemon-reload


Col

-- 

Colin Guthrie
gmane(at)colin.guthr.ie
http://colin.guthr.ie/

Day Job:
  Tribalogic Limited http://www.tribalogic.net/
Open Source:
  Mageia Contributor http://www.mageia.org/
  PulseAudio Hacker http://www.pulseaudio.org/
  Trac Hacker http://trac.edgewall.org/


More information about the systemd-devel mailing list