diff options
author | Bill Allombert <ballombe@debian.org> | 2011-11-16 12:33:27 +0100 |
---|---|---|
committer | Igor Pashev <pashev.igor@gmail.com> | 2013-03-05 16:39:28 +0000 |
commit | dd7279795c97aa356727d366a2149c9bc838b496 (patch) | |
tree | a87d19d2e5220f5b38aec3b5b036235a59f971c9 /doc/menu.html/ch1.html | |
download | menu-debian/2.1.46.tar.gz |
Imported Debian version 2.1.46debian/2.1.46
Diffstat (limited to 'doc/menu.html/ch1.html')
-rw-r--r-- | doc/menu.html/ch1.html | 207 |
1 files changed, 207 insertions, 0 deletions
diff --git a/doc/menu.html/ch1.html b/doc/menu.html/ch1.html new file mode 100644 index 0000000..e060eb6 --- /dev/null +++ b/doc/menu.html/ch1.html @@ -0,0 +1,207 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN"> + +<html> + +<head> + +<meta http-equiv="content-type" content="text/html; charset=iso-8859-1"> + +<title>Debian Menu System - Introduction</title> + +<link href="index.html" rel="start"> +<link href="index.html" rel="prev"> +<link href="ch2.html" rel="next"> +<link href="index.html#contents" rel="contents"> +<link href="index.html#copyright" rel="copyright"> +<link href="ch1.html" rel="chapter" title="1 Introduction"> +<link href="ch2.html" rel="chapter" title="2 Menu from the viewpoint of a user"> +<link href="ch3.html" rel="chapter" title="3 The menu file"> +<link href="ch4.html" rel="chapter" title="4 What packages with applications should do"> +<link href="ch5.html" rel="chapter" title="5 What packages with menu managers should do"> +<link href="ch6.html" rel="chapter" title="6 How a user can override the menus"> +<link href="ch7.html" rel="chapter" title="7 The internals of the menu package"> +<link href="ch8.html" rel="chapter" title="8 Variables and functions in the install-menu scripts"> +<link href="ch2.html#s2.1" rel="section" title="2.1 How/when do the window manager startup files get created?"> +<link href="ch2.html#s2.2" rel="section" title="2.2 Tuning of the generated window manager startup files"> +<link href="ch2.html#s2.3" rel="section" title="2.3 Optimization of menu tree: hints"> +<link href="ch3.html#s3.1" rel="section" title="3.1 Location"> +<link href="ch3.html#s3.2" rel="section" title="3.2 Syntax"> +<link href="ch3.html#s3.3" rel="section" title="3.3 The title field"> +<link href="ch3.html#s3.4" rel="section" title="3.4 The needs field"> +<link href="ch3.html#s3.5" rel="section" title="3.5 The section field"> +<link href="ch3.html#s3.6" rel="section" title="3.6 The command field"> +<link href="ch3.html#s3.7" rel="section" title="3.7 The icon field"> +<link href="ch3.html#s3.8" rel="section" title="3.8 The hints field"> +<link href="ch3.html#s3.9" rel="section" title="3.9 Entries for menu sections."> +<link href="ch3.html#s3.10" rel="section" title="3.10 Fvwm's task and title bars"> +<link href="ch4.html#s4.1" rel="section" title="4.1 Providing a menu file"> +<link href="ch4.html#s4.2" rel="section" title="4.2 Adding a hook for dpkg in your packages"> +<link href="ch6.html#s6.1" rel="section" title="6.1 Configuring the menus"> +<link href="ch6.html#s6.2" rel="section" title="6.2 Specifying that a menu entry should not be displayed"> +<link href="ch6.html#s6.3" rel="section" title="6.3 Including other files"> +<link href="ch7.html#s7.1" rel="section" title="7.1 The update-menus program"> +<link href="ch7.html#s7.2" rel="section" title="7.2 The install-menu program"> +<link href="ch7.html#s7.3" rel="section" title="7.3 The install-menu config script definitions"> +<link href="ch7.html#s7.4" rel="section" title="7.4 Hints, tree optimization"> +<link href="ch8.html#s8.1" rel="section" title="8.1 String constants"> +<link href="ch8.html#s8.2" rel="section" title="8.2 Variables"> +<link href="ch8.html#s8.3" rel="section" title="8.3 Functions"> +<link href="ch8.html#s8.2.1" rel="subsection" title="8.2.1 Special variables"> +<link href="ch8.html#s8.2.2" rel="subsection" title="8.2.2 Preferred variables"> +<link href="ch8.html#s8.2.3" rel="subsection" title="8.2.3 Suggested variables"> + +</head> + +<body> + +<p><a name="ch1"></a></p> +<hr> + +<p> +[ <a href="index.html">previous</a> ] +[ <a href="index.html#contents">Contents</a> ] +[ 1 ] +[ <a href="ch2.html">2</a> ] +[ <a href="ch3.html">3</a> ] +[ <a href="ch4.html">4</a> ] +[ <a href="ch5.html">5</a> ] +[ <a href="ch6.html">6</a> ] +[ <a href="ch7.html">7</a> ] +[ <a href="ch8.html">8</a> ] +[ <a href="ch2.html">next</a> ] +</p> + +<hr> + +<h1> +Debian Menu System +<br>Chapter 1 - Introduction +</h1> + +<hr> + +<p> +Before the advent of <code>update-menus</code>, when the sysadmin installed a +package onto a Debian system, they would need to edit various window manager +config files to make the new program show up on, for example, +<code>fvwm</code>'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. +</p> + +<p> +<code>update-menus</code> automatically generates menus of installed programs +for window managers and other menu programs. It should be run whenever a menu +file or menu-method file is changed. <code>update-menus</code> will be ran +automatically when Debian packages that contain menu files are installed or +removed from the system. Users themselves can add/delete menu items, and +should then run <code>update-menus</code> as that user, thus creating +window-manager startup files that are used in preference to the systemwide +files. +</p> + +<p> +One problem we ran into with menu-1.x (and before) was that the number of +entries in any submenu vary wildly: on my system there are only two entries in +<samp>/Applications/Editors</samp>, while I'm sure that other people have more +like 20 entries there. Many people complained about the fullness of certain +submenus, citing scientific studies or personal experience to explain why +overfull or underfull submenus are a bad thing. To overcome this, menu-2.0 now +can optimize the tree itself, possibly subdividing for example the +<samp>/Applications/Editors</samp> tree in, say <samp>Editors/Beginner</samp>, +<samp>Editors/Experienced</samp>, or whatever, if there are many entries in +that submenu, or maybe even totally removing <samp>/Applications/Editors</samp> +on systems where there are few editors installed. To be able to do this, menu +follows the information supplied to it in the `hints' variables (see paragraph +below, or the hints chapter). +</p> + +<p> +Each package that needs to add an entry to the menu tree, includes a menu file +<code>/usr/share/menu/package-name</code>. In this file, it will have one line +per menu entry, like this (copied from <code>/usr/share/menu/xbase</code>): +</p> + +<pre> + ?package(xbase):command="/usr/bin/xedit" needs="X11" \ + section="Applications/Editors" title="Xedit" \ + hints="Beginner,Small" +</pre> + +<p> +This describes the type of interface Xedit needs (X11), the menu section the +menu entry should be in, the menu text, and the command that should be +executed. Also, it tells menu that, if <samp>/Applications/Editors</samp> is +overfull, it could put Xedit in a <samp>Applications/Editors/Beginner</samp> or +<samp>Applications/Editors/Small</samp> subsection. +</p> + +<p> +Whenever <samp>root</samp> runs <code>update-menus</code>, it will check all +menu files in <code>/etc/menu</code>, <code>/usr/lib/menu</code>, +<code>/usr/share/menu</code>, and run the installation scripts that display +managers like <code>fvwm2</code> should provide in +<code>/etc/menu-methods</code>. +</p> + +<p> +The menu package itself provides a set of default menu files, for people to get +the idea, and to speed up things a bit. (These files should be incorporated +into the package.) +</p> + +<p> +Note, that substantial and incompatible changes took place with the menu-1.0 +release, while substantial features were added by the release of menu-2.0. +This document describes menu-2.0. Menu-2.0 now doesn't accept the menu-methods +written for menu-0.x, but for most window managers that still have those old +menu-methods, I have put new style menu-methods in +/usr/share/doc/menu/examples. Everything written for menu-1.0 will work with +menu-2.0. +</p> + +<p> +Most notable changes between menu-0.x and menu-1.x are listed in the file +README.changes in the menu package, the features added by menu-2.0 can be +summarised here: hints, and the menu-2 compat mode. (where lines are finished +by a ';' instead of a newline). +</p> + +<hr> + +<p> +[ <a href="index.html">previous</a> ] +[ <a href="index.html#contents">Contents</a> ] +[ 1 ] +[ <a href="ch2.html">2</a> ] +[ <a href="ch3.html">3</a> ] +[ <a href="ch4.html">4</a> ] +[ <a href="ch5.html">5</a> ] +[ <a href="ch6.html">6</a> ] +[ <a href="ch7.html">7</a> ] +[ <a href="ch8.html">8</a> ] +[ <a href="ch2.html">next</a> ] +</p> + +<hr> + +<p> +Debian Menu System +</p> + +<address> +version 1.4, 10 November 2011<br> +<br> +Joost Witteveen <code><a href="mailto:joostje@debian.org">joostje@debian.org</a></code><br> +Joey Hess <code><a href="mailto:joeyh@debian.org">joeyh@debian.org</a></code><br> +Christian Schwarz <code><a href="mailto:schwarz@debian.org">schwarz@debian.org</a></code><br> +Bill Allombert <code><a href="mailto:ballombe@debian.org">ballombe@debian.org</a></code><br> +<br> +</address> +<hr> + +</body> + +</html> + |