[ previous ] [ Contents ] [ 1 ] [ 2 ] [ 3 ] [ 4 ] [ 5 ] [ 6 ] [ 7 ] [ 8 ] [ next ]
Packages-provided menu files should be in
the menu files are actually executable binaries, in which case they go in
/usr/lib/menu/. System-local menu files should be in
/etc/menu/. User-specific menu files should be in
The format is:
?package(package[,package2,...]): \ field1="value1"\ field2="value2"\
Here is an example to describe the syntax of such a file:
?package(gnumeric):\ specifies what packages need to be installed multiple requirements should be separated by comma needs="X11"\ what kind of environment this command expects section="Applications/Office"\ in what section this menu entry should be title="Gnumeric"\ the title of the menu entry command="gnumeric" \ the command to run hints="Gnome,Spreadsheets" \ some hints about menu placement. icon="/usr/share/pixmaps/gnumeric.xpm" the path to the icon to use.
A number sign ("#") can be used to include comments. An entry must be terminated by a newline; however you can use a backslash to escape a newline.
Values must be quoted with ", and meta-characters (", backslash, newline) must be escaped with a backslash.
You can include several entries in the same file.
The file must be encoded in 7-bit ASCII. This is necessary to accomodate window managers that do not support 8-bit encodings. However the translations are not limited in encoding.
?package(...) contains a comma-separated list of packages that need to be installed for the menu entry to be displayed. That should include the package containing the menu file and any packages necessary to run the command not depended on by the package nor essential. Users can use pseudo-package names starting with "local." which are assumed to be always installed.
The fields needs, section, title and command are mandatory. Other fields are optional. Custom fields are supported, so you can add new fields for you own purpose. If a field is specified multiple times in a menu entry, the last instance will be used.
The title must follow the following requirements:
It must be short. There is an optional longtitle field for users that want longer titles.
It must be properly capitalized. Use Emacs and not emacs.
It must be unique. Two entries must not have the same title.
The following needs are documented for use in the Debian menu.
X11: if this program runs under X11.
text: if it runs under a terminal. X11 window managers will spawn an X terminal emulator.
vc: if it runs under a linux virtual console but not under a X terminal emulator.
wm: if it is a X11 window manager. The current window manager will exec(2) this program to avoid "Another window manager is running" errors.
A menu manager can use a special needs value reflecting the menu manager name for menu entries that must only be displayed in this menu manager. Examples include fvwm modules, dwww menu entries.
A program like gnuplot which can be run on X11 as well as on a text terminal should not have an extra entry with needs=X11 with an hard-coded call to an X terminal emulator, because this would defeat the configuration mechanism of menu that allow to choose which window manager is called.
On the other hand, if a program (like
emacs) can be run as real X
application as well as in a terminal, two entries should be listed, otherwise
the program will always be run in an
However, two entries are not allowed to have the same title. The title must be
The section field holds a slash-separated list of hierarchical sections components.
The authoritative list of Debian's menu structure is maintained in the Debian Menu sub-policy document which is part of the Debian Policy package. The current menu structure was drafted in 2006 by Linas Zvirblis with input from the debian-devel mailing list.
The menu structure below is included only for convenience and is not authoritative. If it disagrees with the structure in the Debian Menu sub-policy, please send a wishlist bug to the menu package.
Packages must be placed in leaf sections. Please do not put your packages into any other sections.
Tools to aid people with disabilities or for machines lacking usual input devices.
Examples: gok, yasr, dasher.
Anything relating to HAM radio.
Examples: baken, hamsoft, twlog
Interactive database programs, collection managers, address books, bibliography tools, etc.
gaby, alexandria, mdbtools
Editors, other than office word processors, for text-based information.
Examples: ksubtile, nano, hexedit
Educational and training softwares.
Examples: gtypist, gcompris, quiz
Software that allows you to run non-native software or more than one OS at a time.
Examples: wine, dosemu, qemu
Tools for file management, archiving, searching, CD/DVD burning, backup, etc.
Examples: file-roller, mc, baobab
2D and 3D graphics manipulation software.
Examples: gimp, inkscape, imagemagick
Software that allows you to interface with mobile devices (phones, PDAs, etc.).
Examples: kandy, gnokii, gnome-pilot
Network related software. This is a three-level section, do not put entries directly here.
Mail, USENET news, chat, instant messaging, IP telephony, video conferencing software, etc.
Examples: xchat, gaim, mutt
File transfer software such as download managers, FTP clients, P2P clients, etc.
Examples: amule, gftp, d4x
Network monitoring software
Examples: gip, ettercap, iptstate
Web browsers, tools for offline browsing, etc.
Examples: elinks, epiphany-browser, webhttrack
Web feed (RSS, Atom, etc.) and podcast aggregators.
Examples: akregator, kitty, liferea
Office suites, word processors, spreadsheets, CRM, ERP, financial sofware, etc.
Examples: openoffice.org, tinyerp-client, gnucash
IDEs, debuggers, etc.
Examples: anjuta, gdb, eclipse
Timetable managers, group task trackers, bug tracking software, etc.
Examples: planner, bugzilla, gnotime
Scientific and engineering-related software.
Examples: celestia, spacechart, stellarium
Examples: arb, ncbi-tools-x11, seaview
Examples: chemtool, kalzium, xdrawchem
Software designed for processing, extracting, and presenting generic scientific data.
Examples: fityk, ygraph, mn-fit
Circuit design tools, simulators and assemblers for microprocessors, etc
Examples: geda, gnucap, tkgate
CAD, UML tools, diagram-drawing and other engineering-related software.
Examples: tcm, dia, qcad
Examples: earth3d, qgis, therion
Examples: gcalctool, snappea, xeukleides
Examples: mssstest, gnumed-client, xmedcon
Examples: kxterm, ifrit, paw
Social sciences-related software.
Examples: gnomesword, hanzim, bibletime
Various shells to be used inside a terminal emulator.
Examples: bash, ksh, zsh
Sound players, editors, and rippers/recorders.
Examples: beep-media-player, grip, audacity
System related software.
Administrative and system configuration utilities, also tools for personal user settings.
Examples: gnome-control-center, configure-debian, gksu
Tools for manipulating specific hardware, especially non-standard laptop hardware.
Examples: toshutils, nvclock-gtk, nvtv
This section is reserved for language-env as a special case.
System information and monitoring tools, log viewers, etc.
Examples: top, hal-device-manager, gtkdiskfree
Package managers and related tools.
Examples: aptitude, deborphan, smartpm
Security, cryptography and privacy related software, antiviruses, tools to track and report bugs, etc.
Examples: gpgkeys, bastille, avscan
Graphical terminal emulators.
Examples: xterm, gnome-terminal, rxvt
Text oriented tools like dictionaries, OCR, translation, text analysis software, etc.
Examples: kdrill, stardict, turkey
TV-in, TV-out, FM radio, teletext browsers, etc.
Examples: gradio, gatos, alevt
Software for viewing images, documents and other (non-video) media.
Examples: gqview, evince, gthumb
Video players, editors, and rippers/recorders.
Examples: istanbul, totem, kino
Software for web site editing, web programming, and site administration.
Examples: bluefish, screem, gphpedit
Games and recreations
Games that involve a lot of action and require fast reflexes.
Examples: xsoldier, supertux, xmoto
Role playing and adventure games, interactive movies and stories, etc.
Examples: beneath-a-steel-sky, egoboo, kq
Tetris-like games involving falling blocks.
Examples: crack-attack, frozen-bubble, netris
Games played on a board.
Examples: phalanx, xshogi, xboard
Games involving a deck of cards.
Examples: pysol, ace-of-penguins, xpat2
Tests of ingenuity and logic.
Examples: xmpuzzles, sgt-puzzles, enigma
Simulations of the real world in all detail and complexity.
Examples: flightgear, torcs
Games involving long-term strategic thinking.
Examples: wesnoth, widelands, netpanzer
Server browsers, configurators, editors, and other game-related tools that are not games themselves.
Examples: xqf, crystalspace
Amusements, eye-candy, entertaining demos, screen hacks (screensavers), etc.
Examples: xdesktopwaves, xphoon, xpenguins
programs that provide user documentation
Examples: debian-reference, apt-howto, dhelp
Programs that affect the whole screen.
Tools for blanking the screen. Entries of screen hacks and configuration GUIs should go to other appropriate sections.
Examples: xscreensaver, xlockmore
Tools for locking the screen.
Examples: xscreensaver, xlockmore
X window managers.
Examples: fluxbox, metacity, waimea
FVWM-based window manager modules. As only modules related to the running window-manager are displayed, do not create subsections for specific window-managers.
Examples: fvwm, fvwm-gnome, fvwm95
This section is reserved for wmaker as a special case.
All wmaker specific entries must go here.
Users wanting to access some menu entries quickly can also put them in the root menu. This is done by using section="/". Package-provided menu entries must never use this feature.
The command field holds the command that should be executed when the menu entry
is selected. Commands will be executed with
sh -c using
or the equivalent.
Please make sure the icons you specify are always available on the system. So,
if you want to have an icon with your menu entry, the preferred method is to
supply the icon with that package. Icons should generally be installed in the
Debian package maintainers should ensure that any icons they include for use in the Debian menus conform to the following points:
The icons should be in xpm format.
The icons may not be larger than 32x32 pixels, although smaller sizes are ok.
The background area of the icon should be transparent, if possible.
You can provide both 16x16 and 32x32 pixels icons using the variables icon16x16 and icon32x32 so that the user can configure menu to use one or the other.
If you, as a system administrator, don't like the icons in the menus, simply
change the icon() function from the file
/etc/menu-methods/menu.h, and run
Hints are used to help menu structure generated menus in a more optimal way. For example:
?package(emacs20):\ needs="x11"\ hints="Big,Expert,Featureful" \ section="Applications/Editors"\ title="Emacs 20"\ command="/usr/bin/emacs20"\ icon=/usr/share/emacs/20.3/etc/emacs.xbm
The above hints will tell menu to consider grouping
emacs together with other editors that are marked similar. For
example, if vi on your system has a hints="Small,Expert"
definition, and there are too many entries in the
/Applications/Editors menu entry, then menu will consider creating
a /Applications/Editors/Expert submenu, and put both
vi and emacs in it. (Of course, only if you have
hint_optimize=true in your
It is possible to add entries for menu sections, but it is not mandatory since section entries are created automatically. However, this allows to specify fields for sections like icon and sort. The syntax for menu sections entries is the same as for regular entries, the section field holding the name of the parent section. For example
?package(local.games): needs="text" title="Games" section="/" sort="001"
will sort Games first.
The problem with the stuff in the task bar is that all items are displayed all
of the time. So, if 1500 Debian packages all were to register a button, the
buttons would quickly fill the screen, making the exercise useless. The few
applications that are considered important enough to be listed in the task bar
usually vary widely on each system, making it impossible to select a ``happy
few'' apps that are allowed there on every Debian system. If you (as a local
system administrator) want your
fvwm2 to have a few buttons, you
can install files for those packages in /menu/$package, containing
a menu entry like this:
?Package(xmball):needs=button\ section=Games/Puzzles\ icon=path-to-pixmap.xpm\ title="Xmball"\ command=/usr/games/xmball
Then, do the following:
cd /etc/menu-methods/ cp fvwm2 fvwm2button vi fvwm2button
and remove all the "supported" entries, adding the one below. For the rest, leave everything the same except those listed below.
supported button="+ Style \"" $title "\" TitleIcon" $icon " Exec " $command "\n" endsupported startmenu: "AddToTitlebar \n" endmenu: "\n" submenutitle:"" mainmenu: genmenu: "buttondefs.hook"
(Of course regular users (not system administrators) can also specify `buttonfiles' in their ~/.menu/ directory).
[ previous ] [ Contents ] [ 1 ] [ 2 ] [ 3 ] [ 4 ] [ 5 ] [ 6 ] [ 7 ] [ 8 ] [ next ]
Debian Menu Systemversion 1.4, 10 November 2011