Re: Is gnome fully compliant with freedesktop sepc? Any know issues?



On 18/01/13 11:37, jupiter wrote:
> [Desktop Entry]
> Encoding=UTF-8
> Version=1.0
> Type=Application
> Terminal=false
> Exec=$HOME/MyApp
> Name=My Application
> Icon=$HOME/Icons/MyIcon.png

As others have noted, the desktop-file spec doesn't have any special
handling for $ in keys. It could be argued that if KDE does, then it's
KDE that is not fully compliant with the spec.

For the Exec key you can do something like this (untested):

    Exec=/bin/sh -c 'exec "$HOME/MyApp"'

Similarly, for the Path key, you should be able to replace

    Path=$HOME/Downloads
    Exec=/usr/local/bin/MyApp

with

    Exec=/bin/sh -c 'cd "$HOME/Downloads" && exec /usr/local/bin/MyApp'

Finally, for Icon, if you put the icon in a location that is searched by
default according to the Icon Theme Specification, you can just say
"Icon=MyIcon" in the desktop file. Such locations include
~/.local/share/icons.

Regards,
    S


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