The loginmenu program gives system administrators an easy way to
give novice users access to services through a set of simple text menus.
Administrators who wish to set up such menus for their users need to create a file named `/etc/loginmenu/menu.cfg' containing the complete menu definition, and they should include the line
HAS_LOGINMENU=YES
in their `/etc/isis.cfg' file. Users who have set a
LOGINMENU=YES preference through the user-config program
will see the menu when they login. Others will get their normal command
shell prompt.
The system administrator also needs to make links named
`loginmenu' and `menu' from a local
directory in the users' $PATH to
`/afs/isis/pkg/loginmenu/bin/loginmenu'. Otherwise the login
scripts trying to exec loginmenu when there is no available
loginmenu program may prevent users from being able to login.
If an administrator additionally sets
LOGINMENU=YES
in the `/etc/isis.cfg' file, then all users except those who have
set a LOGINMENU=NO preference through the user-config
program will see the menu when they login. These exceptions will still
get their normal shell prompt.
The administrator may even choose to use the `/etc/prop.cfg' file
to override users' default shells and run loginmenu instead. This
is a pretty big hammer for a fairly small nail and can make lots of
things impossible for the user. However, if that's what you want to
do...
A user can run the loginmenu program from the shell prompt, and
if it is invoked under a name other than loginmenu (menu for
example) it will provide slightly different behaviour as described in
the next section. If invoked with a parameter, that parameter will be
used in place of `/etc/loginmenu/menu.cfg' as the name of the menu
configuration file.
The `/etc/loginmenu/menu.cfg' file describes one or more named text screens, each of which constitutes a menu. The description also includes pairs of action keys and program specifications. When a user enters one of the action keys, the program from corresponding program specification is run. After the program runs, the menu is printed on the screen again and the user can then select another item from the menu.
The format of lines in menu.cfg files is as follows:
#") are ignored.
Fields within lines are separated by double-colons ("::").
menu.cfg file starts with a name,
and menu names are always preceeded by a percent sign ("%").
b", "l", or "m".
"l" indicates a line that
will only be displayed when the program is invoked as loginmenu.
"m" indicates a line that will only be displayed when the program is
invoked as something other than loginmenu (menu for
example). "b" indicates a line that will be displayed in both cases.
#") will be displayed without
the pound sign and without returning the cursor to the left edge of the
screen. This is useful for positioning the cursor for user input. (It
is also almost useless anywhere except on the last line of a menu.)
xb", "xl", and "xm" contain action key
fields and program specification fields.
__SHELLBASE__" will be interpreted as the basename of
the users $SHELL environment variable in both displayed text and in
program specifications. If $SHELL isn't set, then
"ksh" is used instead.
__SHELL__" will be interpreted as the full value of
the users $SHELL environment variable in both displayed text and in
program specifications. If $SHELL isn't set, then
"/bin/ksh" is used instead.
__EXIT__" will cause the
loginmenu program to terminate.
\").
Below is a very simple menu.cfg file which allows the user to
either run pine or exit. Note how the text varies for item number
four depending on how the program was invoked.
%main_menu b:: b:: 0. Help b:: 1. Read EMail. b:: 2. Run a temporary __SHELLBASE__ session. b:: 3. Run `uname -a'. l:: 4. Logout. m:: 4. Exit this menu and return to your shell. b:: b:: Enter the number of your choice: # xb::0::%help xb::1::/afs/isis/pkg/pine/bin/pine xb::2::__SHELL__ xb::3::uname -a xb::4::__EXIT__ %help # We could include additional commands on this menu. b:: b:: This isn't much help, is it? b:: Say `please' and you can go back b:: to the Main Menu: # xb::please::%main_menu # A simple `return' will work as well... xb::::%main_menu
This document was generated on 25 August 1999 using texi2html 1.56k.