Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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!

share|improve this question

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

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

    
Same problem, I'd like the old behavior. No options in dconf. - From user1585507 –  Canadian Luke May 3 '13 at 20:56
add comment

2 Answers 2

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.

share|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
    
Alan, actually it's a feature that GNOME terminal starts new tabs in the current directory. –  Paolo Bonzini Mar 21 '13 at 12:49
    
@PaoloBonzini, indeed I agree, it's a feature. Unfortunately the behaviour seems to have changed with Gnome 3.8. How do I get back the old behaviour? –  Magnus Apr 29 '13 at 10:57
add comment

Same as here

The solution is to check "Run command as a login shell" in the preferences. It worked for me.

Check the FAQ

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.