On 11/19/2010 08:00 PM, David Haller wrote:
And some are also "calling compatible", have a look at texconfig-dialog. IIRC: dialog, kdialog and gdialog have a common basic interface (e.g. the same "yesno" option). So you can often do a test for X ($DISPLAY or more reliably a specific test[1]), set a variable $DIALOG accordingly to "dialog" or e.g. "kdialog" and the just use
$DIALOG --yesno "You want fries with that?" 5 30
(just tested the above with $DIALOG being dialog, kdialog and gdialog :)
-dnh
[1] I've a self-written "Xruns" that tests if X is actually running and not whether just "DISPLAY" is set.
<snip> David, Thank you Sir! I had never looked at testing the display -- or anything X for that matter. Your program sparked the "let's see what else we can find to do with X" which led me to a great little 16 part X tutorial. This tutorial starts at the very, very basic level to window creation, and builds from there. I like it! I know you it is simple, but it's worth a look for those who have never written an X program and have any interest: http://xopendisplay.hilltopia.ca/2009/Jan/Xlib-tutorial-part-1----Beginnings... You can grab all the sources with with following two command lines: for i in 2 3 16 $(seq 5 9); do wget http://xopendisplay.hilltopia.ca/xtut$i.c; done for i in $(seq 10 15); do wget http://xopendisplay.hilltopia.ca/xtut$i.tgz; done For the .c programs, I used the following script to ease the typing for compile: ---- #!/bin/bash [[ -n $1 ]] || { echo -e "\n usage: ${0##*/} # (to compile xtut#.c)\n"; exit 1; } gcc -o xtut$1 xtut$1.c -lX11 ---- Edit the first 3-4 .c files and set the window size to something reasonable so your window decorations don't get squashed. 200x100 works fine (original is 40x40). 10-15 will extract into their own directories with Makefiles included. All built without issue on my 11.0 laptop, so I know at least 11.0 on should work. -- David C. Rankin, J.D.,P.E. Rankin Law Firm, PLLC 510 Ochiltree Street Nacogdoches, Texas 75961 Telephone: (936) 715-9333 Facsimile: (936) 715-9339 www.rankinlawfirm.com -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org