I have a Pi that is running a .sh script on startup which opens 2 applications a industrial SCADA followed by Iceweasel. I would like to switch between the 2 apps every 30 seconds. I used the following script to do it manually.
#!usr/bin/sh wmctrl -a "icewasel" sleep 30 wmctrl -a "window2"
The using "watch" to run that script every 30 seconds:
watch -n 30 sh /home/pi/rotate.sh
When I try to add the above line to my start up start.sh script nothing happens. It is as follows:
#!usr/bin/sh "/home/pi/clientlauncher.sh" sleep 20 iceweasel sleep 20 watch -n 30 sh /home/pi/rotate.sh
Everything up to the "watch" commands starts and runs fine but it does not work. Any suggestions? Thanks in advance!