desktop entry spec 0.9.7 Exec key parsing

Bastian, Waldo waldo.bastian at intel.com
Fri Nov 3 20:53:24 EET 2006


>The Exec line spec isn't a reflection of (everything) what GNOME and
KDE
>do, it is a recipe for how to create an Exec line that is supported by
>GNOME and KDE and other conforming implementations and it provides
>conforming implementations with a limited set of syntactical
>constructions that they must be able to deal with.

Testing with Gnome 2.16 on Ubuntu 6.10 shows that there are some
problems left though.

1) According to the current spec Exec=foobar.sh "%f" and Exec=foobar.sh
%f are both valid and equivalent. Unfortunately gnome adds single quotes
around the filepath when using "%f" effectively making the path
unusable. The bright side is that such quotes are useful when doing
Exec=/bin/sh "foobar.sh %f". Please advice how we can capture this in
the spec.

2) Gnome supports %d and %n but only expands the first occurance. This
makes this feature useless, because you will need both to identify a
file. I suggest to drop %d, %n, %D and %N from the spec. If you need
this functionality in an interoperable way you should provide a
shellscript that can extract the same information from %f or %F with
basename and dirname. The typical usecase for %d and %n is "Exec=cd %d;
command %n" which the spec doesn't support anyway. I am not aware of any
usecase for %D and %N.

3) Strictly speaking not the Exec key, but very much related. Gnome
doesn't support the Path key. Are there any plans to add support for
that before the end of this year? Otherwise I would like to drop it from
the 1.0 spec.

4) %% is now handled correctly in Gnome 2.16. 

Cheers,
Waldo



More information about the xdg mailing list