|
Don't some distros have some sort of autoconfiguration tools that might overwrite .profile? That's the reason of why I didn't do there in the first place
-Chris Alvarez
Chris Alvarez [EMAIL PROTECTED] ext. 1-3837 IS&T Web Applications Services Novell, Inc., the leading provider of information solutions http://www.novell.com >>>[EMAIL PROTECTED] 08/13 9:13 am >>> * Andrew McNabb [Thu, 12 Aug 2004 at 17:36 -0600]
<quote>
>On Thu, Aug 12, 2004 at 02:09:44PM -0600, Chris Alvarez wrote:
>>I've a question about exporting. In my .bashrc file I have the
>>following:
>>
>>export ECLIPSE_HOME=/opt/eclipse
>>export PATH=$PATH:$ECLIPSE_HOME:.
>>
>>if i do that, for some reason the things that I try to append to the
>>path get repeated in it.
>>
>>>echo$PATH
>>/home/calvarez/bin:/usr/local/bin:/usr/bin:/usr/X11R6/bin:/bin:<bla bla
>>blah, more stuff>:/opt/eclipse:.:/opt/eclipse:.:/opt/eclipse:.
>
>Here's one possible explanation (I can't verify it for sure, though):
>every time Bash is started it inherits the environment of its parent
>process. If you start Bash from within another instance of Bash, you'll
>get the effect you described.
>
>I would recommend setting the entire PATH in your .bashrc. For example,
>my .zshrc has the following line:
>
>export PATH="/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/network/bin:$HOME/bin:/usr/bin/X11:/usr/games/bin"
>
</quote>
Another possible solution is to set the path in your .profile instead of
.bashrc. The difference between .profile and .bashrc is .bashrc gets sourced
everytime you open a new terminal, eg for every xterm you open. .profile,
however, gets sourced once per login session. So if you login into your
wm or Desktop, your path and such are set then, and when you open a terminal
your not logging in because you already are, so .profile isn't sourced again.
This is one of those things that's really nice to know, but doesn't lend
itself to conspicuous discovery.
|
_______________________________________________ newbies mailing list [EMAIL PROTECTED] http://phantom.byu.edu/cgi-bin/mailman/listinfo/newbies
