[wplug] Managing Environment Variables - Follow-up

Weber, Lawrence A Lawrence.Weber at ansaldo-sts.us
Tue Dec 1 07:06:46 EST 2009


I thought that .bash_profile was read once at login and that .bashrc was
read every time a shell was opened? 

-----Original Message-----
From: wplug-bounces+lawrence.weber=ansaldo-sts.us at wplug.org
[mailto:wplug-bounces+lawrence.weber=ansaldo-sts.us at wplug.org] On Behalf
Of Jonathan Billings
Sent: Monday, November 30, 2009 3:56 PM
To: General user list
Subject: Re: [wplug] Managing Environment Variables - Follow-up

On Mon, Nov 30, 2009 at 02:54:50PM -0500, Weber, Lawrence A wrote:
> I discovered
> that even if I removed the environment variables from my .bashrc file 
> that the variables still had valid values when I exited and re-entered

> a new terminal.  I search all files in my home directory and in /etc 
> but could not find a source for the variables.  I could change their 
> values but when I re-entered a terminal, they had the old values.  I 
> checked to confirm that .bash_profile has never been changed.

If you just exited your terminal windows and didn't log out completely,
I am not surprised that the variables were still set.

When you log in, either at the text console or in a graphical
environment, your session is started by a shell.  In a graphical
environment, that shell simply runs a script that starts up
Gnome/KDE/whatever.  The login shell read in your .bashrc when it starts
up and continues to have those variables set until the session closes. 
Your login shell's environment is exported to all subshells it starts. 


--
Jonathan Billings <billings at negate.org>
_______________________________________________
wplug mailing list
wplug at wplug.org
http://www.wplug.org/mailman/listinfo/wplug



More information about the wplug mailing list