Take the 2-minute tour ×
Raspberry Pi Stack Exchange is a question and answer site for users and developers of hardware and software for Raspberry Pi. It's 100% free, no registration required.

I used edimax usb wifi dongle for connectivity managed by WICD I also have chromium set to autostart in a kiosk mode and display a web page (status board - details of the setup here)

What happens if the browser is launched before the wifi is connected so an error is displayed in chromium because page could not be found due to lack of connectivity? Any ideas how to overcome this issue?

share|improve this question
    
I don't really understand your question. Do you want a way to prevent the browser to be launched before the Wifi is up? –  Morgan Courbet Jan 3 '13 at 19:36
    
@Morgan - that would be one of the solutions. Basically what i am after is that the dashboard page loads and does not require keyboard to refresh after wifi kicks in. –  lstanczyk Jan 4 '13 at 15:43
add comment

1 Answer

Here is the solution i found. I created a local page and pointed chromium to is. From there javascript checks if the browser is on-line and if so it will redirect to the dashboard page.

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title>Dashboard Loader</title>

    <style type="text/css">
        .auto-style1 {
            width: 200px;
            height: 200px;
            text-align: center;
        }
    </style>

</head>
    <body>
          Loading dashboard

    </body>
    <script>

        function loadDashboard()
        {
            if (navigator.onLine) {
                window.location.href = "https://demo.geckoboard.com/dashboard/B6782E562794C2F2";
            }
            else
            {
                setTimeout(loadDashboard, 1000);
            }

        }
        setTimeout(loadDashboard, 3000);
    </script>
</html>
share|improve this answer
    
Good solution. But you could also edit the network start daemon script so that Chromium only starts after the network. –  Jivings Jan 5 '13 at 20:09
1  
@Jivings can you give me some more detail - i am not much of a linux guy. –  lstanczyk Jan 7 '13 at 15:31
    
Your solution is fine :) –  Jivings Jan 7 '13 at 18:17
    
C'mon i wan to learn something. You are not being very constructive here :) –  lstanczyk Jan 8 '13 at 23:22
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.