Skip to content

Screenshotter on Raspberry Pi

For Raspberry Pi OS 64-bit. The steps assume Raspberry Pi OS Trixie (Debian 13) on a Raspberry Pi 4 or 5.

The goal: run the Screenshotter on a Raspberry Pi that drives a sign, so the screen it displays is visible in Onlit's sign dashboard.

Everything on Install and run Screenshotter and Screenshotter values and flags about arguments, API keys, intervals and heartbeats applies here too. This page covers only what is different on a Raspberry Pi.

Check your Raspberry Pi OS is 64-bit

uname -m

The answer must be aarch64. If it says armv7l you are running the 32-bit system, and the Screenshotter will not run — reinstall using the 64-bit Raspberry Pi OS image.

Install the screen capture helper

The Raspberry Pi OS desktop uses Wayland. On Wayland the standard Java screen capture returns a black image, so the Screenshotter captures through grim instead:

sudo apt install grim

Without this the Screenshotter stops at startup and tells you to install it.

If your Pi is configured for the older X11 desktop instead (sudo raspi-config → Advanced Options → Wayland), grim is not needed and the Screenshotter uses the standard Java capture automatically.

Install the Screenshotter

Download the Raspberry Pi build, PreseriaScreenshotter 1.0.1 for Linux arm64, unless your Onlit administrator gives you a different version. It contains its own Java runtime, so Java does not need to be installed separately.

Download and extract it on the Pi:

wget https://download.preseria.com/PreseriaScreenshotter-1.0.1-linux-aarch64.tar.gz
sudo mkdir -p /opt/preseria
sudo tar -xzf PreseriaScreenshotter-1.0.1-linux-aarch64.tar.gz -C /opt/preseria

The launcher is:

/opt/preseria/PreseriaScreenshotter/bin/PreseriaScreenshotter

Keep the extracted folder together — the launcher depends on the lib folder beside it, which holds both the application and its bundled Java runtime.

If your administrator gave you a plain .jar file instead, install Java 21 or newer (sudo apt install openjdk-21-jre-headless) and replace the launcher in the commands below with java -jar /path/to/screenshotter.jar; the arguments are the same. The service template takes JAVA_BIN and JAR_PATH for that case (Run Screenshotter as a service).

Run it

Run this from the desktop session of the Pi — a terminal window on the Pi itself, not an SSH login, so the capture can reach the screen.

export SCREENSHOTTER_API_KEY='your-api-key'

/opt/preseria/PreseriaScreenshotter/bin/PreseriaScreenshotter \
  https://signage.example.com/api/signage/screenshot \
  - \
  123 \
  lobby-a \
  0 0 0 0 10 \
  --api-key-env=SCREENSHOTTER_API_KEY \
  --heartbeat=60

The startup banner reports the capture backend it chose:

Capture: grim -

Stop it with Ctrl+C.

For a larger dashboard preview, add --thumbnail-height=400 to the command. See Choose the dashboard thumbnail height for the supported sizes and the startup message that confirms your setting.

Running over SSH

Capture needs the desktop session, which an SSH login does not have. To start it over SSH, tell it which session to capture:

export WAYLAND_DISPLAY=wayland-0
export XDG_RUNTIME_DIR=/run/user/$(id -u)

Use the same user account that is logged in to the desktop, and keep that desktop session logged in.

Choose which screen to capture

A Pi with two HDMI outputs captures both side by side by default. List the output names (install the tool first if the command is not found):

sudo apt install wlr-randr
wlr-randr

Then capture just one, for example:

--capture-output=HDMI-A-1

To capture a region instead, use the x y width height values described on Screenshotter values and flags.

Start automatically at boot

Use the user-level service template, which runs inside the desktop session and therefore reaches the screen without extra configuration.

  1. Download these files:
  2. Install the launcher (as an administrator):

    sudo mkdir -p /opt/preseria/screenshotter/deploy/systemd
    sudo cp run-sign-capture.sh /opt/preseria/screenshotter/deploy/systemd/
    sudo chmod +x /opt/preseria/screenshotter/deploy/systemd/run-sign-capture.sh
    
  3. Install the service and its settings as the desktop user:

    mkdir -p ~/.config/systemd/user ~/.config/preseria/sign-capture
    cp sign-capture-user@.service ~/.config/systemd/user/
    cp sign-capture.raspberry-pi.env ~/.config/preseria/sign-capture/lobby-a.env
    
  4. Edit ~/.config/preseria/sign-capture/lobby-a.env and fill in the upload URL, event ID, sign name, and API key. LAUNCHER_BIN already points at the launcher installed under Install the Screenshotter — change it only if you extracted the tarball somewhere else. Protect the file, because it holds the API key:

    chmod 600 ~/.config/preseria/sign-capture/lobby-a.env
    
  5. Enable and start:

    systemctl --user daemon-reload
    systemctl --user enable --now sign-capture-user@lobby-a.service
    sudo loginctl enable-linger "$USER"
    
  6. Check it:

    systemctl --user status sign-capture-user@lobby-a.service
    journalctl --user -u sign-capture-user@lobby-a.service -f
    

For a Pi where the sign account is not the one you administer with, or for x86 Linux signs, use the system-wide template on Run Screenshotter as a service instead. It runs as a system service, but it still needs a desktop to capture: the User= account must be logged in to the graphical session (automatically, at boot) and the env file must point the service at that session's WAYLAND_DISPLAY and XDG_RUNTIME_DIR — or at a custom --capture-command that can produce an image without one. A system service on a Pi with no desktop session has nothing to capture.

Troubleshooting

The Linux-specific messages — grim missing, black captures, no Wayland display, the WebP encoder self-test, capture timeouts, a hot Pi, other compositors — are listed with their fixes on Screenshotter permissions and troubleshooting.