Bug 1480174

Summary: Terminal doesn't remember the last working directory when opening a new tab
Product: Red Hat Enterprise Linux 7 Reporter: Mario Torre <neugens>
Component: gnome-terminalAssignee: Debarshi Ray <debarshir>
Status: CLOSED WORKSFORME QA Contact: Desktop QE <desktop-qa-list>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 7.4CC: neugens, vbudikov
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-10-17 17:43:29 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
Video shocasing the issue none

Description Mario Torre 2017-08-10 10:24:38 UTC
Description of problem:

When opening a new tab in gnome-terminal, the tab is opened pointing in $HOME, no matter what was the directory I was in while creating the new tab. This seems to have changed since the previous RHEL 7.3.

Version-Release number of selected component (if applicable):

3.22.1

How reproducible:

Open gnome-terminal, go in a directory, i.e. ~/Documents, then press the default key combination to create a new tab: CTRL+SHIFT+t, the new tab opens in $HOME, it should instead open in ~/Documents.

Steps to Reproduce:
1. in gnome-terminal, go in a directory, i.e. ~/Documents
2. open a new tab

Actual results:

Tab opens in $HOME

Expected results:

Tab should open in ~/Documents

Additional info:

I'm sure this behaviour changed since at least 7.2, it makes the terminal very hard to use since I need to continually go back to the previous tab to check the  pwd, this is sometime not possible, for example when checking log files or using  some pagination or editing files in the terminal, etc...

Comment 2 Vera Budikova 2017-08-10 10:30:26 UTC
I have tried it for gnome-terminal-3.22.1-2.el7.x86_64 and it works for me...

Comment 3 Mario Torre 2017-08-10 11:05:52 UTC
(In reply to Vera Budikova from comment #2)
> I have tried it for gnome-terminal-3.22.1-2.el7.x86_64 and it works for me...

That's very strange. This is a fresh install, I also created a new user to rule out some configurations, I'm attaching the video to showcase the issue.

Comment 4 Mario Torre 2017-08-10 11:06:26 UTC
Created attachment 1311696 [details]
Video shocasing the issue

Comment 6 Debarshi Ray 2017-10-05 18:29:01 UTC
$ echo $PROMPT_COMMAND ?

Comment 7 Mario Torre 2017-10-16 12:02:44 UTC
(In reply to Debarshi Ray from comment #6)
> $ echo $PROMPT_COMMAND ?

I apologise, I didn't see the needinfo... I reinstalled the OS (from the same image) and things are working correctly now. It may have been a faulty install perhaps?

Comment 8 Debarshi Ray 2017-10-17 17:43:29 UTC
The shell integration to open new tabs and windows in the last working directory comes from the vte-profile package. Maybe that went missing? Or something overwrote your PROMPT_COMMAND environment variable.

Closing as WORKSFORME.