6

I have this line in my ~/.pam_environment:

PATH             DEFAULT=${HOME}/bin:${HOME}/.local/bin:${PATH}

and it worked perfectly well on Ubuntu 12.10, but since I've updated to 13.04 it is completely ignored:

$ echo $PATH
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games

Any ideas why?

Radu Rădeanu
  • 174,089
  • 51
  • 332
  • 407
szx
  • 550

1 Answers1

0

~/.pam_environment does not use the normal syntax and you should strictly follow the pam_env.conf syntax.

Note: Using .pam_environment requires a re-login in order to initialize the variables. Restarting just the terminal is not sufficient to be able to use the variables.

Source: Session-wide environment variables.

But I think that the right place to define environment variables such as PATH is ~/.profile or ~/bashrc file (if you put them here you don't need to re-login).

Radu Rădeanu
  • 174,089
  • 51
  • 332
  • 407