The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
Google UNIX.COM



View Single Post in UNIX Forums - Click on the Thread or Permalink to View Entire Thread -->
  #5 (permalink)  
Old 09-05-2001
Perderabo's Avatar
Perderabo Perderabo is offline
Unix Daemon
 

Join Date: Aug 2001
Location: Washington DC Area
Posts: 8,355
dtksh was developed to solve problems like this. It is an advanced form of ksh with many add-ons that result in virtually the entire x api being available to the shell programmer. The scripts are really x clients in themselves that can run without using a xterm client for support.

But its power is also its shortcoming. The learning curve is very steep. Sample code:

Code:
widget=${Progs[ii]}
XtGetValues $widget x:x y:y 
XtDestroyWidget $widget
XtCreateManagedWidget BUTTON pushbutton XmPushbutton $BBOARD \
   background:$colorBackSave \
   foreground:$colorForeSave \
   highlightColor:$colorBackGround highlightThickness:0 \
   labelString:$asys2 \
   height:$Bheight width:$bwidth1 x:$x y:$y \
   fontList:"$lblfont" \
   shadowThickness:4
XtAddCallback $BUTTON activateCallback buttonpushed
XTAddCallback $BUTTON armCallback buttonArmed
RequestOp[$BUTTON]=$opsave
RequestArg[$BUTTON]=$asys
Progs[ii]=$BUTTON
ProgsA[$BUTTON]=$ii
That put a pushable button on the screen. But still, if you know x and ksh very well, you can get it done.

Besides dtksh, there are other interpreted lauguages out there with a graphical interface. But dtksh is the only one I have tried.

Another approach is to use html. Then you run a web server and web browser on the same box and let the operator fire up the browser. html is much easier than x.