Article 6FRVA How to add custom category to the FreeDesktop menu?

How to add custom category to the FreeDesktop menu?

by
wigwami
from LinuxQuestions.org on (#6FRVA)
I'm trying to create a custom category to appear in my jgmenu, called File. I'm talking about a top-level category, not a custom sub menu that appear beneath one of the standard FreeDesktop-defined categories. And I don't want to manually add this category to jgmenu's prepend or append .csv files.

I'm currently running Debian (specifically Sparky Linux) with Openbox. I've used BL before and consider it a premier example of Debian-Openbox integration, so hopefully you all can help. Here's what I've done so far:

1. I created a new file.directory file in /usr/share/desktop-directories/. Here's the content:

Code:[Desktop Entry]
Type=Directory
Encoding=UTF-8
Name=File
Icon=org.xfce.thunar2. I created a new XML file called file.menu in /etc/xdg/menus/applications-merged. Here's the content:

Code:<!DOCTYPE Menu PUBLIC "-//freedesktop//DTD Menu 1.0//EN"
"http://www.freedesktop.org/standards/menu-spec/1.0/menu.dtd">
<Menu>
<Name>Applications</Name>
<Menu>
<Name>File</Name>
<Directory>file.directory</Directory>
<Include>
<Category>File</Category>
</Include>
</Menu>
</Menu>3. I created a new .desktop file called thunar-bulk-rename.desktop in ~/.local/share/applications/. Here's the content:

Code:[Desktop Entry]
Name=Bulk Rename
Comment=Rename Multiple Files
GenericName=Bulk Rename
Keywords=bulk;renamer;renaming;thunar;files;folders;directory;directories;
Exec=thunar --bulk-rename %F
Icon=org.xfce.thunar
Terminal=false
StartupNotify=true
Type=Application
Categories=Filesystem;Utility;Core;GTK;X-File;As configured above, the Thunar Bulk Renamer program doesn't move from its original location in the jgmenu Accessories category. I was told that in the .desktop file, the new category should have X- as a prefix; whether I keep or remove that prefix makes no difference. I also tried removing the other categories from the .desktop file and leaving only X-File (or File). The program appears under a new (yay) category called Other (boo).

I assume that in both cases, the menu simply doesn't recognize my new, custom category and is defaulting back to either one of the other standard categories or creating the Other category when it doesn't know what else to do.

I must be making an error in either the .directory file or the .menu file but I have no idea what. Any ideas are welcome, and thanks!
External Content
Source RSS or Atom Feed
Feed Location https://feeds.feedburner.com/linuxquestions/latest
Feed Title LinuxQuestions.org
Feed Link https://www.linuxquestions.org/questions/
Reply 0 comments