I am launching the gnome-terminal and I am working in a specific path For example: /home/user/programs/c/. Now I am opening another tab. When I am opening the new tab it is also in the same path. i.e. the new tab's pwd will be /home/user/programs/c/ But what I want is when I am opening a new tab its pwd should be /home/user. How can I achieve this? Any help much appreciated. Thanks in Advance!

link|improve this question
feedback

migrated from stackoverflow.com Mar 28 '10 at 13:19

This question came from our site for professional and enthusiast programmers.

1 Answer

There doesn't seem to be any way to override this behaviour from withing gnome-terminal itself. The easiest workaround that I have found is to add an explicit cd to your ~/.bashrc file.

echo 'cd $HOME' >> ~/.bashrc

Then when you open a new tab, it will change the current directory back to your home directory.

link|improve this answer
Nice fix. I hope they will integrate it in the next version of Gnome Terminal. Konsole is my primary terminal emulator, though. :-) – Alan Haggai Alavi Jun 1 '10 at 15:04
feedback

Your Answer

 
or
required, but never shown