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:
#!/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