[CentOS] Custom desktop menu entries: weird behavior with menu categories

Sun Aug 14 15:13:43 UTC 2016
Nicolas Kovacs <info at microlinux.fr>

Le 14/08/2016 à 11:33, Nicolas Kovacs a écrit :
> 1. When I edit gnome-terminal.desktop and define "Categories=System;",
> it won't appear in "Outils systèmes" as expected but remains in
> "Utilitaires".
> 2. I have a category "Divers" (something like "Misc") with a single
> desktop entry for Printer Configuration. Now when I edit
> system-config-printer.desktop and define something like
> "Categories=System;", the "Divers" category remains there and the menu
> entry won't budge.
> Most of the menu entries can be redefined OK, and they appear in the new
> category. Why a handful of desktop entries would not work remains a
> mystery. This looks damn well like a bug, although I wouldn't even know
> how to call it.

After some more experimenting, I found the culprit. It looks like the
structure of the classic Applications menu is not only defined by the
individual *.desktop files in /usr/share/applications, but also in a
weird /etc/xdg/menus/gnome-applications.menu file which contains a bunch
of redundancies. Not exactly KISS principle.

So it looks like in order to customize my menus, I have to edit
individual *.desktop files in /usr/share/applications as well as the
XML-style entries in /etc/xdg/menus/gnome-applications.menu.

I bluntly admit I don't get the logic behind this sort of thing.



Microlinux - Solutions informatiques durables
7, place de l'église - 30730 Montpezat
Web  : http://www.microlinux.fr
Mail : info at microlinux.fr
Tél. : 04 66 63 10 32