Skip to main content
Clean DayHelp

DIY: Raspberry Pi Display

A Raspberry Pi connected to a monitor or TV can show Clean Day full time. This guide is for people comfortable with a terminal. It was tested on Raspberry Pi OS (Desktop, 64-bit) with the default labwc Wayland desktop. You need the display link first (see Connect a Display).

1. Prepare the Pi

  1. Use Raspberry Pi Imager to install Raspberry Pi OS (64-bit) with desktop, and set your Wi-Fi and user name in the Imager settings.
  2. Run sudo raspi-config, then choose System Options, Boot / Auto Login, Desktop Autologin.
  3. In raspi-config, choose Display Options, Screen Blanking, and turn it off so the monitor stays awake.

2. Start the display at boot

  1. Save your display link where only your user can read it (the link contains a secret):
    mkdir -p ~/.config/cleanday ~/bin
    echo 'YOUR_DISPLAY_LINK' > ~/.config/cleanday/kiosk-url
    chmod 600 ~/.config/cleanday/kiosk-url
  2. Create ~/bin/cleanday-kiosk.sh:
    #!/usr/bin/env bash
    url="$(cat ~/.config/cleanday/kiosk-url)"
    host="$(echo "$url" | awk -F/ '{print $3}')"
    for _ in $(seq 1 60); do
      curl -fsS -o /dev/null --max-time 3 "https://$host/" && break
      sleep 2
    done
    exec chromium --kiosk --noerrdialogs --disable-infobars \
      --disable-session-crashed-bubble --password-store=basic "$url"
    Make it executable with chmod +x ~/bin/cleanday-kiosk.sh. The loop waits for the network before opening the page.
  3. Create ~/.config/autostart/cleanday-kiosk.desktop (use your own user name in place of pi; do not put the display link in this file):
    [Desktop Entry]
    Type=Application
    Name=Clean Day Kiosk
    Exec=/home/pi/bin/cleanday-kiosk.sh
    Terminal=false
  4. Restart the Pi. The display opens full screen.

3. Hide the mouse pointer

The desktop has no setting to hide an idle pointer, so use a fully transparent pointer theme.

  1. Create the theme folder and a one-pixel transparent pointer:
    mkdir -p ~/.icons/blank/cursors
    printf '[Icon Theme]\nName=blank\n' > ~/.icons/blank/index.theme
    printf '%s' 'WGN1chAAAAAAAAEAAQAAAAIA/f8BAAAAHAAAACQAAAACAP3/AQAAAAEAAAABAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAA=' \
      | base64 -d > ~/.icons/blank/cursors/blank
  2. Point every pointer name at it:
    cd ~/.icons/blank/cursors
    for n in $(ls /usr/share/icons/*/cursors/ | grep -v ':' | sort -u); do
      [ -e "$n" ] || ln -s blank "$n"
    done
  3. Add XCURSOR_THEME=blank as a new line in ~/.config/labwc/environment (create the file if it does not exist), then restart the Pi.

4. Dim the screen on a schedule

To dim the monitor itself rather than the page, schedule a brightness change with cron. Which tool works depends on the screen:

  • Raspberry Pi touch display (ribbon cable): install brightnessctl (sudo apt install brightnessctl). The command brightnessctl set 10% sets the brightness.
  • HDMI monitor: install ddcutil (sudo apt install ddcutil) and add your user to the i2c group (sudo usermod -aG i2c $USER, then restart). The command ddcutil setvcp 10 10 sets the brightness to 10. Run ddcutil detect first; monitors that do not report DDC/CI support cannot be dimmed this way.

Run crontab -e and add one line for dimming and one for brightening, for example 10% from 9 pm and 100% from 7 am (HDMI shown; use brightnessctl set 10% instead for the touch display):

0 21 * * * ddcutil setvcp 10 10 && ddcutil setvcp 12 30
0 7 * * * ddcutil setvcp 10 100 && ddcutil setvcp 12 100

To turn the monitor off overnight instead, schedule the power state. On an HDMI monitor, ddcutil setvcp d6 5 turns it off and ddcutil setvcp d6 1 turns it on. On the touch display, use brightnessctl set 0% and brightnessctl set 100%. Run ddcutil getvcp d6 first; monitors that do not report a power mode cannot be turned off this way.

0 23 * * * ddcutil setvcp d6 5
0 6 * * * ddcutil setvcp d6 1

Tips

  • Keep the Pi on its official power supply; under-voltage can make the screen flicker.
  • If the display ever shows "Offline", see Offline Troubleshooting.
  • To change the display link, edit ~/.config/cleanday/kiosk-url and restart the Pi.