[Menubuild Version 2.0] 
10/04/2000
By Champ Clark III
champ@vistech.net


Why?
----

	We give out free shell accounts,  and a lot of people
e-mailed me (with no knowledge of how to use a Unix-like operating 
system), "how do I check my e-mail",  or "how do I browse the 
web".  With that,  I created a simple menu system that would come
up when they logged in.   This would allow them to do the things
that they wanted,  and hence,  would stop them from e-mailing me. 

	Another reason.....  About three years ago,  I wanted to
learn about programming in C with curses.... This was a little
project I started. 

What NOT to use it for:
-----------------------

	This program was written in mind that the user already 
has access to a shell,   but does not know how to maneuver in it. 
It was not intended to be used as a "BBS" type program.  There
are way to many ways to exploit it.   Its a program intended for
Non-unix users to work in a Unix-type environment,  and for you, 
as a system administrator,  to provide that for them as you see
fit. 


Compiling
---------

	Installing the program is pretty straight forward. The
code is pretty much  "ANSI C",   and shouldn't be hard to compile
on any platform with curses/ncurse available.  So far,  it's been
compiled on Linux (various flavors),  OpenBSD,  and HP-UX.  

	To compile,  do the following....

If under Linux,  type:

ln -s Makefile.Linux Makefile
make

If under OpenBSD,  type: 

ln -s Makefile.OpenBSD Makefile
make

If under any other operating system (that supports curses/ncurses), type:

ln -s Makefile.Unix Makefile
make

	This should build the binaries needed for you to use 
menubld.  

Testing the menubld program:
----------------------------

	A couple of example configuration files have been included.
These are test.cfg and test2.cfg.  If you wish to try out the 
menubld program before you completely install it,  type:

./menubld test.cfg

 	This should bring you to a menu of various things.  
There are basically two types of configuration parameters that
menubld looks for in the config file... 

MNU	-	Rebuild the array with another menu screen
CMD	-	Execute the following commands. 

	To see how menubld's configuration files work,  look at
the test.cfg and the test2.cfg.   It should be fairly straight
forward. 

	ONE THING TO NOTE:   you may want to alter the 
DEFAULTMENU option in the menubld.c source.  As it stands, 
it looks for a file named "main.cfg" in the /usr/local/lib/menubld
directory.   Change this to your choosing.  Menubld,  first looks
at the command line option.  For example, 

./menubld yourmenuscreenhere.cfg

	If that does not exist,  it will error out.   If no 
configuration file is given,  it will look in the DEFAULTMENU
setting in menubld.c


Installing: 
-----------

	As you might notice,  there is no "make install" option. 
I leave that up to you.  By default,  you can copy the "menubld"
program to the /usr/local/bin directory,  and then put your
menu configurations in the /usr/local/lib/menubld directory.  
Thats completely up to you.   For users that request a "menu"
within there shell account,   I add this in to there .profile 
(or whatever the case may be) to execute the following little 
shell script (within there $PATH.  For example, /usr/local/bin). 
That way,  even if they exit the menubld system,  they can 
type "menu" and get back to it). 

----<Cut here>---------------------------------------------------------------
#!/bin/bash 	       # This is Linux,  OpenBSD point to /usr/local/bin/bash
stty susp undef	       # No susp in menubld,  please.
#
# Put this in the /usr/local/bin (as "menu") or somewhere else in there
# PATH.
#
clear
#
# Assuming that /usr/local/lib/menubld/main.cfg is the main menu for
# menubld. 
#
/usr/local/bin/menubld /usr/local/lib/menubld/main.cfg
#
# or just
# 
# /usr/local/bin/menubld   # If DEFAULTMENU has been set in the source.
#
# When they exit,  the below is displayed. 
#
clear
stty susp ^Z           # Give back susp.....
#
echo "You can type 'exit' to completely leave the system or you can type your"
echo "Unix commands in now."
echo
echo "Type 'menu' to return to the menu system"

----<EOF>---------------------------------------------------------------------


Final Notes:
------------

	You can do whatever you'd like with this source code.  
If you make improvements or fix bugs in it,  I'd really like
to here about it (champ@vistech.net).   This was really just 
a little project that I thought that other people might find
somewhat useful.   The code is under GNU license.

					- Champ Clark III
					  champ@vistech.net



