HiRe: [wplug] Environment Variables

Paul Armor parmor at gravity.phys.uwm.edu
Tue Apr 8 14:04:25 EDT 2008


Hi,

On Tue, 8 Apr 2008, Mackenzie Morgan wrote:

> On Tue, 2008-04-08 at 13:46 -0400, Weber, Lawrence A wrote:
>>
>> Distro: Fedora Core 6
>> Shell: BASH
>>
>> I no long seem to be able to permanently set or export environment
>> variables.  Any change, var=varvalue and then export var, will only be
>> in effect for the duration of the shell instance.  It will not be in
>> effect for additionally opened terminals or if the terminal is closed
>> and reopened.  I checked .bashrc and .bash_profile to see if they were
>> overwriting the variables but that is not the case.  I tried this for
>> both root and user.  The same condition occurs when I try to create a
>> new variable.  It has not been a good week for me with any PC.
>
> I'm pretty sure that's how it always works.  You have to add it to
> your .bashrc to make them permanent.

I'd guess that you're using gnome and gnome-terminal, with which 
there's something that can be confusing; gnome's terminal program 
changed its default behaviour a while ago (FC3 or 4?) and new terminals 
opened do not act as a new login shell (so recent changes are not caught): 
so if you log into gdm, open a terminal, twiddle with bashrc or 
bash_profile, and you expect newly opened term's to have those changes 
affect the new term's behaviour... that won't be the case.  You have to 
log out of your session, and log back in; or change the default behaviour 
of your term's by launching a term, editing the default profile and under 
Title and Command set it to "Run command as a login shell".

If you're not using gnome/gnome-terminal, you'll probably need to find 
that analogous setting as I'd guess your new terms/shells are picking up 
the changes to your env.

Hope that helps!
Paul


More information about the wplug mailing list