Xfce multilevel menu

I want to organize my Xfce menus better. For example, I have a lot of entries in the “Education” category, to the point that the menu became scrollable in order to accommodate them all. What I want to do is group some of the menu entries into separate sub-menus that still reside under “Education”. I did not find clear instructions, so what I will describe is based on inspecting the sub-menus created by Wine, as well as trial and error.

I am still using Xfce 4.12, and the reasons behind this represent a topic for another post. Now, back to the problem… As an example, I want to group all desktop entries from the Staden Package into their own sub-menu, called “Staden Package”. The *.desktop files and the respective *.png icons are called as follows:


and they go to their usual places:


A new desktop-directory file, let’s call it staden.directory, should be created with the following contents:

[Desktop Entry]
Name=Staden Package

To use it system-wide, place it in:


or in your $HOME, for your user only:


Also, a new menu entry indicating where the staden.directory appears within the Xfce menu, should be created. It also lists which desktop files should be placed in the sub-menu, in our case the components of the Staden Package. Let’s call it staden.menu, containing:

[Desktop Entry]
<!DOCTYPE Menu PUBLIC "-//freedesktop//DTD Menu 1.0//EN"
      <Name>Staden Package</Name>

Its contents will merge automatically with the default Xfce menu. To use it system-wide, staden.menu should be placed here:


I am doing this on CRUX 3.6.1, so the /usr/etc path may differ for you, probably pointing just to /etc. Or you can place it again in you $HOME, for your user only:


One last thing. To avoid having the menu entries in duplicates (meaning that they appear both in “Education” and in its “Staden Package” sub-menu, the Categories variable in their desktop files should be either blank, commented out or plain deleted. I decided on the least barbaric approach, just commenting it out like this:

[Desktop Entry]
Name=Staden Package TREV

I am not sure if there’s a way to make the sub-category appear on the bottom, not on top, but that’s something I may investigate later:

That’s it!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s