[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-devel
Subject:    Re: Getting the current directory in a service menu
From:       "Henrique Pinto" <stampede () uai ! com ! br>
Date:       2003-09-08 15:21:24
[Download RAW message or body]

>David Faure wrote:
>> On Monday 08 September 2003 00:26, Henrique Pinto wrote:
>> 
>>>Hi,
>>>
>>>Is there any way to pass the name of the directory that is being visualized
in 
>>>Konqueror to an external app in the "Exec=" line of the desktop file of a

>>>service menu? I tried putting "." and "$PWD", but they always expand to the

>>>home directory, instead of the current one.
>> 
>> 
>> Try %d
>> (see the "desktop entry standard" on developer.kde.org or in kdelibs/kio)

>> 
>I think that what he wants is for it to work like this:
>
>Giver <dir> and <command>
>
>	cd <dir>
>	<command>
>
>with the "Exec" in a desktop file.
>
>You should be able to use:
>
>	cd <dir>; <command>
>
>The specification:
>
>http://www.freedesktop.org/standards/desktop-entry-spec/0.9.4-onehtml/
>
>says that you can use:
>
>	Path=<dir>
>
>but it doesn't appear to work.
>
>Then the second question is: how does he get the directory.

Actually, that's not what I want.
Given <directory>, <command> and the file on which the action should be executed,
I want to be able to do:

Exec=<command> --someoption <directory> <the file, or files>,

what can be done as proposed by David Faure (thank you, David), or, with a small
modification in the program I'm working on, as suggested by Aaron Seigo (thank
you, Aaron). So, think twice before saying someone did not respond some question
if you don't know what is the question...
****************************************
UAI - ESTADO DE MINAS
O Grande portal dos Mineiros na Internet
http://www.uai.com.br
 
>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic