#!/bin/sh
# VASM
# VLocity Linux System Menu
# 
# (c) VLocity Linux, 2003

vdir=`dirname $0`

. $vdir/vasm-functions

# Sax is not there anymore
#"XSETUP" "setup X Window via GUI. If you get stuck: CTRL+ALT+BS" \

menuA() {

while [ 1 ]; do
  $DCMD --backtitle "$BACKTITLE" --title "GUI Administration" --menu \
"\n
This menu helps to setup the X-Window system so you can work\n
with Graphical User Interface with comfort.\n\n
Please select the menu" 20 76 6 \
"XCONF"  "setup X Window using text mode configurator" \
"XDMSET"  "setup X display manager for GUI mode login" \
"XWMSET"  "setup default X window manager" \
"XKBSET"  "setup X keyboard" \
"BOOTSET"  "setup to boot into GUI mode. X must be working first" \
"DONE"   "finish with this menu" \
 2> $freply

  status=$?
  [ $status != 0 ] && return $status

  REPLY=`cat $freply`
  case "$REPLY" in
    "XSETUP")
      if which sax &> /dev/null; then
         sax
      else
         errorbox "Sorry, SAX configurator is not installed."
      fi
      ;;    
    "XCONF")
      $vdir/vxconf
      ;;
    "XDMSET")
      $vdir/vxdmset
      ;;
    "XWMSET")
      $vdir/vxwmset
      ;;
    "XKBSET")
      $vdir/vxkbset
      ;;
    "BOOTSET")
      $vdir/vbootset
      ;;
    *)
      clean_exit 0
      ;;
  esac
done
}

###########################
# MAIN

menuA

clean_exit $?

