Bug 136353 - Need option to not use same working dir on new tab
Summary: Need option to not use same working dir on new tab
Alias: None
Product: Fedora
Classification: Fedora
Component: gnome-terminal
Version: 3
Hardware: All
OS: Linux
Target Milestone: ---
Assignee: Ray Strode [halfline]
QA Contact:
Depends On:
TreeView+ depends on / blocked
Reported: 2004-10-19 14:04 UTC by Need Real Name
Modified: 2007-11-30 22:10 UTC (History)
0 users

Clone Of:
Last Closed: 2004-11-15 15:44:12 UTC

Attachments (Terms of Use)

Description Need Real Name 2004-10-19 14:04:28 UTC
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):

How reproducible:

Steps to Reproduce:

Additional info:

Comment 1 Ray Strode [halfline] 2004-11-10 19:43:44 UTC

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.

Comment 2 Need Real Name 2004-11-10 21:04:52 UTC
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.

Comment 3 Ray Strode [halfline] 2004-11-15 15:44:12 UTC

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.

Comment 4 Ray Strode [halfline] 2004-11-15 15:45:37 UTC
Havoc's essay can be found here:


Comment 5 Need Real Name 2004-11-15 16:02:23 UTC
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.

Comment 6 Ray Strode [halfline] 2004-11-15 16:37:31 UTC

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.


Note You need to log in before you can comment on or make changes to this bug.