2

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?

2
  • I don't really understand your question. Do you want a way to prevent the browser to be launched before the Wifi is up? Commented Jan 3, 2013 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
    Commented Jan 4, 2013 at 15:43

1 Answer 1

2

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>
4
  • Good solution. But you could also edit the network start daemon script so that Chromium only starts after the network.
    – Jivings
    Commented Jan 5, 2013 at 20:09
  • 1
    @Jivings can you give me some more detail - i am not much of a linux guy.
    – lstanczyk
    Commented Jan 7, 2013 at 15:31
  • Your solution is fine :)
    – Jivings
    Commented Jan 7, 2013 at 18:17
  • 1
    C'mon i wan to learn something. You are not being very constructive here :)
    – lstanczyk
    Commented Jan 8, 2013 at 23:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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