gvim.deskop does not fully comply to the current xdg
desktop-entry and
menu specifications:
Code:
desktop-file-validate /usr/share/applications/gvim.desktop
/usr/share/applications/gvim.desktop: warning: key "Encoding" in group "Desktop Entry" is deprecated
/usr/share/applications/gvim.desktop: error: (will be fatal in the future): value "gvim.png" for key "Icon" in group "Desktop Entry" is an icon name with an extension, but there should be no extension as described in the Icon Theme Specification if the value is not an absolute path
/usr/share/applications/gvim.desktop: hint: value item "TextEditor" in key "Categories" in group "Desktop Entry" can be extended with another category among the following categories: Utility
/usr/share/applications/gvim.desktop: hint: value "TextEditor;" for key "Categories" in group "Desktop Entry" does not contain a registered main category; application might only show up in a "catch-all" section of the application menu
The main concern is that the .desktop includes:
Code:
Categories=TextEditor;
but TextEditor is not among the
main categories listed in the xdg menu specification that every conforming desktop environment MUST support, and there is no main category listed alongside this one.
As a result, in the menu of XFCE gvim is shown under "other", which is the catch-all section in this menu (in the KDE menu instead gvim appears under Utility alongside the "light" text editors).
With the patch below the gvim entry menu is displayed alongside emacs under "Development" in all xdg compliant desktop menus, which seems me to be logical. Alternatively it could be displayed under Utility (or its synonym Accessories) if in the last line "Development" is replaced by "Utility" as
suggested by the specification.
Code:
--- gvim.desktop 2016-10-02 15:57:21.002130635 +0200
+++ gvim.desktop.new 2016-10-02 15:59:05.692136310 +0200
@@ -1,5 +1,4 @@
[Desktop Entry]
-Encoding=UTF-8
Name=Vi IMproved
Name[af]=Vi Verbeterde
Name[ar]=في.أي المحسن
@@ -112,9 +111,9 @@
GenericName[zu]=Umlungisi wombhalo
MimeType=text/english;text/plain;text/x-makefile;text/x-c++hdr;text/x-c++src;text/x-chdr;text/x-csrc;text/x-java;text/x-moc;text/x-pascal;text/x-tcl;text/x-tex;application/x-shellscript;text/x-c;text/x-c++;
Exec=gvim -f %f
-Icon=gvim.png
+Icon=gvim
Type=Application
Terminal=false
X-KDE-StartupNotify=true
X-KDE-AuthorizeAction=shell_access
-Categories=TextEditor;
+Categories=Development;TextEditor;
PS in case someone wonder: the line "Encoding=UTF-8" is deprecated because this encoding is mandatory for desktop files anyway (using any legacy encoding would obviously prevent a full localization).