7

I use Raspberry Pi to display web page automatically at startup.

The issue is : As soon as the raspberry is started, Midori is launched, but I've the message "Cannot Resolve Hostname....".

When I update the webpage 30 seconds after startup, it is correctly displayed.

How I can make a delay to launch Midori after X seconds ?

I launch my webpage with /etc/xdg/lxsession/LXDE/autostart

Tom Zych
  • 13,329
  • 9
  • 36
  • 53
gloops100
  • 159
  • 2
  • 2
  • 11
  • You have to wait until you have obtained an ip before you launch the browser. Question with fix is shown here http://unix.stackexchange.com/questions/79330/trying-to-open-a-browser-on-startup-on-my-raspberry-pi – Revive Jul 04 '14 at 11:35
  • I've already try, but it doesn't work... – gloops100 Jul 04 '14 at 11:40
  • You could try add a small delay before midori starts, which would be less reliable than ip checking. See section 3 on this link. Follow the steps and inside the bash script above the line that calls midori add the line: sleep 5 http://www.antony-neu.com/2013/03/12/autostarting-a-browser-on-the-raspberry-pi/ – Revive Jul 04 '14 at 11:46
  • Thank you very much, it works with sh script !!! :) – gloops100 Jul 04 '14 at 12:04
  • your welcome. I have posted as answer, please accept – Revive Jul 04 '14 at 12:08

1 Answers1

7

To add small delay before midori starts, which would be less reliable than ip checking. See section 3 on this link. http://www.antony-neu.com/2013/03/12/autostarting-a-browser-on-the-raspberry-pi/

Follow the steps and inside the bash script above the line that calls midori add a sleep period:

sleep 5
Revive
  • 2,248
  • 1
  • 16
  • 23