How to delay the start of a program
Posted: Mon Mar 05, 2018 8:59 pm
I have a PI model 3 B running Jessie that auto starts chromium and loads a webpage using:
this file is located at: /home/pi/.config/autostart/autoChromium.desktop
[Desktop Entry]
Type=Application
Exec=/usr/bin/chromium-browser --incognito --noerrdialogs --kiosk http://websiteaddress.com
X-GNOME-Autostart-enabled=true
Name[en_US]=AutoChromium
Name=AutoChromium
Comment5=Start Chromium when GNOME Starts
That works great! My issue is that sometimes this launches before wifi has connected and therefore gives a page cannot be displayed error. Is there any way to add a delay into the above so the wifi has a chance to connect before the browser loads? I've tried just adding sleep 20 above the Exec command but that causes it to not load at all..
Thanks!
this file is located at: /home/pi/.config/autostart/autoChromium.desktop
[Desktop Entry]
Type=Application
Exec=/usr/bin/chromium-browser --incognito --noerrdialogs --kiosk http://websiteaddress.com
X-GNOME-Autostart-enabled=true
Name[en_US]=AutoChromium
Name=AutoChromium
Comment5=Start Chromium when GNOME Starts
That works great! My issue is that sometimes this launches before wifi has connected and therefore gives a page cannot be displayed error. Is there any way to add a delay into the above so the wifi has a chance to connect before the browser loads? I've tried just adding sleep 20 above the Exec command but that causes it to not load at all..
Thanks!