Path: utzoo!utgpu!news-server.csri.toronto.edu!rutgers!ucsd!ucbvax!bloom-beacon!eru!luth!sunic!mcsun!ukc!harrier.ukc.ac.uk!rlh2 From: rlh2@ukc.ac.uk (Richard Hesketh) Newsgroups: comp.windows.x Subject: Re: simple x interface tools from shell scripts? Message-ID: <5177@harrier.ukc.ac.uk> Date: 25 Jul 90 08:17:20 GMT References: <1990Jul24.194548.22897@midway.uchicago.edu> Reply-To: rlh2@ukc.ac.uk (Richard Hesketh) Organization: Computing Lab, University of Kent at Canterbury, UK. Lines: 65 Summary: Expires: Sender: Followup-To: In article <1990Jul24.194548.22897@midway.uchicago.edu> max@spam.uchicago.edu () writes: >I am looking for x user interface development tools which can be called from >shell scripts. By this I mean programs like xmessage, yorn, etc. which can be >called from a shell script to x-ify simple prompting tasks and such like. This is becoming more popular .. I have a system of on-screen buttons which contain scripts (sh, csh, bash, ksh, perl .. etc) which are executed when the button is pressed. These buttons provide a neat environment to store useful scripts and they allow prototyping of new scripts. I therefore came upon the same need for useful tools. I haven't heard of "yorn" (where can I get it?) but I use xmessage, a form filling tool, a menu tool and lots and lots of xterms 8-). >For example, I'd like something for simple menus, where I provide a list of >menu item names (say, as a here document in a shell script), it brings up a >menu in an x-window, and tells me which item was selected. Does anyone know of >such a thing? Yup, I posted one "xmenu" to comp.sources.x over a month ago. If you can't find it in an archive (it was posted as "v08i008: xmenu" and is currently at patchlevel 1) then send me email. I also posted an even smaller tool that allows scripts to grab and set selection values. "xselection" takes a selection property name and a string value and sets the new selection to this value. Just calling xselection with the property name returns the current value (if any) on the standard output .. this allow you to do things like .. xselection PRIMARY | spell to check its spelling, bung it in a file, send it to a printer ... and so on. >More fancy, how about an x version of sf (written by Paul Lew)? sf provides a >dumb-terminal based form editing interface to shell scripts. As input, one >provides a simple form layout with indications of the types of the data to be >input in the blanks. It draws a form on the terminal, provides simple editing, >and returns the results as a shell script which sets shell variables to the >input values. Has anyone made something like this? My collegue Alison Fowler, has written a form fill-in tool that takes a simple syntax, parses it and displays a form containing different fields for text entry, one-of-many and many-of-many values. It outputs the results as shell variables which can be EVALuated. Its needs a little change in the syntax before Alison is willing to release it. I think the small x-tool approach using scripts as processing "glue" works very well in practice. Combining these with buttons that remove the need to run things in xterms and you can produce quite a good and cheap user interface to x. I am writing a paper on this small-tool/script/button approach to graphical interfaces for UNIX and I would be extremely interested to hear of peoples experiences of "x-ifying" their UNIX environment. Plus if you have other small tools that you have developed or if you have a good idea for a tool please drop me a line. Thanks, Richard Richard Hesketh : @nsfnet-relay.ac.uk:rlh2@ukc.ac.uk : rlh2@ukc.ac.uk ..!mcsun!ukc!rlh2 --- Computing Lab., University of Kent at Canterbury, Canterbury, Kent, CT2 7NF, United Kingdom. Tel: +44 227 764000 ext 7620/3682