Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com
Answertopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions
Privacy Policy

  




 

 

3.2. Removing Menu Items for Individual Users

The menu configuration files for a given user are located in the $HOME/.config/menus/ directory. The *.menu files are XML configuration files that allow you to override the system menu defaults.

For example, to remove the Calculator menu item from the Accessories submenu, edit the applications.menu file in the $HOME/.config/menus/ directory, adding a new <Menu> section using the <Exclude> element as shown:

<!DOCTYPE Menu PUBLIC "-//freedesktop//DTD Menu 1.0//EN"
"https://www.freedesktop.org/standards/menu-spec/1.0/menu.dtd">

<!-- File created by desktop-file-utils version 0.8 -->
<Menu>
  <Name>Applications</Name>
  <MergeFile>/etc/xdg/menus/applications.menu</MergeFile>


<!-- Removes the Calculator from the Accessories submenu -->
  <Menu>
    <Name>Accessories</Name>
    <Exclude>
      <Filename>gnome-gcalctool.desktop</Filename>
    </Exclude>
  </Menu>
<!-- END of Calculator removal content -->

</Menu>

The *.desktop file that corresponds to a given menu item can be found in the /usr/share/applications/ directory. The gnome-gcalctool.desktop file corresponds to the Calculator menu item. Note that the name of the submenu (Accessories, in this case) can be determined from the files located in the /usr/share/desktop-directories/ directory.

Similar methods can be used to remove other items from the Applications menu and its submenus.

NoteNote
 

The user's session must be restarted for the menu changes to take effect.

 
 
  Published under the terms of the GNU General Public License Design by Interspire