Both sides previous revisionPrevious revisionNext revision | Previous revision |
howto:customize-menu [2015/02/04 10:41] – ochosi | howto:customize-menu [2022/09/19 22:24] (current) – Update dead link kevinbowen |
---|
| |
A GNU-licensed graphical menu editor for LXDE, [[http://lxmed.sourceforge.net|LXMenuEditor]], also works for Xfce, as of Xfce 4.8.0 and LXMenuEditor 20110523. [[https://launchpad.net/menulibre|MenuLibre]] is another freedesktop.org standard-compliant editor that works well with Xfce. | A GNU-licensed graphical menu editor for LXDE, [[http://lxmed.sourceforge.net|LXMenuEditor]], also works for Xfce, as of Xfce 4.8.0 and LXMenuEditor 20110523. [[https://launchpad.net/menulibre|MenuLibre]] is another freedesktop.org standard-compliant editor that works well with Xfce. |
| |
| ---- |
| |
===== What xfdesktop installs ===== | ===== What xfdesktop installs ===== |
Xfdesktop installs a menu file and .desktop files which together with non-xfdesktop .desktop files define the menu. To customize your menu you need to modify them. The method described here modifies the menu file identified by the $XDG_CONFIG_HOME variable (usually null, so ~/.config/menus/xfce-applications.menu) and copies of .desktop files in your home directory. | Xfdesktop installs a menu file and .desktop files which together with non-xfdesktop .desktop files define the menu. To customize your menu you need to modify them. The method described here modifies the menu file identified by the $XDG_CONFIG_HOME variable (usually null, so ~/.config/menus/xfce-applications.menu) and copies of .desktop files in your home directory. |
| |
| ---- |
| |
===== When xfdesktop implements your changes ==== | ===== When xfdesktop implements your changes ==== |
If the menu file's directory exists when the xfdesktop session starts, changes to the menu file are implemented immediately. Similarly if the //.local/share/applications// directory in your home directory exists when the xfdesktop session starts, changes to its .desktop files are implemented immediately. | If the menu file's directory exists when the xfdesktop session starts, changes to the menu file are implemented immediately. Similarly if the //.local/share/applications// directory in your home directory exists when the xfdesktop session starts, changes to its .desktop files are implemented immediately. |
| |
| ---- |
| |
===== Copy the menu file ===== | ===== Copy the menu file ===== |
or | or |
cp $prefix/etc/xfce/xdg/menus/xfce-applications.menu ${XDG_CONFIG_HOME:-~/.config}/menus | cp $prefix/etc/xfce/xdg/menus/xfce-applications.menu ${XDG_CONFIG_HOME:-~/.config}/menus |
| |
| [[|Back to Top]] |
| ---- |
| |
===== Copy a .desktop file ===== | ===== Copy a .desktop file ===== |
or | or |
cp /usr/share/applications/xfce4-web-browser.desktop ~/.local/share/applications | cp /usr/share/applications/xfce4-web-browser.desktop ~/.local/share/applications |
| |
| ---- |
| |
===== Hide menu entries ===== | ===== Hide menu entries ===== |
If you want to hide menu entries from all menus, copy their .desktop files and edit them to add a ''NoDisplay=true'' line. | If you want to hide menu entries from all menus, copy their .desktop files and edit them to add a ''NoDisplay=true'' line. |
| |
>> {{wiki:warning.png}} | <note tip>As explained[[http://standards.freedesktop.org/desktop-entry-spec/latest/ar01s05.html| here]], ''NoDisplay=true'' will hide the application from the menu but the mime type associations will still be available. ''Hidden=true'' is equivalent to deleting the file.</note> |
>> As explained[[http://standards.freedesktop.org/desktop-entry-spec/latest/ar01s05.html|here]], ''NoDisplay=true'' will hide the application from the menu but the mime type associations will still be available. ''Hidden=true'' is equivalent to deleting the file. | |
===== Hide only root entries ===== | ===== Hide only root entries ===== |
If you only want to remove menu items from the root menu only, copy their .desktop files and edit them to remove Category X-Xfce-Toplevel. | If you only want to remove menu items from the root menu only, copy their .desktop files and edit them to remove Category X-Xfce-Toplevel. |
| |
For example, to remove Web Browser from the root menu, copy its .desktop file and edit it, changing ''Categories=X-XFCE;X-Xfce-Toplevel;'' to ''Categories=X-XFCE;'' | For example, to remove Web Browser from the root menu, copy its .desktop file and edit it, changing ''Categories=X-XFCE;X-Xfce-Toplevel;'' to ''Categories=X-XFCE;'' |
| |
| [[|Back to Top]] |
| ---- |
| |
===== Add entries ===== | ===== Add entries ===== |
</code> | </code> |
Any .desktop files with categories including Accessibility, Core, Legacy or Utility will be shown in the Accessories sub-menu providing they do not also have ''NoDisplay=true''. | Any .desktop files with categories including Accessibility, Core, Legacy or Utility will be shown in the Accessories sub-menu providing they do not also have ''NoDisplay=true''. |
| |
| ---- |
| |
===== The Other sub-menu ===== | ===== The Other sub-menu ===== |
| |
If you have an Other sub-menu and do not want it, copy the .desktop file and modify its categories so it is included in one of the other sub-menus. | If you have an Other sub-menu and do not want it, copy the .desktop file and modify its categories so it is included in one of the other sub-menus. |
| |
| [[|Back to Top]] |
| ---- |
| |
===== Create sub-menus ===== | ===== Create sub-menus ===== |
| |
With all this in place, you should have a new submenu called "Folders" using the file manager icon. The submenu entry shown above should display your home directory in Thunar. You can of course add more entries as shortcuts to common places like /cdrom, /stick, /, or whatever you see fit. | With all this in place, you should have a new submenu called "Folders" using the file manager icon. The submenu entry shown above should display your home directory in Thunar. You can of course add more entries as shortcuts to common places like /cdrom, /stick, /, or whatever you see fit. |
| |
| ---- |
| |
===== Forcing changes ===== | ===== Forcing changes ===== |
If that doesn't work, try | If that doesn't work, try |
killall -HUP xfdesktop | killall -HUP xfdesktop |
| |
| [[|Back to Top]] |
| ---- |
| |
===== Questions ===== | ===== Questions ===== |
**Question:** I want to add an entry for an application that's installed by hand, rather than through the package manager. If I make a local copy of /etc/xdg/xubuntu/menus/xfce-applications.menu, then when I add a further application using the package manager, won't it change only the master? Will I have to re-copy and re-edit? | **Question:** I want to add an entry for an application that's installed by hand, rather than through the package manager. If I make a local copy of /etc/xdg/xubuntu/menus/xfce-applications.menu, then when I add a further application using the package manager, won't it change only the master? Will I have to re-copy and re-edit? |
**Answer:** No. The menu file defines which categories of entry go where. Your further application will appear in the defined place(s). If not, compare its categories with the categories in the menu file and adjust accordingly. Another possible gotcha is that the .desktop file has an OnlyShowIn or NotShowIn line that does not match Xfce. | **Answer:** No. The menu file defines which categories of entry go where. Your further application will appear in the defined place(s). If not, compare its categories with the categories in the menu file and adjust accordingly. Another possible gotcha is that the .desktop file has an OnlyShowIn or NotShowIn line that does not match Xfce. |
| |
| [[|Back to Top]] |
| ---- |
| |
==== Unanswered ==== | ==== Unanswered ==== |
View /usr/share/applications, ~/.local/share/applications, etc. with Thunar. You should see a plain .desktop file listed for the blank entry, between the clickable icons with fancy names. | View /usr/share/applications, ~/.local/share/applications, etc. with Thunar. You should see a plain .desktop file listed for the blank entry, between the clickable icons with fancy names. |
* I run Jaunty and need to make the menu to be multi-level, which, in previous versions I believe, could be achieved by editing '///etc/X11/xdg/xfce4/desktop/menu.xml//' and replace //style="simple"// with //style="multilevel"// in the //<include>//. How do I do this in Jaunty? I need this because I have certain applications under Wine which have very many start-menu entries and they are all merged into one menulevel, which is really annoying to navigate thru. Please help ... | * I run Jaunty and need to make the menu to be multi-level, which, in previous versions I believe, could be achieved by editing '///etc/X11/xdg/xfce4/desktop/menu.xml//' and replace //style="simple"// with //style="multilevel"// in the //<include>//. How do I do this in Jaunty? I need this because I have certain applications under Wine which have very many start-menu entries and they are all merged into one menulevel, which is really annoying to navigate thru. Please help ... |
See http://forums.opensuse.org/english/get-technical-help-here/applications/477258-flat-menu-xfce.html | See https://forums.opensuse.org/showthread.php/477258-Flat-menu-in-xfce |
| |
| [[|Back to Top]] |
| ---- |
| [[https://docs.xfce.org/xfce/xfce4-panel/start|Back to xfce4-panel main page]] |