I am left baffled how to correctly set PATH under Gnome Wayland (using Manjaro 19.x)

I want to set PATH=${HOME}/bin:${PATH}:${GOROOT}/bin

GOROOT is set in .config/environment.d/go.conf as


What I tried:

  • $HOME/.pam_environment:

    PATH DEFAULT=${HOME}/bin:${PATH}:${GOROOT}/bin

    PATH is somehow set: $HOME/bin is added twice (why?) and the expansion of GOROOT doesn't happen. It seems that systemd setting environment variables in $HOME/.environment.d/*.conf happens later than pam?

  • $HOME/.config/environment.d/*.conf works for many variables I try to set in there but PATH is ignored.

  • setting PATH in .profile is ignored

  • 1
    Do you have a ~/.bash_profile file? If you do, and use bash, ~/.profile would be ignored. – Kusalananda Apr 5 '20 at 10:25
  • 1
    Yes, that DID work! I am really astonished that this works as I am a relatively new Wayland Plasma --> Wayland Gnome convert and setting environment variables in bash* config files did not work there. Still confused as why setting PATH in config/envirionemnt.d/*.conf does not work. – JohnDoe Apr 5 '20 at 15:35
  • You are consistently misspelling "environment" as "envirionemnt" or "environemnt" maybe that's why? – Kusalananda Apr 5 '20 at 15:37
  • Yes, misspelled, sorry, on the file system I use environment – JohnDoe Apr 5 '20 at 15:41

The comment of John Doe is the correct answer: setting PATH in .profile works if there's no .bash_profile.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.