Gnome-terminal follows symbolic links instead of staying in the current directory when opening a new tab

Bug #263637 reported by François Ingelrest on 2008-09-01
52
This bug affects 10 people
Affects Status Importance Assigned to Milestone
GNOME Terminal
Fix Released
Medium
gnome-terminal (Ubuntu)
Low
Ubuntu Desktop Bugs

Bug Description

Binary package hint: gnome-terminal

1) cd /tmp
2) mkdir -p A/AA
3) mkdir B
4) cd B
5) ln -s ../A/AA
6) cd AA

The current directory is /tmp/B/AA. Open a new tab, you're now in /tmp/A/AA.

François Ingelrest (athropos) wrote :

This happens all the time to me, because in my job I write a lot of research papers, all of them being in a Subversion repository. Since I like to use a different hierarchy than the other people I'm working with, I've got a separate directory with many symbolic links, organized in a different way (I store them by year). Each time I open a new tab, I'm back in the SVN repository. That's quite annoying.

Pedro Villavicencio (pedro) wrote :

confirming, seems to be a problem only with gnome-terminal, terminator and xterm works fine.

Changed in gnome-terminal:
assignee: nobody → desktop-bugs
importance: Undecided → Low
status: New → Triaged
Pedro Villavicencio (pedro) wrote :

that's issue C in bug http://bugzilla.gnome.org/show_bug.cgi?id=502146 ; according to the upstream authors is not possible to fix that, can you comment on that report if you're interested on it? thanks.

François Ingelrest (athropos) wrote :

I've added a comment, thanks for the link.

Changed in gnome-terminal:
status: Unknown → Confirmed
Changed in gnome-terminal:
importance: Unknown → Medium
Changed in gnome-terminal:
status: Confirmed → Fix Released
Rob Parker (rfdparker) wrote :

I can confirm this is still an issue in Ubuntu 12.04[.3] with the current gnome-terminal 3.4.1.1-0ubuntu1 package.

Are there any plans for this to be fixed in 12.04?

Marius Gedminas (mgedmin) wrote :

This is still a problem in Ubuntu 17.10, if your shell doesn't use OSC 7 to inform gnome-terminal about the current working directory.

In theory /etc/profile.d/vte-2.91.sh should set it up automatically, but for some reason that doesn't happen for me. I think that reason is because in Ubuntu gnome-terminal doesn't launch login shells by default, and thus /etc/profile is ignored.

I don't know why the commits from 2012 that are supposed to check $PWD do not work any more. Perhaps a newer version removed them, when the OSC 7 was deemed to be the correct solution?

Marius Gedminas (mgedmin) wrote :

I've just noticed that Debian carries a patch for reading the working directory from /proc if OSC 7 was not in use. This patch doesn't have the "let's look for $PWD in the environment" logic that was supposed to fix this bug.

See https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=712628

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.