Skip to content

Instantly share code, notes, and snippets.

@marcinantkiewicz
Last active March 18, 2026 06:10
Show Gist options
  • Select an option

  • Save marcinantkiewicz/5c4c540aa342b3aa6386d998fdc98d96 to your computer and use it in GitHub Desktop.

Select an option

Save marcinantkiewicz/5c4c540aa342b3aa6386d998fdc98d96 to your computer and use it in GitHub Desktop.
Setup to boot RPI into a kiosk mode, serving remote grafana dashboard.

This is a setup to allow linux host to boot into a kiosk mode, and display dashboard from a grafana service. It may require some work to run on not-raspbery PI + LXDE. This is an example, it is not meant to be secure or reliable.

  1. Get the grafana-kiosk binary. There is no deb. I look up the version in releases, copy the checksum, and edit get_grafana_kiosk.sh script. It will download, verify, and make executable a binary.
  2. on my system, destkop config lives in ~/.config/lxsession/LXDE/ find there autorun and desktop.conf. See what's in autorun, you may want to merge it with the one provided here. Make sure desktop.conf has the two settings with the right values.
  3. edit start_kiosk.sh, put in credentials and grafana URL. Those credentials really want to live in something like Infisical, but that's later.
  4. I want the screen to be always on, untill I turn it off. I turn it off via a script creen_sleep.sh.

Note:

  • Mine runs on some type of RPI + LXDE.
  • I run from user $home, because values here will override system defaults, this should cause less surpries in the future.
  • Invariably something will break with the setup. Most likely relevant logs wil be in .cache/lxsession/LXDE/run.log and full of noise.

.config/lxsession/LXDE/autostart

@lxpanel --profile LXDE
@pcmanfm --desktop --profile LXDE
@xset dpms 0 0 0
@xset s off
@xset s noblank
@/home/user/bin/start_kiosk.sh

In .config/lxsession/LXDE/desktop.conf make sure the sections contain:

[Session]
disable_autostart=no

[state]
guess_default=true

~/bin/get_grafana_kiosk.sh

export KIOSK_ARCH=linux.arm64
export KIOSK_VERSION=1.0.10
export CHECKSUM=400457eec41ce4f3919f4a4a4399db2fdd03748203746497ce9d364c91a2c643 
wget -q "https://github.com/grafana/grafana-kiosk/releases/download/"v$KIOSK_VERSION"/grafana-kiosk.$KIOSK_ARCH"
echo "$CHECKSUM grafana-kiosk.$KIOSK_ARCH" > checksum.txt
sha256sum -c checksum.txt
chmod +x "grafana-kiosk.$KIOSK_ARCH"

~/bin/screen_sleep.sh This is simple way to put the screen to sleep.

$ cat screen_sleep.sh 
#!/bin/bash
export DISPLAY=:0

CURRENT_STATUS=$(xset q | grep "Monitor is" | awk '{print $3}')

if [ "$CURRENT_STATUS" == "On" ]; then
    echo "Screen is currently ON. Turning it OFF now..."
    xset dpms force off
else
    echo "Screen is currently OFF. Waking it up..."
    xset dpms force on
fi

~/bin/start_kiosk.sh

#!/usr/bin/bash

export KIOSK_URL="http://whatever.grafana.kiosk:3000/blah"
KIOSK_USERNAME="kiosk"
KIOSK_PASSWORD=""
# a bit delay to let LXDE settle
sleep 5
/home/user/bin/grafana-kiosk.linux.arm64 \
	-URL "$KIOSK_URL" \
	-login-method local \
	-username "$KIOSK_USERNAME" \
  	-password "$KIOSK_PASSWORD" \
  	-kiosk-mode full 
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment