Testing Menu managers in Debian

Bill Allombert ballombe@debian.org

March 13, 2002

1 Introduction

The Debian menu system provides an interface to build menus hierarchy for use by menu managers. Menu managers are usually also window managers, but there exist stand alone menu managers. Menu managers interface with Debian menu system via menu-methods scripts in the directories /etc/menu-methods/ and ~/.menu-methods which must comply with the Debian menu system documentation.

The aim of this document is to check the conformance of menu-methods scripts that are in menu managers Debian packages.

This file is available as a TEX file, a DVI file or a HTML document.

Files for reproducing the tests are:

   • /etc/menu/root.menu
   • ~/.menu/user.menu

2 Tests Performed

The tests were performed by adding a file root.menu in /etc/menu reading

?package(local.test):command="/usr/local/bin/test" needs="X11" \
                     section="Apps/Test" title="Test/slash"
?package(local.test):command="/usr/local/bin/test" needs="X11" \
                     section="Apps/Test" title="Test dnl bug"
?package(local.test):command="eval `echo /usr/local/bin/test`" needs="X11" \
                     section="Apps/Test" title="Test backquote"

and a file user.menu in ~/.menu/user.menu reading

?package(local.test):command="/usr/local/bin/test" needs="X11" \
                     section="Apps/Test" title="U Test/slash"
?package(local.test):command="/usr/local/bin/test" needs="X11" \
                     section="Apps/Test" title="U dnl bug"
?package(local.test):command="eval `echo /usr/local/bin/test`" needs="X11" \
                     section="Apps/Test" title="U Test backquote"
The file /usr/local/bin/test is a symlink to /usr/bin/X11/xterm. Afterward update-menus has been

run as root and as the current user. Then each menu managers are tested in turn. Ideally a menu Apps/Test should be created with six entry. Each entries are tested and should launch an X terminal. They are :

• Test/slash: Check if a ”/” in a menu entry is allowed. Some menu managers using directory hierarchy as menus may break.

• Test dnl bug : Check if ”dnl” is treated correctly. Some menu managers preprocessing their config files with m4 may produce undefined behavior.

• Test backquote : Check if backquote (‘) are allowed in command. Some menu managers may not spawn a shell correctly to handle this. Also menu managers preprocessing their config files with m4 may produce undefined behavior.

• U Test/slash, U dnl bug, U Test backquote are similar but are generate from user /.menu directory. Some menu managers does not generate these user menus out of the box.

In the results, window managers that are not menu managers are flagged N/A. a question mark ”?” denotes that I have not been able to do the test. Anything else other than yes or OK indicate a bug.

3 Results

Packages  user menu Test/slash  Test dnl bug Test backquote version
9wm  N/A
aewm  yes  OK  OK  OK  1.1.5-1
aewm++  no menu  1.0.16-3
afterstep  yes  wrong submenu OK  disabled  1.8.10-2
amaterus  N/A
amiwm  N/A
asclassic  no  OK  OK  do nothing  1.1b-24
blackbox  no  OK  OK  OK  0.62.1-1
ctwm  no  OK  OK  OK  3.5.2-5
deskmenu  no menu displayed  1.3.0-6
enlightenment  no  OK  OK  OK  0.16.5-6
fluxbox  no  OK  OK  OK  0.1.6-2
fluxbox-kde  no  OK  OK  OK  0.1.6-2
flwm  yes  wrong submenu OK  OK  1.00-4
fvwm2  yes  OK  OK  do nothing  2.4.5-2
fvwm1  no  OK  OK  do nothing  1.24r-44
fvwm95  no  OK  OK  OK  2.0.43ba-16.1
gnome-panel  no  OK  OK  OK  1.4.0.6-2
gwm  N/A
icewm  yes  OK  OK  not displayed  1.0.9.2-4
icewm-experimental yes  OK  OK  not displayed  1.0.9.2-4
icewm-gnome  yes  OK  OK  not displayed  1.0.9.2-4
icewm-lite  yes  OK  OK  not displayed  1.0.9.2-4
ion  N/A
kde kwin yes wrong submenu OK fail 4:2.2.2-13
larswm  N/A
lesstif mwm no OK OK OK 1:0.93.18-4
lwm  N/A
olvwm  no  OK  OK  do nothing  4.1.3.2p1.4-15
olwm  no  OK  OK  do nothing  3.2p1.4-15
oroborus  N/A
pdmenu  no  OK  OK  OK  1.2.69
phluid  yes  OK  OK  OK  0.0.3.2+cvs.20020210-1
pwm  yes  OK  OK  do nothing  1.0.20010309-7
qvwm  no  OK  OK  do nothing  1:1.1.11-0.1
ratpoison  N/A
sapphire  no  OK  OK  do nothing  0.15.8-1
sawfish  yes  OK  OK  do nothing  1.0.1.20020116-3
sawfish-gnome  yes  OK  OK  do nothing  1.0.1.20020116-3
twm  no  OK  OK  OK  4.1.0-14
uwm  yes  OK  OK  OK  0.2.8.20010609-2
vtwm  no  OK  OK  OK  5.4.5a-9
w9wm  N/A
wm2  N/A
wmaker  yes  OK  OK  fail  0.80.0-3
xfce xfwm  Menus are scrambled  3.8.12b-2

4 Conclusion

• Too many menu managers do not support user defined menu entries out of the box.

• afterstep, kwin and flwm do not handle correctly ’/’ character in menu titles. Unfortunately they cannot be fixed until menu bug #64822 and bug #136947 are fixed. In the meantime, you can use something like

genmenu=ifeqelse(parent($title),"",parent($section),parent(parent($section))) "/" \
replacewith($title,"/","_") ifelse($command, "", "/")

that works correctly when title contains at most on ’/’. Thanks to Malcolm Parsons for this tip.

• Menu managers using m4 to include menu files must use undivert and not include because the menu file must not be preprocessed, since menu title and command may contain words recognized as m4 macro and be wrongly expended. Thanks to Mark Eichin for the tip.

• The Test backquote test is probably too harsh. Several menu managers fail because they try to execute

/bin/sh -c"exec eval `echo /usr/local/bin/test`" which fail with
sh: exec: eval: not found

because eval is a builtin. However some of them do not evaluated command in a shell, which is wrong.

• I have not been able to test xfwm because Debian menu entries are scrambled among others.

5 Disclaimer

Theses tests are carried out manually by the operator (i.e me) who have little or no knowledge about most of the menu manager tested here. Also it is an error-prone and time consuming operation. So please report any error I can have made on a menu manager I may have forgot, or new results of the tests with new versions in testing.

I do not test for anyone than myself and there is absolutely no warranty.