Bug 203942

Summary: When using the 'su' command, the folder name is not updated when using %d in tab names
Product: [Applications] konsole Reporter: Frédéric Buclin <LpSolit>
Component: generalAssignee: Konsole Developer <konsole-devel>
Status: RESOLVED INTENTIONAL    
Severity: normal CC: robertknight
Priority: NOR    
Version: 2.3   
Target Milestone: ---   
Platform: unspecified   
OS: Linux   
Latest Commit: Version Fixed In:

Description Frédéric Buclin 2009-08-15 14:25:38 UTC
Version:           2.3 (using 4.3.00 (KDE 4.3.0), Mandriva Linux release 2010.0 (Cooker) for i586)
Compiler:          gcc
OS:                Linux (i686) release 2.6.31-desktop-0.rc6.1mnb

I often use the 'su' command from within Konsole to log in as a different user (most of the time, as root). When doing this, the Konsole tab no longer reflects the directory I'm in; %d still points to the directory I was when I called the 'su' command. It should instead reflect the current directory I'm in as e.g. root.
Comment 1 Robert Knight 2009-08-16 22:05:54 UTC
If my understanding is correct, this is a security feature of Linux.  Konsole does not have permissions to inspect some details of a program which is being run with 'su'.  Usually when you start programs they are running with the same user as Konsole (the user you logged in as), so it can read their status (including environment, command line and current directory).  This status information is provided by the kernel through files in /proc/<process id>/

When you run a program as root, Konsole only has limited access to information about the current status of that program and information about the current directory of that program is not available.