Re: Problems exporting PATH after modified.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Monday, Dec 15th 2003 at 08:39 -0500, quoth ne...:

=>On Dec 15, 2003 at 13:38, Jacques Escape in a soothing rage wrote:
=>
=>>Hi,
=>>
=>>I'm having some problems exporting the PATH environmental variable
=>>after I have modified it in the Terminal that comes with KDE.
=>>
=>>What I do is I modify the PATH variable, and then export it. After
=>>this when I call "echo $PATH" the output displays the new modified 
=>>string. BUT as soon as I log-out and log-in again the new modified 
=>>PATH is gone and replaced by the original.
=>That is the correct behaviour. You need to add the
=>PATH statement to your shell resource config file.
=>For the bash shell use ~/.bash_profile or ~/.bashrc.
=>
=>N.Emile...

Please do *not* simply add it to the .bashrc. The proper way to do it is 
to set your PATH in a .bash_path and have that .bash_path sourced in by 
the .bash_profile. Also, you want to test your PS1 variable in your 
.bashrc to see if it has a value. If it does not you should source in your 
.bash_path. This is so that rsh/ssh commands will have a proper value for 
PATH even though the process is not a login process.

Here's the recap:


.bash_path

export PATH=zumzinggood:zumzingelzegood

.bash_profile

. ~/.bash_profile

.bashrc

if [[ -n "$PS1" ]]
then
    # set some useful aliases
    # but no environment variables.
else
    . ~/.bash_profile
fi


-- 
Time flies like the wind. Fruit flies like a banana. Stranger things have  .0.
happened but none stranger than this. Does your driver's license say Organ ..0
Donor?Black holes are where God divided by zero. Listen to me! We are all- 000
individuals! What if this weren't a hypothetical question?
steveo at syslang.net




[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux