Hello,
I want to add some directory to $PATH for each user. In the past, I
added a file /etc/profile.d/path.sh, but that doesn't work any more,
only when I manually start bash as login shell (or modify the setting of
gnome-terminal).
My next attempt was to use systemd's /etc/environment.d/path.conf
PATH=${PATH}:/opt/vendor/product/bin
XPATH=${PATH}:/opt/vendor/product/bin
but that doesn't work either. While XPATH appears, PATH is still the
default.
systemctl show-environment --user
PATH=/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games
NCP_PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/opt/ncp/clnt/bin:/opt/ncp/clnt/bin
To be honest, I'm quite confused where that default path is defined.
Even when I modify /etc/login.defs (ENV_PATH) or /etc/profile, I still
get the default value.
Of course I can edit my own ~/.bashrc or /etc/bashrc, but that's not
what I want since then only bash gets the PATH environment, not other
shells or other programs.
Can somebody help me, please? Thanks a lot.
Kind regards,
Bernhard