Bug 268322 - Konsole current working directory when opening new tabs or windows is /usr/share/man if reading a man page in previous window
Summary: Konsole current working directory when opening new tabs or windows is /usr/sh...
Status: RESOLVED DOWNSTREAM
Alias: None
Product: konsole
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Arch Linux Linux
: NOR minor
Target Milestone: ---
Assignee: Konsole Developer
URL:
Keywords:
: 270620 (view as bug list)
Depends on:
Blocks:
 
Reported: 2011-03-12 22:44 UTC by dennis.aldana
Modified: 2011-04-13 11:37 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description dennis.aldana 2011-03-12 22:44:37 UTC
Version:           unspecified (using KDE 4.6.1) 
OS:                Linux

While reading a man page in a Konsole window, if a new tab or window is opened through  any means, current working directory is /usr/share/man

Reproducible: Always

Steps to Reproduce:
Open Konsole
Type: "man cat" (or man anything)
Go to File > New Window (or new Tab, or double click the tab bar, or even left click and "open file manager")


Actual Results:  
Current working directory is /usr/share/man

Expected Results:  
Current working directory should be the directory been browsed in Konsole before reading the man page, or at least home directory if that is not known. 

OS: Linux (i686) release 2.6.37-ARCH
Compiler: gcc
Comment 1 Kurt Hindenburg 2011-03-19 16:01:17 UTC
Konsole get the current working directory from the current session to copy to the new session.  'man' sets the cwd to /usr/share/man

Example:

4774 pts/6    S+     0:00 man man

/proc/4774/cwd -> /usr/share/man/
Comment 2 dennis.aldana 2011-03-19 23:52:41 UTC
yeah, it may be the normal behavior, it certainly is not what I was specting so I thought in reporting, but it's so trivial you may close this bug at your discretion. I think man shouldn't change cwd thou. 

(In reply to comment #1)
> Konsole get the current working directory from the current session to copy to
> the new session.  'man' sets the cwd to /usr/share/man
> 
> Example:
> 
> 4774 pts/6    S+     0:00 man man
> 
> /proc/4774/cwd -> /usr/share/man/
Comment 3 Kurt Hindenburg 2011-03-20 16:51:07 UTC
I agree man should not be setting the cwd.

Anyway I don't see how Konsole could get around this as-is.
Comment 4 Daniel Franke 2011-04-13 11:34:11 UTC
*** Bug 270620 has been marked as a duplicate of this bug. ***
Comment 5 Daniel Franke 2011-04-13 11:37:09 UTC
See the dupe for in #4 another example, 'find' in that case.

Personally I don't think this is an issue in any application that changes the current working directory -- have fun trying to weed them all out -- but something that should be fixed in konsole instead.