.bash_profile problem

ZIYAD A. M. AL-BATLY zamb at spymac.com
Thu Apr 21 12:50:11 UTC 2005


On Thu, 2005-04-21 at 15:34 +0300, ZIYAD A. M. AL-BATLY wrote:
> On Thu, 2005-04-21 at 15:15 +0430, Behrang Saeedzadeh wrote:
> > Hi
> > 
> > I've added the following lines to my .bash_profile:
> > 
> > JAVA14_HOME=/home/behrangsa/Java/j2sdk1.4.2_08
> > JAVA50_HOME=/home/behrangsa/Java/jdk1.5.0_02
> > 
> > JAVA_HOME=$JAVA50_HOME
> > export JAVA_HOME
> > 
> > PATH=$PATH:$JAVA_HOME/bin
> > export PATH
> > 
> > But whenever I turn on my system, they aren't applied. I've to go to
> > the terminal and write source .bash_profile to activate them and only
> > for the current terminal. How can I enforce them to be applied
> > whenever the "behrangsa" user logs in?
> > 
> > - Behi
> > -- 
> > 
> > Behrang Saeedzadeh
> > http://www.jroller.com/page/behrangsa
> ~/.bash_profile is applied for login-shell(s) only (like if you login
> from the console, not when starting gnome-terminal). 
> 
> To fix this, add the following line at the top of ~/.bashrc:
>         [ -r ~/.bash_profile ] && . ~/.bash_profile
> 
> For more information, see the “INVOCATION” section of the bash manual
> page.
> 
> Ziyad.
> 
> 
To make even better, put the same line at the top of ~/.gnomerc
        [ -r ~/.bash_profile ] && . ~/.bash_profile
This way, even scripts run from other applications within GNOME (like
Nautilus scripts) will have the same settings!


(Sorry for replaying to my own message.  I just forgot to include it in
the first replay.)
Ziyad.





More information about the ubuntu-users mailing list