SETTER 1.0 A TCL/TK front end to the xset program By James McNalley mcnalley@metnet.geog.pdx.edu This script has NO WARRANTY. If you find it useful, or find bugs, or want to offer me a high-paying job as a TCL/TK (or perl, or C, or C++, or...) programmer then mail me at the above address. I can think of four possible reasons why you are reading this README. First, you want to know what this script does, and why you should even bother to execute it. Second, you might not care what this program does, but want to know how to get it to run, since it doesn't appear to be C code, and xmkmf;make doesn't get you anyplace. Third, you might have gotten it to run, but are a little confused about its operation. Fourth, you might just like to read README files. I can offer help to you if you fall under the first three cases, but you'll just have to read the rest of this README if you fall under the fourth (would it be easier if I said STOP HERE?). As the subheading of this README states, SETTER is a tcl/tk front end to the xset program, which is included in the standard X11R5 and X11R6 distribution (I don't know about R1, R2, R3 or R4, all I have on my workstation is R5, and then the X11R6 CDROM which I have yet to install). "xset" is a neat little utility for setting some of the more common X11 options. For example, you can turn the screen-saver function on and off, you can change the volume, pitch, and duration of the bell, and set the mouse acceleration, among other things. Unfortunately, xset's command-line interface is rather difficult to remember if you don't use it every day (which I don't, and I assume most people don't). So I wrote this (IMHO) neat little tcl/tk script that makes setting these options easier. SETTER is that script. Note that if you have never used the xset program, and you think that setter is great, but could use some command line options so that you could stick it in your .xsession or .xinitrc files, you should look into xset. SETTER doesn't add any features to xset, it just is a fancy push-button interface (actually, xset does some things that SETTER doesn't do, so you might want to look into setter anyway). Since SETTER is written in Tcl/Tk, you don't need to compile it (which is why xmkmf;make doesn't do anything useful), all you need is to install Tcl/Tk (which should include wish the "Simple windowing shell"). Then, change the line "#!/usr/X11/bin/wish -f" to "#!/PATH_TO_WISH/wish -f", and make the script executable ("chmod 0755 setter", or "chmod 0700 setter" if you don't want anyone else looking at it. If you are root and installing it for all your users to use, you want to do "chmod 0755 setter"). It is important that the #!/... line is first, that is what tells your computer that it is a wish program. If you don't have Tcl/Tk, you can get it via ftp from ftp.cs.berkeley.edu in the directory /pub/tcl. If you are running Slackware Linux, you could also install the "tcl" package (I think SLS and other Linux distributions have Tcl/Tk packages, but I don't know for sure). If you want to know more about Tcl/Tk, check out the comp.lang.tcl newsgroup, or get John K. Ousterhout's book _Tcl_and_the_Tk_Toolkit_, Addison-Wesley Publishing company, ISBN 0-201-6337-X. For the most part, SETTER's interface is fairly straightforward, at least to me. For the most part, I used the same terms as the xset man pages use, so you should consult them first (also consult them if you are still unsure what SETTER does, once you understand xset, SETTER will make more sense). There are a few things that may need explanation, however. First, if you change "Timeout" or "Cycle", you must press the "Set Custom timeout and cycle" button for your changes to take effect. Second, if you change the first "Volume" setting, you must turn "keyclick" off and then on again (or just on if it was off to begin with) for your new settings to take place. Same with the second "Volume", "Pitch" and "Duration" (under "Bell"), you must turn "Bell" off and then on again (or just on if it was off to begin with) for the new bell settings to take effect. Finally, the same goes for "Acceleration" and "Threshold" under "Custom mouse settings". If you know how to exec a command when the user changes an entry widget, I'd appreciate it if you could tell me so that I can make SETTER make more sense. I've tried to use the same variable for the entry widget and associated checkbutton, but this only works for values of "0" and "1". Unlike most languages, anything other than "1" is treated as false, rather than anything other than "0" being treated as true. Also, using the same variable would not work with more than one entry widget associated with a checkbutton. I've only tested this script on my Linux machine, which is a no-name clone 486DX-50 with 16MB RAM and 40MB swap (I doubt you'd ever need that much swap). I'm running Slackware 2.x with an updated kernel, as well as XFree86 2.1.1 with the Tcl/Tk from the Slackware distribution (it may or may not be exactly the same as the standard Tcl/Tk distribution). If it does or does not work on your machine, send me its config, and I'll keep a list. If it works for everyone, I will just keep the list someplace, but if some have trouble, and others don't, I'll include a list of working/non-working machines in the README for the next version (if there is one). SETTER should work on any machine that runs X11 and Tcl/Tk. I don't see any reason why it should be limited to Unix machines. If Tcl/Tk has been ported to VAX/VMS and DesqView/X (two non-Unix platforms I know of that run X) it *should* work there, although I havn't made any effort (or tests) to ensure that it will. There is no reason to run SETTER under the Windoze version of Tcl/Tk (or the mac version if there is one), since Windoze and the Macintosh each have their own control-panels, and wouldn't have xset anyway. I might change the name of SETTER if I can think of a better one (or someone suggests one). I'm considering writing more Tcl/Tk front-ends to more command line Unix and X utilities, but that mostly depends on how much free time I have, and what other projects I decide to start. If you decide that you want to publish ths script as a Tcl/Tk script, or book, or whatever, *PLEASE* ask me first. I don't see any reason why I'd say no, but I would at least like to know that you are going to publish it. If you got part of this README and script, or just the README and want the script, you should be able to find it at ftp.aud.alcatel.com, in /tcl/???