[Portland] Re: PATCH: Desktop entry spec - Exec key

Francois Gouget fgouget at codeweavers.com
Tue Aug 8 08:14:58 PDT 2006


Bastian, Waldo wrote:
[...]
> The Exec key must contain a command line. A command line consists of an
> executable program optionally followed by one or more arguments. The
> executable program can either be specified with its full path or with
> the name of the executable only. If no full path is provided the
> executable is looked up in the $PATH used by the desktop environment.
> Arguments are separated by a space. A space can be included into an
> argument by enclosing the whole argument with either single or double
> quotes.

This part should mention that it is possible to include double-quotes 
into an argument by escaping it with a backslash. Otherwise some 
implementations will likely forget about this. Also, quoting can apply 
to the application name, not just the parameters.


[...]
> Implementations must take care not to expand field codes into multiple
> arguments unless explicitly instructed by this specification. This means
> that name fields, filenames and other replacements that can contain
> spaces must be passed as a single argument to the executable program
> after expansion.

It's a good idea to include this in the specification. Another question 
though: what happens if a filename contains a space and the parameter is 
"%f", that is it already has enclosing double-quotes? (or enclosing 
single-quotes for that matter)
I believe that the current practice is to do what's expected, that is 
still make sure the filename is correctly quoted.


-- 
Francois Gouget
fgouget at codeweavers.com



More information about the Portland mailing list