07.06.2014 Views

2 - Raspberry PI Community Projects

2 - Raspberry PI Community Projects

2 - Raspberry PI Community Projects

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

administrator makes explicit changes to the configuration. When a package<br />

providing an alternative is removed, the alternative automatically goes to the<br />

next best choice among the remaining possible commands.<br />

Not all symbolic commands are explicitly listed by the Debian policy; some<br />

Debian package maintainers deliberately chose to use this mechanism in less<br />

straightforward cases where it still brings interesting flexibility (examples include<br />

x-www-browser, www-browser, cc, c++, awk, and so on).<br />

13.2.3. Menu Management<br />

Modern desktop environments and many window managers provide menus listing the available<br />

applications for the user. In order to keep menus up-to-date in relation to the actual set<br />

of available applications, Debian created a centralized database registering all installed applications.<br />

A newly installed package registers itself in that database, and tells the system to update<br />

the menus accordingly. This infrastructure is handled in the menu package.<br />

When a package provides an application that should appear in the menu system, it stores a<br />

file in the /usr/share/menu/ directory. That file describes some of the application features<br />

(including whether it's a graphical application or not), and the best location for it in the menu<br />

hierarchy. The post-installation script for this package then runs the update-menus command,<br />

which in turn updates all the required files. This command cannot know all the menu types<br />

used by installed applications. As a consequence, packages able to display a menu must provide<br />

an executable script that will be invoked with all the required information from the menu file;<br />

the script should then turn this information into elements that the application with the menu<br />

can use. These filter scripts are installed in the /etc/menu-methods/ directory.<br />

GOING FURTHER<br />

Menus standardization<br />

Debian provides its own menu system, but both GNOME and KDE developed<br />

their own menu management solutions as well. The two projects agreed on a<br />

format for these menus — more precisely, a common format for the .desktop<br />

files that represent menu elements — under the FreeDesktop.org umbrella<br />

project.<br />

➨ http://www.freedesktop.org/<br />

The Debian developers have kept a close eye on this project and .desktop files<br />

can be generated from the Debian menu system. However, neither GNOME<br />

nor KDE use the Debian menu. They both prefer keeping complete control<br />

over their menus. Still, it is possible to enable a “Debian” submenu containing<br />

the official menu as maintained by Debian: in GNOME, the menu editor (in<br />

the alacarte package) is available by right-clicking on the panel menu, then<br />

choosing “Edit menus”.<br />

The administrator can also have a say in the process and in the resulting generated menus.<br />

First, they can delete a menu element even when the matching application is installed, by simply<br />

storing in /etc/menu/ an empty file named according to the package providing the entries<br />

to be disabled. Second, the menu can be reorganized and sections renamed or grouped.<br />

The /etc/menu-methods/translate_menus file is where this reorganization is defined and<br />

Chapter 13 — Workstation<br />

357

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!