Am 20.07.2017 um 23:24 schrieb Stefan Tatschner:
> Subject: systemd: Setting PATH with environment.d does not work
> Package: systemd
> Version: 234-1
> Severity: normal
> 
> Dear Maintainer,
> 
> Setting the $PATH variable with systemd's environment.d feature does not work
> as expected. I have this content in my
> `~/.config/environment.d/99-defaults.conf`:
> 
> ```
> GOPATH=$HOME/Go
> PATH1=$GOPATH/bin:$HOME/.cargo/bin:$HOME/.local/bin:$PATH
> PATH=$GOPATH/bin:$HOME/.cargo/bin:$HOME/.local/bin:$PATH
> ```
> 
> After a login in gnome3 I expect to see `$PATH` and `$PATH1` to be equal; with
> expanded `$GOPATH` prepended.
> 
> On a shell I get this instead:
> 
> ```
> $ printenv PATH PATH1 GOPATH
> /usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games
> /home/stefan/Go/bin:/home/stefan/.cargo/bin:/home/stefan/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
> /home/stefan/Go
> ```
> 
> ```
> $ systemctl --user show-environment
> ...
> GOPATH=/home/stefan/Go
> PATH1=/home/stefan/Go/bin:/home/stefan/.cargo/bin:/home/stefan/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/u
> PATH=/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games
> ...
> ```
> 
> `$PATH` seems to be hardcoded somewhere which overwrites my setting; important
> fact: I use gnome on **wayland**. So I have no shellscripts that are being
> exectued during login.
> 

The PATH you have above is not hard-coded in systemd afaics.
To me this looks like PATH is set somewhere outside of systemd and then
pushed into the systemctl --user environment.

Attachment: signature.asc
Description: OpenPGP digital signature

_______________________________________________
Pkg-systemd-maintainers mailing list
Pkg-systemd-maintainers@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-systemd-maintainers

Reply via email to