Share your knowledge at the LQ Wiki.
Go Back > Linux Answers > Applications / GUI / Multimedia
User Name


By refdoc at 2005-08-24 17:04
How the menu is build:

/etc/xdg/applications is a Glade xml file, building the application menu.

It uses category/directory entries in /usr/share/desktop-directories (e.g. "Games", Graphics" etc), application entries in /usr/share/applications and icons in /usr/share/pixmaps.

A well-build application entry in the directory /usr/share/applications will simply be added to the existing menu. To add a new category-directory to the menu, both /etc/xdg/applications must be altered and a new entry in /usr/share/desktop-directories must be added.

Adding a an application to the menu:

Application menu items are text files with following compulsory content:

[Desktop Entry]

A useful addition is a line describing the application


To make sure application appears only in one desktop environment of several installed include a line


Other possible additions are Names in other locales, whether an application will run in a terminal etc.

Adding a new category is a bit more complicated.

Firstly /etc/xdg/menus/applications must be edited by adding somewhere in the toplevel section <Menu> after the legacy menu entry description.

The file is in XML format and will be used to build up the menu. If you add your entry make sure that the XML file remains well formed.

<!-- MyCategoryCommentary -->
</Menu> <!-- End MyCategory -->

Secondly an entry in /usr/share/desktop-directories must be added. This should be again a simple text file with following compulsory content:

[Desktop Entry]

The file must be named <MyCategory>.desktop

Menu categories can be nested multiple times, but this should be discouraged. The beauty of the new Gnome menu system is its simplicity.

The multiplicity of legacy menu systems in gnome and competing menu systems in KDE etc can make menus in Gnome quite messy. My personal solution was to search out all entries added by the legacy systems and adding them in the new way. Quite a few (even new-ish Gnome applications) put their entries into are the subdirectories of /usr/share/apps. After addition of a line


the entries there can simply be moved to /usr/share/applications.

For reasons unknown to me sometime new menu items do not immediately appear in the menu. Usually this is solved by restarting X.

by Cicade on Sun, 2005-10-09 13:24
Hi there there is no /etc/xdg/applications in my LinuxSuse Gnome
So how can I edit my applications menu?
There is also no usr/share/applications/.desktop (some other guy keeps on telling this is the place to be foor editing applications menu in gnome.

by danny001985 on Sat, 2010-05-08 20:44
Try Flash movie player


All times are GMT -5. The time now is 02:46 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration