Skip to Content

← All functionalities

Automated agricultural irrigationRaspberry Pi (Docker)HTTPHMI / Dashboard

Booting a Raspberry Pi straight into a Node-RED HMI

A control cabinet does not need a desktop — it needs one full-screen dashboard that survives reboots. This script configures kiosk mode on Raspberry Pi OS Bookworm: the Wayfire compositor autostarts Chromium pointing at the local Node-RED dashboard, full screen, no toolbars, no error dialogs, screen blanking disabled. The result is the dedicated touchscreen HMI installed at the pump house of a real automated irrigation deployment.

Wayfire autostart instead of LXDE hacks

Bookworm replaced the old X11/LXDE session with Wayland and Wayfire, so the classic autostart files no longer apply. The supported path is an [autostart] section in ~/.config/wayfire.ini launching chromium-browser with --kiosk. Combined with desktop autologin from raspi-config, power-on takes the operator straight to the dashboard with no keyboard attached.

Flags that keep the kiosk clean

After a power cut Chromium normally greets you with a restore-session bar — fatal for an unattended HMI. --noerrdialogs and --disable-infobars suppress the nagging, and a one-year update-check interval stops surprise prompts. The script also disables the screensaver and DPMS so the dashboard stays visible around the clock in the pump house.

A script you can run twice

The installer backs up wayfire.ini with a timestamp before appending anything, warns when an [autostart] section already exists instead of duplicating it, and prints the maintenance escape route (console on Ctrl+Alt+F2, Alt+F4 to close Chromium). The dashboard URL is a single variable at the top — point it at Nginx or directly at port 1880.

A snippet from the implementation

Straight from the example as deployed on the Raspberry Pi (Docker) — copy it freely:

set -euo pipefail

DASHBOARD_URL="http://127.0.0.1:1880/dashboard"   # URL of the Node-RED HMI
WAYFIRE_INI="$HOME/.config/wayfire.ini"

mkdir -p "$HOME/.config"
touch "$WAYFIRE_INI"

# --- Backup before touching anything ------------------------------------------
cp "$WAYFIRE_INI" "$WAYFIRE_INI.bak.$(date +%Y%m%d%H%M%S)"
echo "Backup created: $WAYFIRE_INI.bak.*"

# --- Avoid duplicates if the script runs twice ---------------------------------
if grep -q "^\[autostart\]" "$WAYFIRE_INI"; then
    echo "WARNING: an [autostart] section already exists in $WAYFIRE_INI."
    echo "Review it manually and merge the lines below if needed."
fi

# --- Kiosk autostart section ---------------------------------------------------
# chromium-browser in kiosk mode:
#   --kiosk                  full screen without toolbar or buttons
#   --noerrdialogs           no "Chromium closed unexpectedly" dialogs
#   --disable-infobars       no automation notices
#   --check-for-update-interval  do not nag about updates
cat >> "$WAYFIRE_INI" <

The full example is a complete program — wiring header, setup and main loop — ready to adapt to your application.

Frequently asked questions

The screen shows the kiosk before Node-RED has started. How do I avoid the error page?

Either delay the launch with a small sleep wrapper script, or serve through Nginx and let it return a refreshing splash until the upstream answers. Chromium retries on reload, so even a plain F5 from the touchscreen recovers.

How do I update flows once the Pi is in kiosk mode?

The Node-RED editor stays reachable over the network at /nodered/ through the Nginx proxy, so you edit from a laptop. The kiosk only locks the local screen, not the services behind it.

Does this work on a Raspberry Pi with the official 7-inch touchscreen?

Yes, that is the deployed setup. Touch works natively under Wayland, and since the HMI is touch-only the mouse cursor is irrelevant; hiding it just keeps the dashboard tidy.

Related functionalities