Unix-Menu-Program

Background

I wrote this menu.c back in the 90’s for an IBM AIX system running some PICK applications, used by users to launch programs, sysadmins to run jobs etc. Modified to run on Ubuntu (should compile fine on other platforms - it’s pretty basic). I’ve picked this back up and updating, cleaning up the code and releasing enhanced versions.

There are of course other ways to do this, shell scripts, dialog or whiptail and pdmenu (http://manpages.ubuntu.com/manpages/bionic/man1/pdmenu.1.html).

NOTE:

Build on Ubuntu 16.04

  1. Install curses libraries: sudo apt-get install libncurses5-dev libncursesw5-dev
  2. Install newt libraries: sudo apt-get install libnewt-dev
  3. Compile the menu.c: gcc -o menu menu.c -lncurses -lnewt
  4. Create a menu file - samples in the repo (menufile and menufile2)
  5. Start it up - see usage below

Build on openSUSE Tumbleweed

** Thanks to John Pleming for troubleshooting this.

  1. Install curses: ncurses5-devel
  2. Install newt: newt-devel
  3. Compile the menu.c: gcc -o menu menu.c -lncurses -lnewt
  4. Create a menu file - samples in the repo (menufile and menufile2)
  5. Start it up - see usage below

Usage

menufile - format

Line 1 - Menu Heading - heading at top of screen
Line 2 - Menu Description - heading at top of menu
Option 1 - Menu Option Description that will appear on the menu
Option 1 - Menu Command to run: either commands, call a shell script (if longer than 80 chars). Note: could also call another menu
Option 2 - Menu Option Description that will appear on the menu
Option 2 - Menu Command to run
Option.....

Planned Updates

As time permits - here’s the plan:

Licensing

License: GPL v3

Release Candidate (RC) Versions