[prev in list] [next in list] [prev in thread] [next in thread] 

List:       freedesktop-xdg
Subject:    RE: desktop entry spec 0.9.7 Exec key parsing
From:       "Bastian, Waldo" <waldo.bastian () intel ! com>
Date:       2006-10-30 22:16:17
Message-ID: 1B47D24854C7BC4FA8DA28BEBB59B0BAC30244 () orsmsx419 ! amr ! corp ! intel ! com
[Download RAW message or body]

>> >    * It says that backslashes only escape text within double
quotes,
>> >      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,
the
>> 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
such
>> 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
spec,
>> 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
considered
>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
>important.)

Correct, but I think the impact of this will be limited.

>There are also a bunch of .desktop files that use "=" unquoted, which
is
>now considered wrong. Eg:
>
>    Exec=nautilus-cd-burner --source-iso=%f
>
>Maybe make "=" only be reserved in argv[0]? (I assume you put it there
>so that attempts to set environment variables would be marked as
>non-standard.)

I guess we can just forbid it in argv[0] and remove it as reserved
character.

Cheers,
Waldo

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic