Vasco Dias @blog

another blog about stuff?? oh yeahh

Changing Xfce 4.8 menu

With the new release of Xfce there’s a new system in place but there isn’t any interface included to edit the menu. This isn’t really a problem because now it just follows the freedektop specification and you are able to use other tools for the job like Alacarte menu editor. If you’re into it and don’t mind installing all the gnome dependencies atached to it you’ll be fine. If you want to do it the hardcore way i’ll try to tell you where to look.

Menu structure

First you’ll need to know where to locate the file that describes the structure of the menu that is shown. The default menu is located at /etc/xdg/menus/xfce-applications.menu and if you want to edit it you should copy it to ~/.config/menus/xfce-applications.menu. Now you can start editing it the way you want. By default there are all those categories specified that will load the corresponding applications and create the menus automatically, but you’re really into it it is probably possible to create a totally custom menu where you specify exactly everything you want.

For example what i wanted to change in my menu was simply remove the “Run Program…” from the top and those “Help” and “About Xfce”. Although this should be enough it caused some problems, because if we keep the include statement of “X-Xfce-Toplevel” at the beggining of the file it will still load those entries that i wanted to remove and now they will appear at random places in the menu. If we remove that include statement those launchers like “exo-terminal-emulator.desktop” or “exo-web-browser.desktop” won’t work.

Changing options for specific applications

So the previous problem can be solved if we remove the category “X-Xfce-Toplevel” from those exo-*.dektop files or by hiding the application we don’t want to see. Both of these options can be changed in the same place. Now the desktop entry specification comes into play. All of the launchers for the applications that appear in the menu are located under /usr/share/applications and if you want to change any of them just copy the relevant file you want to ~/.local/share/applications. Now you just need to open the file and edit the contents. The relevant options are “Categories=”, “Hidden=” and “NoDisplay=”. More details for what each option does go to Description on Desktop Menu Specification. Note that for a minimal accepted file the keys that are shown as required need to be present or weird things will happen.

This is how my menu looks now:

And this what i have in my ~/local/share/applications:

Relevant links i recommend:
Xfce Bug
Xfce Wiki
Desktop Menu Specification
Desktop Entry Specification

Advertisements

8 responses to “Changing Xfce 4.8 menu

  1. william 16 August 2011 at 17:23

    What theme do you use for xfce?

  2. Pingback: The grass is still greener on my side. | omnsproject.org

  3. Pingback: The grass is still greener on my side. | grantgalbraith.net

  4. Pingback: The grass is still greener on my side. | omns and debian

  5. Piotrek 20 October 2011 at 04:33

    Very helpful. Thanks!
    I prefer to keep my xfce pure so didn´t like the idea of having to install all the gnome crap dependencies just to be able to use alacarte…

  6. Rex 17 January 2012 at 08:24

    Can’t change the menu, I could easily do that in Windows 15 years ago. Now I’m wondering if I made a mistake by installing xubuntu.

    • diaz 17 January 2012 at 20:28

      Hi, if you can’t do it using this information or other available on the internet maybe you should try the normal version of Ubuntu.

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 )

Twitter picture

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

Facebook photo

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

Google+ photo

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

Connecting to %s

%d bloggers like this: