At work I have a series of scripts to install, start, stop ... an application. I was thinking of replacing the wrapper with a simple tcl/tk script. All well and good. The one question I have is how can I detect in a script that an X server is running. Most people use putty from their Windows laptops, and I want the script to run in text mode if they have not run ssh -X (or if Exceed is not running). One method would be to check the $DISPLAY. But if they use Putty, the -X option would be set. If I run wish(1) it returns 0, but does print out a line of text, "Application initialization failed: " that I could check and switch to text mode. I'm looking for a better way of testing.
-- Jerry Feldman <[email protected]> Boston Linux and Unix PGP key id: 537C5846 PGP Key fingerprint: 3D1B 8377 A3C0 A5F2 ECBB CA3B 4607 4319 537C 5846
_______________________________________________ Discuss mailing list [email protected] http://lists.blu.org/mailman/listinfo/discuss
