[systemd-devel] systemd user unit - how to prepare environment?

Lennart Poettering lennart at poettering.net
Wed Sep 12 09:20:45 UTC 2018


On Mi, 12.09.18 10:15, Peter Hoeg (peter at hoeg.com) wrote:

> Hi,
> 
> > > > So my question is, where to init variables for user units?
> > > > I woluld like to have possiblity to set them as not only as fixed
> > > > strings
> > > >
> > > > (i.e. I would to have PATH=$PATH:xxx)
> > 
> > You can add them to ~/.config/systemd/user.conf in the Environment=
> > field in the [Manager] section, see systemd-system.conf(5).x
> 
> How does this compare to man 5 environment.d ?

You can use that too. Difference is mainly that user.conf is what
systemd itself reads.

Lennart

-- 
Lennart Poettering, Red Hat


More information about the systemd-devel mailing list