Overview: When running X using AnotherLevel (style Fvwm95, which runs fvwm2), the Start menu (or root menu) includes two items to invoke xlock (in my case, from the RedHat 6.2 xlockmore-4.15-4 rpm); these do not work correctly. The error is in the AnotherLevel configuration file /etc/X11/AnotherLevel/fvwm2rc.xlock.m4 (I have a corrected version of this file, that works for me at least). Steps to reproduce: Run X as above; select Start menu from Start button or from root window; click on the item "Lock Screen / Screen Saver (first half)" or "Lock Screen / Screen Saver (second half)". Actual results: Clicking on the first of the above items has no effect; clicking on the second produces a window with unlabelled mode buttons plus labelled "action" buttons at the bottom (that can indeed be used to invoke xlock). Expected results: Clicking on either item should produce a window with buttons labelled by xlock modes plus labelled "action" buttons at the bottom, so that one can select an xlock mode before clicking an "action" button at the bottom. Causes of these bugs: The causes are due to errors in the configuration file /etc/X11/AnotherLevel/fvwm2rc.xlock.m4 from AnotherLevel-1.0.1-1.noarch.rpm Complete failure of the first menu item results from the fact that in 12 lines near the beginning of the file, *XLock is used where *Xlock1 should occur. Missing mode-names beside the mode buttons appear to be fixed by adding a line: *XLock1Line expand immediately following the line: *XLock1Selection Option single (and adding a similarly line *XLock2Line expand for XLock2). In the esyscmd statements, the awk command if (/random/) { next }; \ would appear to remove several valid modes, and should be replaced by the command if (/^[ \t]*random/) { next }; \ Also in these statements, the division of xlock modes between the two menu items had to be evened out before they worked correctly, at least on my i386 machine (two many modes in a window seem to cause a problem); this could be fixed by changing /^[ \t]*[a-m]/ && ok==1 \ to /^[ \t]*[a-k]/ && ok==1 \ in the first esyscmd statement, and changing /^[ \t]*[n-z]/ && ok==1 \ to /^[ \t]*[l-z]/ && ok==1 \ in the second esyscmd statement. There does not seem to be a "Create an attachment" item on the page, so I include the corrected file below (I have tested it only on my i386 system); NOTE that lines beginning -nolock should actually be appended to the ends of the previous lines: divert(-1) # AnotherLevel - A FVWM2 Configuration # Copyright (C) 1996, 1997 Red Hat Software, Inc # # $Id: fvwm2rc.xlock.m4,v 1.2 1999/09/23 20:02:58 pbrown Exp $ # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. # # This work is derived from: # TheNextLevel # Copyright 1996 By Greg J. Badros <gjb.edu> # distributed under GNU General Public License. # divert TraceForErrors(`Xlock/Screensaver menus...') define(`AddXLock1Option',`*XLock1Choice Option $1 off "capitalize($1)"') *XLock1WarpPointer *XLock1Font MEDIUM_FONT *XLock1ButtonFont BASIC_FONT-bold-r-*-120-* *XLock1InputFont MEDIUM_FONT *XLock1Fore WINFORE_COLOR *XLock1Back MENUBACK_COLOR *XLock1ItemFore WINFORE_COLOR *XLock1ItemBack WINBACK_COLOR *XLock1Line center *XLock1Text "Available Xlock modes" *XLock1Selection Option single *XLock1Line expand esyscmd(`xlock -help 2>&1 | awk "BEGIN{item = 0} \ /^$/ {next} \ /one of:/ {ok=1; next} \ /^[ \t]*[a-k]/ && ok==1 \ { \ if (/^[ \t]*random/) { next }; \ if (item == 0) { print \"*XLock1Line expand\" }; \ printf(\"AddXLock1Option(%-10s)\\n\", \$1) ; \ item = (item+1)%5 ; \ }"') # We add the random thing separately, to be sure that we have at least one # selected option *XLock1Choice Option random on "Random " *XLock1Line expand *XLock1Line expand *XLock1Line expand *XLock1Button quit "Screen Saver" *XLock1Command Exec xlock -nice NICELEVEL -erasemode no_fade -mode $(Option) -nolock # somebody is gonna hate me for this one... :-) *XLock1Button quit "Background" *XLock1Command Exec xlock -nice NICELEVEL -erasemode no_fade -mode $(Option) -nolock -inroot *XLock1Button quit "Lock Screen" *XLock1Command Exec xlock -nice NICELEVEL -erasemode no_fade -mode $(Option) *XLock1Button quit "Cancel" ^[ *XLock1Command Nop ########################################################################### TraceForErrors(`Xlock/Screensaver menus part 2...') define(`AddXLock2Option',`*XLock2Choice Option $1 off "capitalize($1)"') *XLock2WarpPointer *XLock2Font MEDIUM_FONT *XLock2ButtonFont BASIC_FONT-bold-r-*-120-* *XLock2InputFont MEDIUM_FONT *XLock2Fore WINFORE_COLOR *XLock2Back MENUBACK_COLOR *XLock2ItemFore WINFORE_COLOR *XLock2ItemBack WINBACK_COLOR *XLock2Line center *XLock2Text "Available Xlock modes" *XLock2Selection Option single *XLock2Line expand esyscmd(`xlock -help 2>&1 | awk "BEGIN{item = 0} \ /^$/ {next} \ /one of:/ {ok=1; next} \ /^[ \t]*[l-z]/ && ok==1 \ { \ if (/^[ \t]*random/) { next }; \ if (item == 0) { print \"*XLock2Line expand\" }; \ printf(\"AddXLock2Option(%-10s)\\n\", \$1) ; \ item = (item+1)%5 ; \ }"') # We add the random thing separately, to be sure that we have at least one # selected option *XLock2Choice Option random on "Random " *XLock2Line expand *XLock2Line expand *XLock2Line expand *XLock2Button quit "Screen Saver" *XLock2Command Exec xlock -nice NICELEVEL -erasemode no_fade -mode $(Option) -nolock # somebody is gonna hate me for this one... :-) *XLock2Button quit "Background" *XLock2Command Exec xlock -nice NICELEVEL -erasemode no_fade -mode $(Option) -nolock -inroot *XLock2Button quit "Lock Screen" *XLock2Command Exec xlock -nice NICELEVEL -erasemode no_fade -mode $(Option) *XLock2Button quit "Cancel" ^[ *XLock2Command Nop ########################################################################### AddToMenu StartMenu + "Lock Screen / Screen Saver (first half) MiniTitleIcon(lock)" FvwmForm XLock1 + "Lock Screen / Screen Saver (second half) MiniTitleIcon(lock)" FvwmForm XLock2 + "" Nop
Created attachment 4308 [details] corrected version of /etc/X11/AnotherLevel/fvwm2rc.xlock.m4
Package is obsolet in Red Hat 7.