[YLUG] gnome-terminal

Harry Mills harry at haeg.in
Thu Apr 29 10:54:02 UTC 2010


I think .bashrc gets executed when you run a non login shell. .bash_profile
gets executed when you run a login shell.

You could always set a var and check that to see if you need to alter your
variables again. Something like

# Not sure on the syntax for this. I'm pretty sure this condition is
wrong/can be done 'more properly'
if [ "$BEENTHEREDONETHAT" == true ]; then
    exit;
fi

BEENTHEREDONETHAT=true
PATH="${PATH}:/other/bin/folder"

should work I think.

On 29 April 2010 11:01, Patrick Dupre <pd520 at york.ac.uk> wrote:

> Hello,
>
> When I run gnome-terminal from an existing gnome-terminal, both files
> .bashrc and .brash_profile are executed.
> The problem is then that the environment variables are modified again
> and again (VAR1=$VAR:blablabla) and it is stupid.
> The option "run command as a login shell" does not seems to modify
> this behavior.
> 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
> not every time that I make a gnome-terminal command ?
>
> Thank.
>
> --
> ---
> ==========================================================================
>  Patrick DUPRÉ                      |   |
>  Department of Chemistry            |   |    Phone: (44)-(0)-1904-434384
>  The University of York             |   |    Fax:   (44)-(0)-1904-432516
>  Heslington                         |   |
>  York YO10 5DD  United Kingdom      |   |    email: pd520 at york.ac.uk
> ==========================================================================
> _______________________________________________
> York mailing list
> York at lists.lug.org.uk
> https://mailman.lug.org.uk/mailman/listinfo/york
>
>


-- 
Regards,
Harry Mills
http://haeg.in

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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.lug.org.uk/pipermail/york/attachments/20100429/c8fa4782/attachment.htm 


More information about the York mailing list