Since my .bashrc
contains a lot of aliases, variables and lot of other stuff that changes the behavior of bash, from time to time I want to run gnome-terminal
without sourcing it. I wonder if there's some easy way how to do this without the need to temporarily rename .bashrc
or delete its contents.
Open gnome-terminal without sourcing .bashrc
4k Views Asked by user2044638 At
2
There are 2 best solutions below
0

Another option, besides the one already mentioned (bash --norc
) is a simple evaluation in the beginning of your ~/.bashrc
and skip the rest in case you're running inside a gnome terminal.
For example, you might rely on the fact that other terminal emulators and remote SSH logins as well as local logins from virtual consoles don't set variable COLORTERM
. Armed with this little bit of information you could just wrap everything in your ~/.bashrc
inside a conditional statement:
if [ "$COLORTERM" != 'gnome-terminal' ]; then
# all your current stuff in ~/.bashrc
fi
That way you don't have to rely to gnome terminal settings, in case you don't want to.
You can run
bash
without sourcing.bashrc
:Then it is just a matter of creating a
gnome-terminal
profile which runs thatbash
command, rather than the default.