For the applications' shortcuts to be found, the
.desktop files must be located in one of default directories, such as
~/.local/share/applications for current user or
/usr/share/applications for all users.
If you are unsure what went wrong in your case, check out my working example tested in Xubuntu 14.04 (Xfce 4.10) as below.
The following setup assumes that:
- the shortcuts (
.desktop files) have been created and include at least one category, which could be existent (i.e. "System") or non-existent (i.e. "Custom", "Virtual");
- the shortcuts have been moved to the shared or local directory i.e.
- the menu (
.menu file) have been created such that the shortcuts from particular defined category is included (i.e. "Virtual");
- the menu is placed somewhere appropriate i.e.
.menu file contains the following.
<?xml version="1.0" encoding="UTF-8" ?>
PUBLIC '-//freedesktop//DTD Menu 1.0//EN'
<!--This defines where to find .desktop files-->
<!--This affects what entries will appear under "Parent"-->
<!--This includes what entries will appear under "Child" -->
<!--This affects how will the entries appear under "Parent"-->
In this example, I have only created one custom shortcut named
vm-test.desktop that will appear under "Parent" menu. The other
.desktop files are already existing in
/usr/share/applications directories. I had included these on purpose, to show it works in both ways.
Add "Application Menu" applet to the Xfce panel, and select "Use custom menu file" and load the
.menu file from the share or local directory. Finally, click on the menu applet to see the shortcuts.
The shortcuts that have been added to
~/.local/share/applications directory will also be found automatically by Whisker Menu or Applications Menu applet (using default
.desktop files, which specify non-existent category or do not specify any category, will appear under "Other" category. If it has several or more categories, it will appear in the existent category only i.e. "System" and does not appear under "Other".
To understand this, see the content of
.desktop file I have used in example above.
Name=VirtualBox VM test
Comment=Run "test" VM in VirtualBox
Exec=virtualbox --startvm "test"
Name[en_US]=VirtualBox VM test
As such, the custom shortcut will appear under "System" category in Application Menu based on the specified categories. Additionally, because it has specified "Virtual" category, the custom
.menu file can easily include any
.desktop files that have "Virtual" category.
In Debian, there were no
.desktop files by default in
~/.config/menus directory does not exist (need to create this manually).
Tested working in Xubuntu 14.04 (Xfce 4.10) and Debian 8.3 Xfce (Xfce 4.10) 32-bit systems.