Desktop Entry Standard: Path key
David Faure
dfaure at trolltech.com
Tue Jul 1 03:13:35 PDT 2008
On Monday 30 June 2008, Brian J. Tarricone wrote:
> Haha, I'd call that "good design," not a hack: isn't the best way to
> extend a format to find a way to do so while remaining compatible with
> it?
Yes, exactly. And this syntax allows for more modifiers to be added in the future.
KDE support [$i] for "immutable" (i.e. cannot be overridden by a local file),
and [$d] for "deleted" (when a local file wants to mark a key from a global file as being deleted, not just set to empty)
Those can be combined like [$ei], [$di] etc.
[$e] also supports shell commands, like Host[$e]=$(hostname)
I'm not asking for all those features to be in the spec (although I wouldn't mind that either :),
I'm just showing why this solution is nice: it's extendable for other things in the future,
by providing a location where to put key-specific (or group-specific, using [group][$i]) flags.
The issue of backwards compatibility remains, though, current non-kde implementations
cannot handle Path[$e]=$HOME/Documents. However KDE 3 already generated such files,
so the simplest course of action would be to just add support for it in the spec, and see
interoperability increase over time, while other implementations start supporting this.
--
David Faure, faure at kde.org, sponsored by Trolltech to work on KDE,
Konqueror (http://www.konqueror.org), and KOffice (http://www.koffice.org).
More information about the xdg
mailing list