Go to main content

Oracle® Solaris 11.3 Desktop Administrator's Guide

Exit Print View

Updated: March 2018
 
 

Adding and Modifying System Menus

You can edit menu configuration files and menu data files manually to customize system menus.

How to Add a Menu

    You can add menus for all users in the following ways:

  • Using the file manager

  • Modifying the menu configuration files and menu data files

This task describes the file modification method.

  1. Create a directory entry file for the item that you want to add.
  2. Place the directory entry file in the $XDG_DATA_DIRS/desktop-directories directory.

    For more information about directory entry files, see Working With Directory Entry Files.

  3. In the $XDG_CONFIG_DIRS/menus/applications.menu file, add a <Menu> element for the new menu.

    For more information about .menu files, see Working With Menu Definition Files.

  4. Create a <Name> element below the <Menu> element.

    The content of the element should contain the name for the menu.

  5. Create a <Directory> element below the <Menu> element.

    The content of the element should contain the name of the directory entry file.

    The next time users log in, the menu should appear in the menu bar.

Troubleshooting

If you did not specify any matching rules in the <Include> element or if the rule did not match any desktop entries, then you might not see the menu in the menu bar.

Next Steps

To add an item to a menu, see How to Add an Item to a Menu.

How to Add an Item to a Menu

  1. Create a desktop entry file for the item that you want to add.

    For more information about desktop entry files, see Working With Desktop Entry Files.

  2. Place the desktop entry file in the $XDG_DATA_DIRS/applications folder.
  3. In the $XDG_CONFIG_DIRS/menus/applications.menu file, verify that the <Menu> element contains an <Include> element with a matching rule that selects the desktop entry file created in step 1.

    The next time users log in, the menu item is displayed in the assigned location.

How to Edit the Properties of a Menu

  1. In the $XDG_CONFIG_DIRS/menus/applications.menu file, find the <Menu> element that corresponds to the menu you want to modify.
  2. Note the filename of the directory entry in the <Directory> element.
  3. In the directory entry for this menu, modify the contents to change the properties of the menu.

    For more information about .directory files, see Working With Directory Entry Files.

How to Edit a Menu Item

  1. Locate the desktop entry in the $XDG_DATA_DIRS/applications directory that corresponds to the menu item.
  2. Edit the desktop entry to change the properties of the menu item.

    For more information about desktop entry files, see Working With Desktop Entry Files.

How to Delete an Item From a Menu

  1. In the $XDG_CONFIG_DIRS/menus/applications.menu file, find the <Menu> element that contains the desktop entry you want to delete.
  2. In the <Menu> element, insert an <Exclude> element after the closing tag for the <Include> element.
  3. Insert the <Filename> matching rule as a subelement of the <Exclude> element to delete a desktop entry.

    The next time you log in, the menu item is not displayed in the menu.

Example 2  Deleting an Item From a Menu

The following example shows how to explicitly exclude the desktop entry for the dasher.desktop menu item from the applications.menu file.

<!-- ... -->

<Menu>
    
<Name>Accessibility</Name>
<Directory>Accessibility.directory</Directory>
<Include>
	<And>
		<Category>Accessibility</Category>
		<Not><Category>Settings</Category></Not>
	</And>
</Include>
<Exclude>
	<Filename>dasher.desktop</Filename>
</Exclude>
</Menu>

<!-- ... -->