FluxGlow

How do I run a dashboard on a Raspberry Pi in kiosk mode?

Plug the Pi into the TV, then add one line to the desktop's autostart file that opens Chromium in kiosk mode at your board's address. From then on the board comes up by itself whenever the Pi has power.

Set it up

These steps are for the current Raspberry Pi OS, whose desktop is called labwc. You need a keyboard for the setup, or SSH. After that the Pi needs neither.

  1. Set up the Pi with a desktop

    Install Raspberry Pi OS with the desktop using Raspberry Pi Imager, and get the Pi onto your network. Plug it into the TV's HDMI port and give it its own power supply.

  2. Log in to the desktop automatically

    Run sudo raspi-config. Under System Options, set the Pi to boot to the desktop and to log in automatically.

  3. Turn off screen blanking

    Still in raspi-config, open Display Options and set Screen Blanking to No. Otherwise the screen goes black after a few minutes without a keypress.

  4. Open the board when the desktop starts

    Create the autostart file for the desktop and add one line to it. Keep the quote marks around the address.

    Terminal
    mkdir -p ~/.config/labwc
    nano ~/.config/labwc/autostart
    ~/.config/labwc/autostart
    chromium "https://fluxglow.com/board?src=https://example.com/board.json" --kiosk --noerrdialogs --disable-infobars --no-first-run &
  5. Restart

    Run sudo reboot. The Pi logs in, starts the desktop and opens the board full screen with no browser controls.

What the options do

OptionWhat it does
--kioskOpens full screen with no address bar, tabs or window frame.
--noerrdialogsHides error pop-ups that nobody is there to dismiss.
--disable-infobarsHides the notice bars Chromium shows under the address bar.
--no-first-runSkips the welcome screens on a new installation.
&Lets the desktop carry on starting instead of waiting for the browser to close.

If it starts before the network is ready

On Wi-Fi, the Pi can reach the desktop before it is online, and Chromium then shows its offline page and stays there. If that happens, make the line wait first:

~/.config/labwc/autostart
sleep 20 && chromium "https://fluxglow.com/board?src=https://example.com/board.json" --kiosk --noerrdialogs --disable-infobars --no-first-run &

Once the board itself has loaded, a dropped connection is not a problem. The board keeps showing the last good copy, goes grey if the file stays out of reach, and carries on when the network comes back.

Changing or leaving it

  • To show a different board, edit the address in the autostart file and restart.
  • To get out of kiosk mode with a keyboard attached, press Alt and F4.
  • With no keyboard, log in over SSH, change the file, and run sudo reboot.

Older versions of Raspberry Pi OS

On older releases the browser's command is chromium-browser rather than chromium, and the desktop reads a different autostart file. If the steps above do not match what you see, the simplest fix is to install the current release with Raspberry Pi Imager.

Other small computers

Nothing here is special to the Pi except the file the line goes in. Chrome, Chromium and Edge all accept --kiosk followed by an address on Linux, Windows and macOS. Put that command wherever the system keeps the programs it starts at login, and set the machine to log in by itself.

  • How do I put a dashboard on a TV?

    Give the TV a browser and open your board's address in it, full screen. The usual ways are a Raspberry Pi or small PC plugged into the HDMI port, a streaming stick with a browser app, or casting a tab from a computer.

  • How do I show a dashboard on a TV with a Chromecast?

    Open the board in Chrome on a computer, choose Cast from Chrome's menu, and pick the Chromecast. The TV mirrors that tab for as long as the computer stays awake with the tab open.

  • Why has my board gone grey?

    A grey board has stopped trusting what it is showing. Either the file says it should have been rewritten by now and was not, or the last attempts to read it failed. A line at the bottom of the board says which.

All questions