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
- 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.
- Run
sudo raspi-config, then choose System Options, Boot / Auto Login, Desktop Autologin. - In
raspi-config, choose Display Options, Screen Blanking, and turn it off so the monitor stays awake.
2. Start the display at boot
- 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 - Create
~/bin/cleanday-kiosk.sh:
Make it executable with#!/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"chmod +x ~/bin/cleanday-kiosk.sh. The loop waits for the network before opening the page. - Create
~/.config/autostart/cleanday-kiosk.desktop(use your own user name in place ofpi; 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 - 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.
- 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 - 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 - Add
XCURSOR_THEME=blankas 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 commandbrightnessctl set 10%sets the brightness. - HDMI monitor: install
ddcutil(sudo apt install ddcutil) and add your user to thei2cgroup (sudo usermod -aG i2c $USER, then restart). The commandddcutil setvcp 10 10sets the brightness to 10. Runddcutil detectfirst; 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-urland restart the Pi.