What are correct places for:
- Global environment variables meant to affect all users?
- User-specific environment variables?
|
What are correct places for:
|
||||
|
|
|
I think this will help you sort out |
|||||||||||||
|
|
As recommended on https://help.ubuntu.com/community/EnvironmentVariables:
Avoid the profile and rc files for setting environment variables on Ubuntu. They have caused me more headaches than they are worth. This is easier said than done however ;) It is possible that you may run into the same configuration gap that existed for me. See the workaround for encrypted home below. My
|
|
|
This is still wrong:
${HOME} won't work either. There is no expansion in .pam_environment.
– detly
Aug 7 '14 at 3:47
|
||
|
@detly there is expansion in
.pam_environment, but HOME isn't set that early usually. If that line had read DEFAULT=${PATH}/Applications/jdk, you'd have seen the value of PATH inserted in it.
– muru
Jun 8 '16 at 19:54
|
|
To add to sagarchalise's answer, I can summarize what the link suggests as appropriate places for settings. For global settings, system-wide environment variables
From the page :
Using On my system, the only interesting entry entry in profile.d is For local or per-user settings A previous version of the Ubuntu page recommended
|
|||||||||||||||||||||
|
|
You've got:
which in Lucid and Maverick run
if present, and if the user's shell is bash:
For user environment, there is a confusing array specific to the shell and whether it is considered a "login shell". If the shell is bash:
for sh/dash:
for zsh, I'm not even going to try to make sense of this. |
|||
|
|