How to open WebThings Gateway automatically in Raspberry pi touch screen?

Hi Team,
I have a raspberry pi touch screen with me, I know it’s possible to open the gateway through browser inside raspberry pi GUI. But I would like to know, is it possible to open the gateway automatically in my touch screen after boot or whenever I turn on the gateway like a standalone HMI ? I noted there was conversation about it, but I couldn’t find a proper solution…your help is much appreciated.

Firefox 71 (launching next week, already available in Firefox Nightly) has a new kiosk mode which you mind find useful. You could have a command run at startup, something like:

MOZ_USE_XINPUT2=1 firefox --kiosk "foo.mozilla-iot.org"

(The MOZ_USE_XINPUT2=1 part enables touch scrolling which I’d recommend for a touch screen).

Unfortunately I think Raspbian only provides Firefox ESR (68) by default, so this could take a while to become available as part of the main distribution. In the meantime I believe there are various Firefox add-ons which make it behave like a kiosk that you could try, which might also display less in the way of browser chrome.

If you’re OK with running the full browser you can simply launch the browser from the command line at startup:

MOZ_USE_XINPUT2=1 firefox-esr "foo.mozilla-iot.org"

The Chromium browser also has a kiosk mode. The version available to install on Raspbian via apt may have this feature already, I’m not sure.

There are other ways to load the web interface as a full screen display on a Raspberry Pi touch screen running a more locked down operating system like Android Things, Ubuntu Core or Balena OS, but they are a lot more involved and it would currently be difficult or impossible to run the gateway software on the same Raspberry Pi.

We are currently working on new ways to install the gateway application which may make some of these types of setups easier in future.

1 Like

What I am experiencing with this, the browser (Chromian in this case) starts before the wifi gets connected, so I usually have to reload then go though all the “not a safe website” bull crap, then I finally get there. It’s amazing it does not remember this. Not a biggy, just worth noting.

How are you starting the browser? You might be able to just put a sleep command in the line preceding the browser command. sleep 20; /path/to/browser

:man_shrugging: