[PATCH] Set --workdir when executing a service with konsole

Alex Merry kde at randomguy3.me.uk
Wed Aug 6 19:17:26 BST 2008


This stems from bug #162183 (https://bugs.kde.org/show_bug.cgi?id=162183)

Basically, when a script is executed by KLauncher using a .desktop file that 
has Terminal=1 set and a working path set, it does a chdir then executes a 
terminal program.

This is fine with most terminal programs, but konsole ignores the parent 
process working directory, and instead goes straight to your home directory.  
The --workdir option can be used to change this behaviour, as KToolInvocation 
does.  However, KLauncher uses KRun which has its own logic for constructing a 
terminal command line.

The attached patch fixes this, but I'm not sure whether including another 
macro (%w for working directory) is kosher.  Is it OK, and if so should I 
backport it to 4.1?

Alex



-- 
Proud KDE hacker: http://www.kde.org
Get KDE 4.1 - out now!
Arch Linux: perfect for geeks like me - http://www.archlinux.org
OpenSUSE: just works - http://www.opensuse.org

-------------- next part --------------
A non-text attachment was scrubbed...
Name: krun-konsole-workdir.diff
Type: text/x-patch
Size: 1001 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20080806/aa5a8921/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 197 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20080806/aa5a8921/attachment.sig>


More information about the kde-core-devel mailing list