Esta documentação do Ubuntu fala sobre ~/.pam_environment
:
Session-wide environment variables
Suitable files for environment variable settings that should affect just a particular user (rather than the system as a whole) are
~/.pam_environment
and~/.profile
. After having edited one of those files, you should re-login in order to initialize the variables.
~/.pam_environment
This file is specifically meant for setting a user’s environment. It is not a script file, but rather consists of assignment expressions, one per line. This example sets the variable FOO to a literal string and modifies the PATH variable:
FOO=bar PATH DEFAULT=${PATH}:${HOME}/MyPrograms
Note:
You may not quote the value when doing a simple variable assignment like the
FOO=bar
example.The syntax used for modifying PATH, which syntax differs from script files, is required for variable expansion to work.
~/.pam_environment
is written to when you use various GUIs to set the language or regional formats. Consequently, if you for instance set LC_TIME by editing~/.pam_environment
manually, your entry will be overwritten if you afterwards use the Language Support GUI to change the regional formats setting.
Este arquivo, assim como /etc/environment
, parece ser consultado por pam_env.so
que acredito aconteceria como parte do processo de login e seria separado de qualquer shell.