Unix - Set System Environment Variable shouldn't use ~/.profile
From the doc:
"Set environment variables on the end userís system. Compatible with Windows and Unix only. Unix Bash, sh, ksh, zsh, csh, and tcsh shells are supported."
Under Ubuntu and RedHat with Bash, the task defines my environment variable into ~/.profile.
From the bash documentation http://mywiki.wooledge.org/DotFiles :
"Now, since bash is being invoked as a login shell (with name "-bash", a special ancient hack), it reads /etc/profile first. Then it looks in your home directory for .bash_profile, and if it finds it, it reads that. If it doesn't find .bash_profile, it looks for .bash_login, and if it doesn't find that, it looks for .profile (the standard Bourne/Korn shell configuration file)"
I DO have a ~/.bash_profile, which is quite common actually. So ~/.profile never gets read and I don't have my environment variables defined when using a login shell.
Am I missing something?
Shouldn't it be at least defined in the ~/.<user_shell>rc file?
Originally Posted by benjamin.jaton
You got any solution for this issue?
Have you tried Set Environment Variable for All users?
I think that I used a "hack" by sourcing the .profile file in the .bash_profile.
InstallAnyWhere 2012 Ent. has a fix for that.
It's too bad their didn't backport it in earlier versions.
@Masudkhan: I don't think that would work, you would probably need superuser privileges to achieve that and change the /etc/profile.
#pv7721: how do you change the .bash_profile? custom script? This could have other side effects.