Often, a user only wants to add or delete menu items in addition to the standard system menu. To support these changes, you should use the <MergeFile> element with the attribute type="parent" within the user's applications.menu file.
The <MergeFile> element enables a menu to be merged with the contents of the user's menu file. When you specify the element's type attribute as “parent”, the contents of the <MergeFile> element are ignored. T he next applications.menu file in the $XDG_CONFIG_DIRS/menus directory is used for merging.
The menu merging is performed as follows:
The children of the root <Menu> element in the merged menu file are substituted for the <MergeFile> element in the base menu file.
All child <Menu> elements with the same name are consolidated into a single <Menu> element by appending all child elements of each <Menu> element with the same name into the last occurrence of the menu element.
The following example shows a user menu file explicitly merging the system menu file .
<!DOCTYPE Menu PUBLIC "-//freedesktop//DTD Menu 1.0//EN" "http://www.freedesktop.org/standards/menu-spec/menu-1.0.dtd"> <Menu> <Name>Applications</Name> <MergeFile type="parent">/etc/xdg/menus/applications.menu</MergeFile> <Menu> <Name>Accessibility</Name> <Exclude> <Filename>dasher.desktop</Filename> </Exclude> </Menu> </Menu>