I think .bashrc gets executed when you run a non login shell. .bash_profile gets executed when you run a login shell.<br><br>You could always set a var and check that to see if you need to alter your variables again. Something like<br>
<br># Not sure on the syntax for this. I'm pretty sure this condition is wrong/can be done 'more properly'<br>if [ "$BEENTHEREDONETHAT" == true ]; then<br> exit;<br>fi<br><br>BEENTHEREDONETHAT=true<br>
PATH="${PATH}:/other/bin/folder"<br><br>should work I think.<br><br><div class="gmail_quote">On 29 April 2010 11:01, Patrick Dupre <span dir="ltr"><<a href="mailto:pd520@york.ac.uk">pd520@york.ac.uk</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">Hello,<br>
<br>
When I run gnome-terminal from an existing gnome-terminal, both files<br>
.bashrc and .brash_profile are executed.<br>
The problem is then that the environment variables are modified again<br>
and again (VAR1=$VAR:blablabla) and it is stupid.<br>
The option "run command as a login shell" does not seems to modify<br>
this behavior.<br>
IS there a way to have the .bashrc and .bash_profile (or only one of them) runned only one time (when the gnome-session is started) and<br>
not every time that I make a gnome-terminal command ?<br>
<br>
Thank.<br>
<br>
-- <br>
---<br>
==========================================================================<br>
Patrick DUPRÉ | |<br>
Department of Chemistry | | Phone: (44)-(0)-1904-434384<br>
The University of York | | Fax: (44)-(0)-1904-432516<br>
Heslington | |<br>
York YO10 5DD United Kingdom | | email: <a href="mailto:pd520@york.ac.uk" target="_blank">pd520@york.ac.uk</a><br>
==========================================================================<br>_______________________________________________<br>
York mailing list<br>
<a href="mailto:York@lists.lug.org.uk">York@lists.lug.org.uk</a><br>
<a href="https://mailman.lug.org.uk/mailman/listinfo/york" target="_blank">https://mailman.lug.org.uk/mailman/listinfo/york</a><br>
<br></blockquote></div><br><br clear="all"><br>-- <br>Regards,<br>Harry Mills<br><a href="http://haeg.in">http://haeg.in</a><br><br>If you don't have a good feel for the growth rate of powers of 2, then a little old man will save your daughter, and you'll grant him anything you want in your kingdom, and he'll say he just wants one grain of rice on the first square of a chessboard, then 2 in the second, 4 on the third, and so on. And then: you'll be all out of rice. <br>