This website uses cookies. By clicking Accept, you consent to the use of cookies. Click Here to learn more about how we use cookies.
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
- Revenera Community
- :
- InstallAnywhere
- :
- InstallAnywhere Forum
- :
- Unix - Set System Environment Variable shouldn't use ~/.profile
Subscribe
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
May 03, 2012
04:27 PM
Unix - Set System Environment Variable shouldn't use ~/.profile
Hi,
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 ~/.rc file?
Thanks
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 ~/.
Thanks
(5) Replies
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
Jan 02, 2013
07:04 AM
benjamin.jaton wrote:
Hi,
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 ~/.rc file?
Thanks
Hi Benjamin,
You got any solution for this issue?
Regards,
Padma.R
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
Jan 02, 2013
11:54 PM
Have you tried Set Environment Variable for All users?
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
Jan 24, 2013
03:35 AM
I think that I used a "hack" by sourcing the .profile file in the .bash_profile.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
Apr 15, 2013
02:01 PM
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.
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.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
Jul 09, 2013
04:07 PM
No, no custom code, just as the last line add a source .profile line