I am trying to create a bash script that will launch chromium, wait 20 seconds, then close chromium.
This is for xbmcbuntu so I can open a site, then it will close automatically after 20 seconds (as I will have no way of closing it with just the remote control).
What I have is:
#!/bin/bash
openbox &
/usr/bin/chromium-browser
sleep 20
killall -9 openbox
Chromium opens ok, but never closes.
What am i missing?
Since you are not putting chromium-browser in the background, none of the code after the chromium-browser command will execute until chromium-browser finishes execution. This should do what you want: