LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Linux Answers > Applications / GUI / Multimedia
User Name
Password

Notices


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]
Name=<MyApplicationName>
Exec=<MyApplicationCommand>
Icon=<MyApplicationIcon>
Type=Applications
Categories=Applications;<MyCategory>

A useful addition is a line describing the application

Comment=<MyComment>

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

ShowOnlyIn=<desktop>

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>
<Name>MyCategoryName</Name>
<Directory>MyCategory.directory</Directory>
<Include>
<And>
<Category>MyCategory</Category>
</Include>
</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]
Name=<MyCategoryName>
Type=Directory
Icon=<MyCategoryIcon>

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

Category=Applications;<MyApplicationCategory>;

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.
Cicade

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

http://tips-linux.net/en/content/fla...yer-standalone


  



All times are GMT -5. The time now is 05:26 PM.

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