Re: desktop file exec working firectory

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.

I don't think $PWD is defined in this context, though you could create a 
script, foo.sh, that does the heavy lifting, and save the values returned by 
`env` to check for sure.

Exec=/usr/bin/foo.sh %F

where /usr/bin/foo.sh contains something like

#!/bin/bash

# check env values for later perusal
env > /tmp/foo.env

convert $1 `kdialog --title "save PDF" --getsavefilename $PWD/join.pdf`

-- Rex

-- 
users mailing list
users@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines


[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux