desktop file exec working firectory

Rex Dieter rdieter at math.unl.edu
Sun Jan 23 14:25:41 UTC 2011


Dj YB wrote:

> Hello,
> I am creating a desktop file for a service menu, and can't find out how to
> use the directory from which the action was launched.
> 
> this is how it looks:
> 
> Exec=convert %F `kdialog --title "save PDF" --getsavefilename join.pdf`;
> 
> this is how I want it to look:
> 
> Exec=convert %F `kdialog --title "save PDF" --getsavefilename
> $PWD/join.pdf`;
> 
> that doesn't work.

According to
http://standards.freedesktop.org/desktop-entry-spec/latest/ar01s06.html

looks like you might want %f here, and I'd bet it's a full path, so perhaps 
substituting `dirname %f` for $PWD may give you want you want.

-- Rex



More information about the users mailing list