Sponsored Content
Top Forums UNIX for Dummies Questions & Answers Display command stealing focus Post 302652757 by BitBoy on Thursday 7th of June 2012 04:42:58 PM
Old 06-07-2012
Display command stealing focus

Please Help a Newbie,

I'm using the display command to post a picture of several configurations for a machine operator to choose from. The Issue I have is when I display the image the displayed image steals focus from my bash window. The operator then has to re-select the window to answer the prompt. The other issue I have is terminating the display. I had to kill the pid. Is there a more elegant way to do this?

Thanks
BitBoy

Code:
Code:
#!/bin/bash
 display -geometry 640x480+300+30 /export/freenas/images/S3/S3.JPG &
echo "Please enter the Mode you wish to Opererate (1-2)"
read ans
pid=`ps -e|grep display|cut -f1 -d" "`
kill -9 $pid
echo $an

Moderator's Comments:
Mod Comment please use code tags

Last edited by jim mcnamara; 06-07-2012 at 06:03 PM.. Reason: code tags
 

7 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Gnome focus

Hello all, Is there a way to make sawfish window manager focus on a gui when you click it but not make it raise to the top? I know that motif and CDE (soalris) allow you to focus with out raising the windows. THANKS (2 Replies)
Discussion started by: larry
2 Replies

2. SuSE

inconsistent ls command display at the command prompt & running as a cron job

Sir, I using the following commands in a file (part of a bigger script): #!/bin/bash cd /opt/oracle/bin ls -lt | tail -1 | awk '{print $6}' >> /tmp/ramb.out If I run this from the command prompt the result is: 2007-05-16 if I run it as a cron job then... (5 Replies)
Discussion started by: rajranibl
5 Replies

3. Shell Programming and Scripting

how to send a key to a windows without focus

Hi, i found xte and xdotool for sending some keys to windowed applications but they need to have the focus on it. Can someone say me if i can do the same but wihtout focusing the window i want to type something ? edit: xreplay (0 Replies)
Discussion started by: linked
0 Replies

4. UNIX for Dummies Questions & Answers

tcpdump - stealing storage

Hello, I hope someone can explain something to me just so I can understand why this took place: We have Avaya telephony servers that are running RHEL 5 on them. A week ago, callers were dialing into the server and could not hear a ".wav" file that was supposed to be played in an AVP IVR. ... (1 Reply)
Discussion started by: truecall
1 Replies

5. UNIX for Dummies Questions & Answers

Starting a program without it stealing focus

Hi all I have a java program I'm starting in Mac os from the terminal using the command java -Djava.library.path=/Users/me/Desktop/Cfiles/DynamicCTGLayout/build/Release -jar However, when I do this, my current program I'm using becomes "deselected" and the java program's GUI becomes... (2 Replies)
Discussion started by: WhiteTiger
2 Replies

6. What is on Your Mind?

Learning System Administration: What to focus on?

In the fall I am taking courses in System Admin and Networking Admin, along with Cisco classes. Sometime next year I hope to get Red Hat and CCNA certifications, then try to get some experience and a job. I am wondering what I can focus on in the meantime (and in my spare time) that will... (1 Reply)
Discussion started by: ScottLew
1 Replies

7. Shell Programming and Scripting

Monitor keypresses without focus?

Hi all, I'm new to Linux, been at it a couple weeks. I have written a script that basically acts as a watchdog to ping a server on a set interval, make sure chromium-browser is running, and a couple other things (it displays data via web browser). I'd like to make it stop the script when I hit... (4 Replies)
Discussion started by: strategery
4 Replies
XGLARESRC(1)						      General Commands Manual						      XGLARESRC(1)

NAME
xglaresrc - dislpay glare sources under X11 SYNOPSIS
xglaresrc [ -n windowname ][ -c r g b ] pictfile [ glarefile ] DESCRIPTION
Xglaresrc displays the sources located by findglare(1) in the picture pictfile by displaying their average luminance and drawing circles around them in the image. If pictfile is already being displayed by ximage(1), xglaresrc will raise (or deiconify) this window. If pict- file is not being displayed, xglaresrc will start ximage(1) in the background automatically. (To quit from ximage(1), you can type 'q' in its display window.) Usually, pictfile will be the image that was used by findglare(1) to locate glare sources. If the desired image is being displayed under a different name, perhaps even by a different display program than ximage(1), the -n option can be used to give an alternative windowname for locating the correct display window, and the -c option can be used to specify a different line and text color (default 1 0 0). If the inpute glarefile is not given, xglaresrc reads from its standard input. AUTHOR
Greg Ward ACKNOWLEDGEMENT
Work on this program was initiated and sponsored by the LESO group at EPFL in Switzerland. SEE ALSO
findglare(1), glare(1), glarendx(1), ximage(1) RADIANCE
11/15/93 XGLARESRC(1)
All times are GMT -4. The time now is 08:44 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy