here is an example of my code:
#!/bin/bash
while true; do
wget www.website.com/picture.jpg
qiv picture.jpg --command -blah -blah -blah
sleep 600
done
My question is how can I kill qiv? For those unfamiliar, qiv shows an image in fullscreen mode. Therefore, this script doesn't move on until qiv is exited (manually), but I want this automatic! For those wondering, it's for a digital picture frame that pulls pictures from a network. My full script works, but I have to manually press [ESC] to let the script progress. I'm sure there's a simple command to do this, and if not, could you please explain any arguments/ commands as I'm unfortunately not very experienced with bash script.
Thank you for taking the time to read this, and thanks for any help!
qivhas a--delayoption, which you can give a number of seconds. This sets the "slideshow delay". Maybe you could use this instead ofsleep? linux.die.net/man/1/qivT, --watch Reload the image if it has changed on disk.option. You then runqivonce, and let your sleep loop collect the image. If it changes,qivwill redisplay.qic -T ... &and then loop. You probably want to keep a track of the PID of yourqivprocess so that you can kill it when your script exits (eg someone interrupts it). That's$!immediately after theqivcommand:qiv -T ... & QIV_PID=$!.