[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-core-devel
Subject: Re: [PATCH] Set --workdir when executing a service with konsole
From: David Faure <faure () kde ! org>
Date: 2008-08-11 14:13:46
Message-ID: 200808111613.47524.faure () kde ! org
[Download RAW message or body]
On Wednesday 06 August 2008, Alex Merry wrote:
> 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.
Right.
> The attached patch fixes this, but I'm not sure whether including another
> macro (%w for working directory) is kosher.
No, you shouldn't add an undocumented %w option which is not in the desktop
entry standard. Isn't there a way to do this without adding a % option, something like
terminal += " --workdir " + KShell::escape(service.path());
?
--
David Faure, faure@kde.org, sponsored by Trolltech to work on KDE,
Konqueror (http://www.konqueror.org), and KOffice (http://www.koffice.org).
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic