How do I make things stay where I put them in the menu?
Specific example: I created couple of menu items for scripts that I have created. I put both of them in the Utilities menu because that's where I want them. Now, an hour or two later, I have a previously hidden menu category showing called "Other" and my new items have been moved in there. I do not want them in "Other". If I wanted them in "Other", I would have put them there.
Thanks,
Robin
1 Like
Are the Items now in Utilities and Other or only in Other? When they are in both, You can simply unmark or remove them in ''Main Menu''.
My apologies for the delay in responding.
It would move them to Other, deleting them from Utilities.
I have found the issue and a working solution. This is based on a mixture of reading web pages and empirical research so it may be incomplete or partially incorrect. It's working for me. I will try to include enough information to make this a mini "HOW-TO" in case someone else has the same issue. Please let me know if you spot any errors, typos, etc.
The alacarte menu system categorizes .desktop files based on a "Categories" tag. The .desktop file "Categories" tags are assigned to various menu sections based on "Category" entries in the menu file. I'm not sure if "Category" and "Categories" are interchangeable in either context. If a .desktop file does not have a "Categories" tag, alacarte shrugs and sticks it in "Other". The problem is that when you add a menu item through the GUI based menu editor, it does not add the "Categories" tag to the .desktop file it creates. (I have SEVERAL problems with the GUI based menu editor
, this is but one)
You can find the category for each menu section by reading the config file in /etc/xdg/menus/gnome-applications.menu . This is the default menu file location, there are various ways to override it to other locations. Check the alacarte man page for that. In my Zorin 18 PRO, it's in the default. The tags used for each menu section are NOT intuitive. For example, to put something in the "Utilities" section of the menu, tag the .desktop files with "Categories=X-GNOME-Utilities". When I say it's not intuitive, if you tag it with "Categories=Utility" alacarte will put in "Accessories". Makes perfect sense to me.
The relevant section of the menu config file for the Utilities section:
<!-- Utilities submenu -->
<Menu>
<Name>Utilities</Name>
<Directory>X-GNOME-Utilities.directory</Directory>
<Include>
<Category>X-GNOME-Utilities</Category>
and my ~/.local/share/applications/mount_2e.desktop file:
[Desktop Entry]
Name=Mount 2E
Exec=/usr/local/bin/mount_2e
Comment=Mount VC drives
Terminal=false
Icon=veracrypt
Type=Application
Path=
StartupNotify=false
Categories=X-GNOME-Utilities
Note that the menu "Category" tag aligns with the .desktop file "Categories" tag.
1 Like