autostart spec, round 2!

Vincent Untz vuntz at
Sun Oct 22 12:57:44 EEST 2006

Le mercredi 18 octobre 2006, à 14:49, Dan Winship a écrit :
> Here's what I propose: (Ignore the fact that it describes something
> different from what KDE actually does; the important part is that they
> get the same end result, which they do.)
>     If the same desktop filename is located under multiple Autostart
>     Directories, the startup system must merge the files together as
>     follows:
>         - The .desktop file in the least-important directory is used
>           as a base; if it does not contain all of the keys REQUIRED by
>           the Desktop Entry Specification, then the startup system's
>           behavior is not defined.
>         - Each following desktop file with the same name is then
>           processed as follows, in order of increasing importance.
>             - If the file is missing any of the keys that are REQUIRED
>               by the Desktop Entry Specification, then it is interpreted
>               as a "patch" relative to the previous desktop file, and
>               the values of its keys override the previous values of
>               those keys. Eg, a file containing only
>                   [Desktop Entry]
>                   Hidden=true
>               would keep all of the keys from the previously-specified
>               desktop file except for "Hidden", which would now be set
>               to "true".
>             - If it is not missing any REQUIRED keys, then the startup
>               system MAY interpret it either as a patch or as a complete
>               replacement for the earlier .desktop file. (There is no
>               way for a portable application to know what behavior the
>               startup system will use in this case.)
>         - If a file contains the string "[$i]" on a line by itself
>           before the "[Desktop Entry]" group, then its contents are
>           considered immutable, and the startup system will not merge
>           in the contents of any further directories.



Let's suppose I have myapp.desktop in both directories. According to
your current proposal, we should start by looking at the least important
directory, ie /etc/xdg.

Now let's suppose /etc/xdg/myapp.desktop is locked down with [$i]. It
means /usr/local/etc/xdg/myapp.desktop should be ignored. However,
XDG_CONFIG_DIRS states that /usr/local/etc/xdg should be preferred over
/etc/xdg (and everybody would expect this, especially admins).

I can think of non-trivial ways to fix this, but a trivial way would be


Les gens heureux ne sont pas pressés.

More information about the xdg mailing list