NOTE: CentOS Enterprise Linux is built from the Red Hat Enterprise Linux source code. Other than logo and name changes CentOS Enterprise Linux is compatible with the equivalent Red Hat version. This document applies equally to both Red Hat and CentOS Enterprise Linux.
Chapter 3. Menu Editing and
It is often useful for an administrator to add or remove items
from the main desktop menu.
Owing to the complexity of the menu system, modifying the menu can sometimes be a difficult task.
For example, it is much more difficult to add a menu item than it
is to remove a menu item.
This chapter provides an overview of the menu system and
documents methods for:
Removing menu items for individual users
Removing menu items for all users
Removing submenus for individual users
Removing submenus for all users
This overview of the menu system is not intended to to be
comprehensive in its scope. For detailed information about the menu
system, refer to the various menu-related specifications at the
freedesktop.org web site: https://www.freedesktop.org
The Red Hat menu system is based on the the freedesktop.org
Desktop Menu Specification and consists of three major sets of
configuration and data files:
- Menu (*.menu) Files
The *.menu files are XML configuration
files that specify the order, hierarchy, and merging of both menus
and menu items.
The system *.menu files are located in
/etc/xdg/menus/. User-specific *.menu files are located in $HOME/.config/menus/ and can be edited to override
the values specified in the system *.menu
In particular, the /etc/xdg/menus/applications.menu file contains the
definition of the main application menu layout.
- Directory Entry (*.directory)
The *.directory files provide data
about a menu such as its name, tooltip, and
icon, and are located in /usr/share/desktop-directories/. Refer to the
GNOME Desktop System Administration Guide
for more information on directory entry
- Desktop Entry (*.desktop) Files
The *.desktop files provide data about
a menu item such as its name, command to
run, and its icon. The desktop entry files also contain keywords
that determine the location of the menu item in the menu hierarchy.
The system desktop entry files are located in /usr/share/applications/. Refer to the GNOME Desktop System Administration Guide for more
information on desktop entry files.
User-specific desktop entry files are located in $HOME/.local/share/applications/ and can be used to
add applications to the ""
submenu that appears when right-clicking on a file. The $HOME/.local/share/applications/mimeinfo.cache
contains MIME type information associating the $HOME/.local/share/applications/*.desktop
applications with the file types specified in the *.desktop files.