Mailing List
Home
Forum Home
Linux - General Red Hat Linux discussion list
Installation - Getting started with Red Hat Linux
Enterprise Linux 3 - Discussion of Red Hat Enterprise Linux 3 (Taroon)
Red Hat Linux 9 - Discussion of Red Hat Linux 9 (Shrike)
Red Hat Linux 7.3 - Discussion of Red Hat Linux 7.3 (Valhalla)
Red Hat Linux 7.2 - Discussion of Red Hat Linux 7.2 (Enigma)
Apache Web Server
Oracle database, Microsoft SQL server ...
Subjects
application/x mplayer2 plugin
RPM error: db4 error(16) from dbenv >remove: Device or resource
   busy
Command stream end of file while reading
X Windows problem (xauth)
Upgrading openoffice 1 1 rpm
FTP: connection refused
FTP: connection refused
mount: /dev/cdrom: is not a valid block device
Dell Precision 650, RedHat 9, no sound
how to trace the cause resulting in the crash of bind server
Virus on the list
UNINSTALL RPM MYSQL
usb pen drives: mounting as a user
broadcom network interface
make mrproper
sendmail configuration on redhat
Couldn 't open PID file /var/run/named/named pid Permission denied
Promise 378 controller
kernel 2 6 and /dev/sound/mixer not found
Problem using up2date
mrtg step by step howto/configuration for a newbie?
Compiling and Installing Kernel 2 6
Can 't locate module ppp0, can 't locate module ppp compress 21
HOW I CAN MAKE BOOTABLE FLOPPY DISKET
Lotus Notes under Wine
/etc/security/limits conf question
Intel E/1000 driver
Command stream end of file while reading
rpm database corrupt
qla2300 modules
 
Xmessage utility

Xmessage utility

2005-12-01       - By Garrick Staples

 Back
Reply:     1     2     3     4     5  

On Thu, Dec 01, 2005 at 09:44:18AM -0400, Shaw, Marco alleged:
> What I'm looking for is a simple way to provide a user with
> a UI where they can pick their laptop.  I have that part easily
> figured out.
>
> But what I'd like to happen is that if the user presses the
> button #1 ("Dave's laptop") below, for example, I'd like
> the stdout to print the variable "IP1"
>
> I thought I read the man page correctly, and something like
> this would work, but it doesn't:
>
> # xmessage -print -buttons "Dave's laptop:IP1" test
>
> Can I get IP1 to print to stdout when the button is pressed?

You want the exit values as the Mr. Haxby mentioned.

But just for fun, here's an example.  It is a script I wrote so that my
girlfriend could easily deal with our Epson printer.  It is certainly
not a nice, well-formed application, but it does the job after 5 minutes
of scripting :)


#!/bin/bash

output=levels

xmsg='xmessage -file - -buttons status,levels,nozzle-check,clean-head,done
-print -center -default done -timeout 60'

while :;do

 case $output in
       status) cmd=s;;
       levels) cmd=i;;
       nozzle-check) cmd=n;;
       clean-head)   cmd=c;;
       *) exit ;;
 esac

 output=$(escputil -q${cmd}ur /dev/lp0 2>&1 | $xmsg)

done



--
Garrick Staples, Linux/HPCC Administrator
University of Southern California

--
Taroon-list mailing list
Taroon-list@(protected)
https://www.redhat.com/mailman/listinfo/taroon-list