[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Install-*-menu policy



On Sun, 3 Nov 1996, joost witteveen wrote:

> The recently to fvwm2 added feature "install-fvwm2menu" has the rather
> big disadvantage that any package installed before fvwm2 will not be
> able to add a menu entry to the fvwm2 menu.
>
> Also, with "install-fvwm2menu" we will only be able to make menu's for
> fvwm2. If we want to make menu's for other window managers, or for a
> console menu, we will have to modify each package's postinst that has
> a install-fvwm2menu line in it.
>
> Therefore, I recently proposed on debian-devel to add two scripts
> (install-menu and remove-menu) to a package that's marked "essential".
> These scripts would do nothing but adding/remove a line to a
> menu-file: something like (see real version of install-menu below)


another method of doing it which might prove more robust is to
have an extra (optional) control file called "package.menu".
This gets installed in /var/lib/dpkg/info/ along with
package.{list,prerm,postrm,preinst,postinst}

> we should use the general install-menu:
> 
>   install-menu needs menu entryid icon text cmd
>                ^^^^
> Note the extra "needs". This would be eighter "X", or "VC", or, maybe,
> "Braille" for a braille reader.

Using joost's definitions but renaming "needs" to "type", the
package.menu file should contain line(s) of the form:

type menu entryid icon text cmd



At that point, menus can be generated at will, just by processing
/var/lib/dpkg/info/*.menu - e.g. by a script called gen-menu, which
knows how to make menus for fvwm, fvwm2, fvwm95, and whatever other
window managers or text mode menu systems we have by calling scripts
provided by the WM/menu package and registered with gen-menu in the
postinst script

e.g. fvwm95 would provide a gen-menu.fvwm95 script, and register it with
gen-menu.

gen-menu could be run from the command line, be an extra option in
dselect's menu (between Config & Remove), run from cron, etc.  With
no arguments it would generate all menus for all window managers/menu
systems.  

The main gen-menu script should provide the input to the package
specific scripts, pre-processing the input files as required.  It reads
all of the relevant input files and feeds specific types of menus
(e.g. Applications, Games, Shells) into the sub scripts.  It should also
drop "type=X" menu items for text menus, and convert "type=VC" items to
run in an xterm for WM menus.

other things it should be able to do include:

  generate a specific type of menu (e.g. Applications), optionally for
  a specific window manager (e.g. fvwm2).  This is the key function,
  almost everything else can be built from this.

  generate menus for just one WM

  delete menus for one WM (for use in postrm scripts)

  list which WMs it can work with



A nice extension would be to have a directory for sysadmins
to add custom stuff to menus. say, for example, a directory
called /var/lib/menus which contained files like shells.menu.top,
shells.menu.bottom, games.menu.top, games.menu..bottom etc.

the *.top files add items at the top of the menu, the *.bottom files add
items to the bottom of the menu.

easily customising the shells menu would be particularly useful to me
- i have about a dozen machines i need to rlogin into (usually several
times a day) so i have set up an XTerms menu in fvwm2 & fwwm95 which
contains several lines like "XTerm -T hostname -e rlogin hostname" -
whenever i need to login to one of those machines, i just pick it off
the menu list.



this idea obviously needs more work.  I know what i want but am finding
it difficult to translate my conceptual model into words.


Craig

--
TO UNSUBSCRIBE FROM THIS MAILING LIST: e-mail the word "unsubscribe" to
debian-devel-REQUEST@lists.debian.org . Trouble? e-mail to Bruce@Pixar.com


Reply to: