[systemd-devel] systemd --user environment
David Herrmann
dh.herrmann at gmail.com
Fri Aug 29 03:54:30 PDT 2014
Hi
On Fri, Aug 29, 2014 at 12:45 PM, arnaud gaboury
<arnaud.gaboury at gmail.com> wrote:
> systemd 216-1
>
>
> I start to play with systemd/user. I understand that the user instance
> does not inherit from all my environment variables listed by the
> printenv command. When a variable is needed for a service, I add a
> /etc/systemd/system/user at .service.d/myService.conf drop-In file with
> the Environment=myVariable.
> I can also edit /etc/environment, or /etc/systemd/user.conf
>
> Is there any way to define a per user environment file somewhere in my
> user home directory, so I can add variables?
systemd run with --system reads config-files from /etc/systemd/system/
and equivalents (in /usr, /run, ...). If run with --user, it reads
from /etc/systemd/user/ and equivalents (/usr, /run, ...).
Additionally, --user also adds the home-directory of the user as
source: ~/.config/systemd/user/
So I guess, what you want to do is to create a file in:
~/.config/systemd/user/your_service.conf.d/your_drop_in_file.conf
Thanks
David
More information about the systemd-devel
mailing list