Red Hat Bugzilla – Bug 136353
Need option to not use same working dir on new tab
Last modified: 2007-11-30 17:10:52 EST
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.3)
Description of problem:
gnome-terminal uses the same current working directory for all new tabs.
Is this a bug?
If not, can there be a (possibly per-profile) option to disable this?
Version-Release number of selected component (if applicable):
Steps to Reproduce:
It seems like reasonable behavior to me, so I don't think it is a bug.
You can alter the behavior for a specific profile by setting the
profile to run a custom command and putting something like:
sh -c "cd /tmp; $SHELL -l"
I hope that helps.
I don't agree.
gnome-terminal allows a new shell to be launched under a new tab.
You would expect that opening a shell will put you in your home
directory, just as opening a new gnome-terminal window, or a new xterm
window or a new console screen does.
But gnome-terminal doesn't follow this normal behaviour, making it's
behaviour a bug (or a perhaps even a "feature").
I can't see why there shouldn't be an option to turn it off.
I can certainly see your point of view. On the other hand, all
features bring with them a certain amount of associated cost
(implementation time, maintenance cost, documentation) and a certain
amount of risk (code interaction issues, confusion for the user, etc).
This means that new feature requests need to be weighed very
carefully against the potential downsides.
In any event, the requested feature, if added, would be valuable to
GNOME in general, rather than just for Fedora users. If you feel that
the added option would be beneficial to gnome-terminal, it probably
makes sense to file the bug upstream. You can do that here:
Before you do that, you may find Havoc Pennington's essay, "Free
software maintenance: Adding Features", a useful read.
As a side note, if you always want your terminal to start in your home
directory, a simple way to achieve this for all terminals would be to
simply add the command "cd" to your .bash_profile. Your .bash_profile
will get executed every time a login bash prompt is started.
You can do this quite easily by typing:
echo "cd" >> ~/.bash_profile from any open terminal.
Hope that helps.
Havoc's essay can be found here:
Hm.. Havoc's essay doesn't address misfeatures.
> Thus the maintainer must understand why the feature exists,
> in detail.
On the other hand, Havoc's essay does address maintenance quite a bit.
Adding a hack, short and simple though it is, to ~/.bash_profile
affects other programs that read that file.
From a maintenance point of view for me, this hack, which is not
specific to gnome-terminal, shouldn't be needed.
The feature that gnome-terminal offers is non-standard. I'd like to
turn it off without a hack please.
It's not clear to me why you feel that the current behavior is a
misfeature. As I see it, when you spawn a new terminal tab at any
given time there are three possibilities:
1) you want to go to some other directory
2) you want the current working directory to stay the same
3) you want to go back to your home directory
In the case of 1) it doesn't matter which behavior is chosen because
you are going to be switching directories anyway.
In the case of 2) if the behavior is changed such that new terminal
tabs always start in your home directory, then you will need to type a
potentially long command to get back to the directory you were working
in. On the other hand, if the behavior is as it currently is, then
you don't need to do anything.
In the case of 3) if the bahavior is changed such that new terminal
tabs always start in your home directory, then you won't need to do
anything. On the other hand, if the behavior is as it currently is,
you will need to type a very short command: "cd<enter>".
So by keeping the behavior as it currently is, the potential for extra
work on the user is minimized.
Adding an option doesn't really help here, because if the user has the
option flipped on then when they run into case 2, they are stuck doing
the extra work. You could alleviate this problem by having two
profiles one with the feature on and one with the feature off, but if
you are going to go through the effort of setting up profiles then
following the procedure in Comment 1 isn't really much more work.
Nevertheless, if you still feel that adding an option to control this
behavior is useful, I encourage you to file a report upstream. If the
feature gets added upstream, it will be end up in some future Fedora
If you do choose to file upstream, please provide a link to this
report in the upstream bug tracker and provide a link to the upstream
bug report here.