Re: some suggestions towards a Debian .desktop policy [Was: Warm up discussion about desktop files]
Le mercredi 20 avril 2011 à 09:12 +0200, Bernhard R. Link a écrit :
> Some suggestions for a Debian .desktop policy:
> 1) syntax according to freedesktop's Desktop Entry Specification
> [TODO: always the latest, fix some version and increase that at
> fixed points?]
> 2) Name must be a name properly name the program and be unique enough
> to be useable if multiple programs doing the same are in the menu.
> 3) Comment, if it exists, must be <...>
> 4) Categories must be according to freedesktop's Desktop Menu
> Specification, appendix A [TODO: what version? Always latest?].
> 5) Categories must contain applicable KDE,GNOME,GTK,Qt,Motif,Java
> so that a menu manager cat filter out things not matching
> the UI look&feel if wanted.
> 6) A .desktop file is allowed to break above rules if is has a
> OnlyShownIn limiting it to some environment(s) it belongs to.
> 7) In case of 6) there must be a .desktop file with the same
> command and adhering to this policy, unless that command cannot
> be run (or cannot work) outside this environment.
I disagree with this rule. Menus are editable, so if a program is meant
for an environment it should not be displayed by default in others. For
example, Thunar works perfectly fine outside Xfce, but you don’t want to
show it in KDE or GNOME.
> 8) An alternative .desktop as in 7) might have a NotShownIn,
> otherwise it must not have one.
> What do you think?
I would add at least two other rules:
If the entry has Terminal=true, it must also have
If the program is not useful in the general case and might have
been installed as a dependency for something mostly unrelated,
it must have NoDisplay=true.
The second case is to handle things like sun-java* crap and similar
ones. They get installed just because you installed a Java program, but
you don’t want them in your menus, you just want the program to work.
With NoDisplay=true these entries can be enabled in a menu editor, so
that should be enough.
>  I suggest a lintian warning for this for everything that has not
> "Applet" or "Settings" in Categories.
Sounds just as useful as the “su-wrapper-not-su-to-root” check - meaning
people adding bugs in their uploads just because lintian asked them to.
.''`. Josselin Mouette
: :' :