JavaScript is required to for searching.
Skip Navigation Links
Exit Print View
Oracle Solaris 11.1 Desktop Administrator's Guide     Oracle Solaris 11.1 Information Library
search filter icon
search icon

Document Information

Preface

1.  Administering the Oracle Solaris Desktop

2.  Managing User Preferences With GConf

3.  Customizing Menus

Menus Overview

Working With Menu Definition Files

Working With Directory Entry Files

Working With Desktop Entry Files

Editing Menus

Adding and Modifying System Menus

How to Add a Menu

How to Add an Item to a Menu

How to Edit the Properties of a Menu

How to Edit a Menu Item

How to Delete an Item From a Menu

Creating and Modifying User Menus

Merging Menus

Merging User and System Menus

4.  Installing Themes

5.  Customizing Fonts

6.  Working With MIME Types

7.  Managing Screensavers

8.  Managing Sessions

9.  Overview of the Yelp Help Browser

10.  Improving the Performance of the Oracle Solaris Desktop System

11.  Disabling Features in the Oracle Solaris Desktop System

12.  Working With the X Window System

A.  Hidden Directories

Glossary

Index

Editing Menus

The two types of menus are system menus and user menus.

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:

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 on 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 3-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>

<!-- ... --> 

Creating and Modifying User Menus

You can use the Main Menu preference tool to edit menus. Alternatively, you can manually create and edit a user menu file. For more information, see Oracle Solaris 11.1 Desktop User’s Guide.

To manually create a custom menu for a user, the $XDG_CONFIG_HOME/menus/applications.menu file must exist. If the $XDG_CONFIG_HOME environment variable is not set, the default ~/.config directory is used. Because $XDG_CONFIG_HOME is the first location that is searched for the applications.menu file, the $XDG_CONFIG_HOME environment variable takes precedence over all other menu files.

User menus can contain all elements described in the Working With Menu Definition Files. For a complete list of the allowed elements, see the XDG menu specification.