desktop entry spec 0.9.7 Exec key parsing
waldo.bastian at intel.com
Tue Oct 31 00:16:17 EET 2006
>> > * It says that backslashes only escape text within double
>> > but GNOME and KDE both parse
>> > one\ word
>> > as one word and
>> > \"two words\"
>> > as two.
>> Yes, so although these constructions are supported by GNOME and KDE,
>> spec doesn't allow them and you shouldn't use that.
>The spec *does* allow those strings though, it just thinks they should
>be split up differently from how GNOME and KDE do it. Adding backslash
>to the reserved characters list would fix this.
Ah good catch, yes, backslash should be in there, will fix.
>> The single quote character is one of the reserved characters and as
>> you must use double quotes around an argument that contains a single
>> quote. Using single quotes in any other way is not allowed by the
>> although GNOME and KDE might very well support that.
>Well, this means some existing .desktop files that were considered
>well-formed according to earlier versions of the spec are now
>invalid, and future .desktop file parsers might not parse them as their
>authors intended. (Google codesearch turns up a handful of .desktop
>files using single quotes, but only a handful, so maybe it's not that
Correct, but I think the impact of this will be limited.
>There are also a bunch of .desktop files that use "=" unquoted, which
>now considered wrong. Eg:
> Exec=nautilus-cd-burner --source-iso=%f
>Maybe make "=" only be reserved in argv? (I assume you put it there
>so that attempts to set environment variables would be marked as
I guess we can just forbid it in argv and remove it as reserved
More information about the xdg