[systemd-devel] User systemd unit files

Lennart Poettering lennart at poettering.net
Wed Oct 22 09:20:27 PDT 2014


On Thu, 11.09.14 07:07, Chris Morgan (chmorgan at gmail.com) wrote:

> Hmm. I figured that the environment was used when the systemd user
> instance was started.
> 
> I tried systemctl --user set-environment and it shows up if I use
> show-environment but even if I use SYSTEMD_UNIT_PATH (I was typing on
> mobile and mistakenly typed USER instead of UNIT), and reloaded the
> daemon it doesn't appear to be taking effect, the test unit file I
> created isn't located.

SYSTEMD_UNIT_PATH should still work. You have to specify it in the
user at .service template unit file, then reload the daemon and restart
that service. Otherwise it will not take effect. Make sure to then
check if it is properly set by looking at /proc/$PID/environ for the
systemd user instance.

That all said, for testing purposes systemd-nspawn is probably the
much better idea. I mean, we wrote it only for the purpose of
testing...

Lennart

-- 
Lennart Poettering, Red Hat


More information about the systemd-devel mailing list