Description of problem: Somewhere between gnome-terminal-2.24.3 and gnome-terminal-2.26.1, gnome-terminal's CWD changed to / and now it seems like terminal_screen_get_current_dir is returning / when it can't chdir to the target working dir. Version-Release number of selected component (if applicable): gnome-terminal-2.26.1-1.fc11.x86_64 How reproducible: Always Steps to Reproduce: 1. Open a gnome-terminal as your normal user 2. $ su - => You get a root shell in /root 3. CTRL + SHIFT + T => you get a new tab as your normal user in / Alternatively: 1. $ cd /tmp 2. $ mkdir foo 3. $ cd foo 4. $ chmod a-x . 5. CTRL + SHIFT + T => you get a new tab as your normal user in / Expected results: Opening new tab in both of these cases should open a shell as your normal user in its $HOME. Additional info: 1. $ cd /tmp 2. $ mkdir foo 3. $ cd foo 4. don't do the « chmod a-x . » so that /tmp/foo is 755 5. CTRL + SHIFT + T => you get a new tab as your normal user in /tmp/foo, which is expected. Thanks a lot to wwoods and nanonyme in #fedora-qa for helping me understand the issue and for digging it.
Related bug: http://bugzilla.gnome.org/show_bug.cgi?id=579291
http://bugzilla.gnome.org/show_bug.cgi?id=525450
Actually, those 2 bugs are not the same issue as the one I reported. Those 2 complain about the fact that new tabs are opened in the same folder as the tab you were in before opening the new one. I'm not complaining about that, I _love_ this behaviour. The issue here is that if it's not possible to chdir to this dir when opening the new tab (the x bit is not set), you're left in / when you should be left in $HOME.
I'm guessing this bug stems from the fact that F-10 gnome-terminal (2.24.x) ran with cwd=$HOME: home_dir = g_get_home_dir (); if (home_dir) g_chdir (home_dir); gtk_main (); 2.26.x changed to cwd=/, due to http://bugzilla.gnome.org/show_bug.cgi?id=565328: if (chdir ("/") < 0) g_warning ("Failed to chdir to /: %s", g_strerror (errno)); gtk_main (); Perhaps terminal_screen_launch_child should chdir() to the user's homedir before calling vte_terminal_fork_command() - then if vte_terminal_fork_command() fails to chdir(), we'll end up in $HOME instead of /.
I've reopened the upstream bug and added some comments there.
Can you try gnome-terminal-2.26.1-2.fc11, which has the proposed upstream fix ?
Just installed it. That fixes the first case I mentioned (tab1 as root then CTRL + SHIFT + T), but not the second one (tab1 as same user but in a folder you don't have exec permission). That's weird, we figured it was the same problem for both :-/
*** Bug 495910 has been marked as a duplicate of this bug. ***
This bug appears to have been reported against 'rawhide' during the Fedora 11 development cycle. Changing version to '11'. More information and reason for this action is here: http://fedoraproject.org/wiki/BugZappers/HouseKeeping
Still present with gnome-terminal-2.26.2-1.fc11.x86_64
Seems fixed in gnome-terminal-2.28.1-1.fc12.x86_64
As the initial reporter, I confirm both issues are fixed in F12 (same version as comment #11).
mark as closed currentversion?