Add items to Xfce Applications Menu

To add an application launcher to Xfce Applications Menu is simple; all you have to do is place the *.desktop file that launches the application in the right folder.

Create the *.desktop file
Create a text file whose extension is 'desktop', with the following content:
[Desktop Entry]
Version=1.0
Type=Application
Name=ItemName
Exec=Command
Icon=IconFile
Categories=Category;


On ItemName write the name that should be displayed on the menu. Command is the command that should be run. IconFile is the path to some *.png file. The Category dictates the sub-menu where the item will be placed. See the table bellow to see what Category value you should use.

Sub-Menu Categories
Accessories Utility
Development Development
Games Game
Graphics Graphics
Internet Network
Multimedia AudioVideo
Office Office
System System
A new item can be placed on a sub-menu by selecting the right 'Categories' value

To learn more about *.desktop files see the reference at the end of this post.

Add an item for you user only
Copy the *.desktop file to: $HOME/.local/share/applications

Add an item for all users
You'll need root privileges to do this.
Copy the *.desktop file to: /usr/share/applications

After you copy the *.desktop file the new item will be automatically added to the Applications Menu.

References:
Xubuntu : XFCE Menu Items
Customize the Xfce menu
Anatomy of a .desktop File

Comments

  1. .
    You can further organize the menu items, by submenu, using "Categories" ... for example

    I add the following 2 lines, to ensure my Desktop file (launcher) is in the "Development" submenu ...

    Categories=Application;Development;Java;IDE
    Type=Application

    ReplyDelete
  2. Hi!

    I know this is an old entry, but adding items to menu in 12.10 Quantal isn't working. I'd like to have file manager inside the menu so i don't have to go via accessories.

    Thank you!

    ReplyDelete
    Replies
    1. I'm aware that alacarte is a little buggy on Quantal.
      To add "File Manager" bellow "Mail Reader" proceed as follows:

      1) run this command:
      gksu leafpad /etc/xdg/xdg-xubuntu/menus/xfce-applications.menu

      2) on this file locate the line inside the "Include" section:
      exo-mail-reader.desktop

      3) and add this line bellow it:
      exo-file-manager.desktop

      4) now locate the same line as in 2) inside the "Layout" section and add the line in 3) bellow it.

      A "File Manager" entry should be now available on the "Applications Menu".

      You can also use "Super+F" to run the "File Manager"

      Delete
    2. The file xfce-applications.menu is empty!
      Please help me add the launcher of eclipse ide to the development category in the applications menu

      Delete
    3. Which file is empty? Your user's or the system's? And have you tried had the launcher through alacarte?

      Delete
  3. May i ask how is possible to view only applications in desktop menu ? Something like this here: http://cdn.ghacks.net/wp-content/uploads/2009/05/xfce_desktop.png

    ReplyDelete
    Replies
    1. Yes. You can remove the app menu from the panel.

      Delete
  4. Thanks for the post! Couldn't figure out how to do it, making a new .desktop file worked like a charm.

    ReplyDelete
  5. Really great and Awesome article.. It works like charm!!! Thanks for sharing this post.
    Thank!!!

    OG

    ReplyDelete
  6. One thing I noticed on Xubuntu 16.04 is that I had to reload the panel in some way to add the program to any categories like games, but rather than restart my whole system, I just ran pkill xfce4-panel; nohup xfce4-panel &, if this helps anyone.

    ReplyDelete

Post a Comment

Popular posts from this blog

[HOW TO] Create QR Codes in Xubuntu 12.04

[FIX] VLC is unable to open the MRL (smb://)