SUSE Linux Enterprise10 lets you edit menus in either of the following ways:
The Alacarte application enables you to customize the GNOME Main menu. Users can edit their own menus, and administrators can customize the menu for all users with accounts on the computer. The system-wide menu can also be distributed to other computers.
![]() | Note |
|---|---|
Changes you have made to the Main menu are not overwritten during a subsequent system update. Changes are applied after the latest menu view is generated. | |
This section contains the following information:
Alacarte is not installed when you install SUSE Linux Enterprise Desktop. To install Alacarte:
Click .
YaST Control Center opens.
(Conditional) If prompted, enter the root password.
Click .
In the search box, type alacarte, then click .
Select , then click .
When prompted, insert the specified installation medium.
For example, if you are using CDs, insert SUSE Linux Enterprise Desktop CD 2.
Click .
Wait a few moments while the system checks dependencies, then installs Alacarte.
When asked whether you want to install more packages, click .
Alacarte is now installed and two icons are added to the GNOME Control Center.
Click .
Click .
There are two icons. Mouse over them to determine which is used for system-wide changes and which is used for your own local menu. Use the system-wide version if you are modifying a menu for all users on your system or want to distribute the menu to other computers. Use the regular version to modify your own menu.
The window opens.
You can now edit the menu.
This section describes the following ways you can edit the Main menu:
![]() | Important |
|---|---|
The first time you use Alacarte, changes to the menu do not take effect until you log out and log back in. After the first time, changes appear immediately when you make them. | |
![]() | Note |
|---|---|
Some features of Alacarte, such as the ability to nest groups and insert separators, apply only if you use older versions of the GNOME menu. | |
The window is arranged with the Main menu submenus in the list on the left and the items in the selected menu in the list on the right. Groups in a submenu are nested below that submenu. To find an item, click the arrow next to a submenu in the list, select the group containing that item, then locate the item in the list.
For example, to locate the Sound Recorder application:
Start Alacarte as described in Section 10.2.1.2, “Starting Alacarte”.
Click the arrow next to the submenu in the list, then select the group.
Locate Sound Recorder in the list.
You can use Alacarte to change the order in which items appear in the Main menu. For example, you might want to place your frequently used applications at the top of the menu or at the top of their groups to make them easier to find.
To move an item, click it and drag it to a new location in the menu. You can move the item to a new location in the same menu, or drop it on an item in the list to move it to a new menu or group.
Separators serve as visual cues to make it easier to find items in menus.
![]() | Note |
|---|---|
Separators are not used in the current version of the GNOME menu. Adding a separator will have no effect. However, if you install and use an older version of the GNOME menu, you can use separators. | |
To create a separator:
Select the item above the space where you want the separator to appear.
For help locating an item, see Section 10.2.1.3.1, “Finding Menu Items”.
Click .
The new separator appears beneath the selected item in the list. You can drag the separator to a new location like you would any other menu item. To delete a separator, see Section 10.2.1.3.5, “Deleting Items from the Main Menu”.
To show or hide an item, locate the item in the list, then select or deselect the box next to that item. When you hide an item, it remains in list and can be shown at another time if you decide you want it to appear in the menu. To delete an item from the list, see Section 10.2.1.3.5, “Deleting Items from the Main Menu”.
There are two ways to remove an item from the Main menu:
To remove an item but retain it in the Items list so you can easily add it to the menu, hide the item as explained in Section 10.2.1.3.4, “Showing or Hiding Menu Items”.
To delete an item from the Items list so it can no longer be shown, right-click the item and click .
![]() | Note |
|---|---|
Separators can not be hidden. They can only be added or deleted. | |
If you want to show a deleted item, you must add it like you would a new application. See Section 10.2.1.3.8, “Adding New Items to the Main Menu” for information about adding an application.
Locate the menu item whose name you want to change, as explained in Section 10.2.1.3.1, “Finding Menu Items”.
Right-click the item, then click .
Replace the current name with the name you want to give the item, then click .
The old name is replaced by the new one in the menu.
A short descriptive name appears beneath the name of each item in the Main menu. This is known as the generic name. To change the generic name:
Locate the menu item whose generic name you want to change, as explained in Section 10.2.1.3.1, “Finding Menu Items”.
Right-click the item, then click .
Replace the current generic name with the generic name you want to give the item, then click .
The old generic name is replaced by the new one in the menu.
You can add a new item to the Main menu. This is especially helpful when you install an application, but it is also useful if you have other applications that do not currently appear on the menu. You can also add a directory, a link, or another type of item to the menu.
To add an application to the Main menu:
In the list, click the arrow next to the menu containing the group where you want to add the application, then select the group.
The contents of that group appear in the list.
Click .
Type a name and generic name for the item.
Click and browse to the item.
Select the item.
Click the list, then select the type of item.
For example, if you are adding a directory, click the list and select . If you are adding an application, leave the default item type, , as is.
(Optional) To assign an icon to the new item, click , then select an icon for the item.
If you do not select an icon, the item appears in the menu without an icon.
Click .
After the item is added to the menu, you can move it to the place where you want it to appear in the menu, as described in Section 10.2.1.3.2, “Rearranging Menu Items”.
When you install an application, it is usually added in its group in the Main menu, as well as to the group.
![]() | Note |
|---|---|
Some applications do not add themselves to the menu when installed. You can add these applications to the Main menu yourself, using the instructions provided in Section 10.2.1.3.8, “Adding New Items to the Main Menu”. | |
By default, the group holds up to nine items. After the ninth new application is added, subsequent new applications replace the oldest item in the group.
To change the maximum number of applications allowed in the New Applications group:
Alacarte enables you to edit the system-wide Main menu for all users on the system, and distribute it to other computers. These additional systems need not have an identical setup to use the new menu.
![]() | Note |
|---|---|
Changing the system-wide menu requires administrative privileges for the computer whose menu you want to change. | |
To change a system-wide menu and distribute it:
Open Alacarte, using the launcher for the system-wide menu editor.
See Section 10.2.1.2, “Starting Alacarte” for more information.
Enter the root password.
Make the desired changes to the menu, as described in Section 10.2.1.3, “Editing the Menu”.
Click .
The changes you made now appear for all users of the system.
The changes you make to the system-wide menu are saved in the
/etc/opt/gnome/alacarte-system directory. To use this menu on other
computers:
Copy the /etc/opt/gnome/alacarte-system directory to the other
computers.
Copy the following lines from the /etc/profile.d/xdg-enviroment.sh
file on the original system to the /etc/profile.d/xdg-enviroment.sh file
on the target system:
#START SECTION ADDED BY ALACARTE export XDG_DATA_DIRS=/etc/opt/gnome/alacarte_system:$XDG_DATA_DIRS export XDG_CONFIG_DIRS=/etc/opt/gnome/alacarte_system:$XDG_CONFIG_DIRS #END SECTION ADDED BY ALACARTE
The way in which the GNOME Desktop implements menus enables you to do the following:
Customize the menu hierarchy easily. The menu hierarchy is not based on the file system hierarchy. You can edit a small number of files to customize the menu hierarchy. You do not need to modify your applications or move files.
Install applications easily. You do not need to provide information about the menu hierarchy to applications when you install the applications.
Configure menus so that users cannot modify them.
Menus in the GNOME Desktop use the following components:
A desktop entry file is a data file that provides information about an item in a menu.
This file specifies the details for the item such as a name, a command to run, or an icon. It
also contains keywords which determine the location of the item in the menu hierarchy. Desktop
entry files have a .desktop file extension.
The following is a sample desktop entry file:
[Desktop Entry] Encoding=UTF-8 Name=Calculator Comment=Perform calculations Exec=gcalctool Icon=gcalctool.png Terminal=false Type=Application Categories=GNOME;Application;Utility; X-GNOME-DocPath=gcalctool/gcalctool.xml
The following table describes the most important keys in desktop entry files.
Table 10.7. Desktop Entry File Keys
|
Desktop Entry Key |
Description |
|---|---|
|
Encoding |
Specifies the encoding of the desktop entry file. |
|
Name |
Specifies the name of the item. This name is displayed on the item in the menu. |
|
Comment |
Specifies a short description of the item. The comment is displayed as a tooltip when you point to the item in the menu. |
|
Exec |
Specifies a command to execute when you select the item from the menu. |
|
Icon |
Specifies the filename of an icon that represents the item. Does not specify the file extension or the path to the filename. |
|
Terminal |
Specifies whether the command in the Exec key runs in a terminal window. If the value is True, the command runs in a terminal window. If the command does not create a window in which to run, the value of this key must be True. |
|
Type |
Specifies the type of item. This value is one of the following: |
|
Categories |
Specifies the keywords that describe the item. The keywords are separated with semicolons (;). To view a list of the standard category keywords, see the desktop menu specification at freedesktop.org The vfolder information files map the keywords to menus. |
|
X-GNOME-DocPath |
Specifies the help file to display when you select Help on application-name from the menu item pop-up menu. |
For more information on the keys in desktop entry files, see the desktop entry specification at http://www.freedesktop.org.
![]() | Note |
|---|---|
Panel launchers and desktop objects also use desktop entry files. These desktop entry files provide the same information as for items in a menu. For example, the desktop entry files provide the command to run when a user selects the launcher or object. | |
A directory entry file is a data file that provides information
about a menu. The directory entry file specifies the details for the
menu, such as a name, a tooltip, and an icon. Directory entry files
have a .directory file extension.
The following is a sample directory entry file:
[Desktop Entry] Name=Accessories Comment=Accessories menu Icon=gnome-util.png Type=Directory
The following table describes the most important keys in directory entry files.
Table 10.8. Directory Entry File Keys
SUSE Linux Enterprise uses the freedesktop.org menu specification. This specification uses the following files and directories:
Table 10.9. Menu File Locations
For more detailed information on adding and editing menu items, see the Desktop Menu Specification Web site.