Before the advent of update-menus, when the system administrator installed a
package onto a Debian system, they would need to edit various window
manager configuration files to make the new program show up on, for example,
fvwm's menus. The menus could easily become out of sync with what programs
were actually available, with some menu items that didn't work, and other
programs that lacked a menu entry.
update-menus
and Debian's menu package aim to solve this problem.
update-menus
automatically generates menus of installed programs for window
managers and other menu programs. It should be run whenever a
menufile(5)
or menu-method file is changed.
update-menus
will be ran automatically when Debian packages that contain menu
files are installed or removed from the system.
update-menus
uses the package-supplied menu entry files (in /usr/lib/menu) for
it's information about the menus (but this can be overruled by the
system administrator/user, see below). If a menu entry file is executable,
update-menus
execute the menu entry file, and use it's stdout to generate the menu
database.
OPTIONS
-v
Verbose output. Shows all arguments to the /etc/menu-methods programs.
-d
Debug output. Generates loads of unintelligible output.
-h
Display usage help and exit.
CONFIGURATION
There are several ways to tune the operation of update-menus:
per menu entry, in /etc/menu/$package
In these directory the system administrator or user can override the default
menu files. (if a file /etc/menu/$package exists, than the
corresponding /usr/lib/menu/$package file isn't read any more). Users
who want to override the system wide defaults put their files in
~/.menu. See also
menufile(5)
per window-manager in /etc/menu-methods/$wm
In these configuration files, one can tune generated "system.rc" files for
each individual window manager. For example, one can specify that the
wm should ignore any icons that the packages may supply, or set the
default wrapper for text-only applications (usually, an xterm is started to
run a text-only application like vi). Users who want to override the system
wide defaults put their files in ~/.menu-methods. For more info, see
/usr/doc/menu/html.
globally, in /etc/menu-methods/translate_menus
This file contains translations that will be performed for all
menu entries and all window managers. You can specify things like:
`All sections that start with "Apps/Games" should be mapped to "Games"',
or `menuentryid "gnuplot" should have a title of "GnuTeken" (to
translate titles into other other languages)'. Look at the default
/etc/menu-methods/translate_menus for an example. Users who want to
override the system default translate file, put one in
~/.menu-methods/translate_menus.
error report configuring, in /etc/menu-methods/menu.config
This file contains general information for the overall behaviour of
update-menus. At the moment you can only configure how verbose the
output of update-menus is, and where it sends the output. The amount
of information is specified by `verbosity=VAL'. Use VAL=quite to stop
update-menu from reporting anything but the most important errors,
VAL=normal, VAL=verbose, VAL=debug for progressively more output.
To specify where the output should go, use `method=stdout',
`method=stderr', or `method=syslog facility priority'. `Facility' is one
of auth, authpriv, authcron, authdaemon, authkern, authlocal0, authlocal1,
authlocal2, authlocal3, authlocal4, authlocal5, authlocal6, authlocal7,
authlpr, authmail, authnews, authsyslog, authuser,
authuucp. `priority' is one of emerg, alert, crit, err, warning,
notice, info, debug.
FILES
Menu files: (Earlier listed directories override those listed later.)
~/.menu/*
Menu files added by the user. (Isn't read if root runs update-menus)
/etc/menu/*
Menu files added by the system administrator.
/usr/lib/menu/*
Menu files provided by other Debian packages.
/usr/lib/menu/default/*
Menu files provided by the menu package. (These are for packages that
don't provide menu entries yet. If you see (or maintain) a package that
supplies a menu file in /usr/lib/menu/, please email me and I'll remove
that menu file from /usr/lib/menu/default/).
Menu methods:
/etc/menu-methods/
Executable configuration files that are added by window managers and other menu
programs, these files are run by
update-menus
to generate menus for the different programs. Also in this directory
is the translate file, used for local configuration of the shape of the
menu trees.
~/.menu-methods/
For users to override the system-defaults of /etc/menu-methods.
If this directory exists, no files in /etc/menu-methods are read
any more.
DISTRIBUTION
Distribution is subject to the GNU public license.
BUGS
update-menus
may not work properly when run by a normal user, to generate menus for that
user. This is usually because the window manager doesn't expect the
system."$wm"rc files in the directory (usually ~/."$wm", configurable
in /etc/menu-methods). If you see such a thing, and you find a
solution, please mail me (joostje@debian.org). It should work OK for
fvwm and fvwm2: I usually test the package first as an ordinary user.
To Joey Hess, for a lot of good ideas and pre-release testing, and to
Tom Lees for a update-menus in pure C (of which I only used one
function, but that's life).