littleweek.cloud Help

A Littleweek board on a Raspberry Pi

And on Android photo frames and tablets. Free; nothing to buy but the Pi.

Turn a Raspberry Pi and any HDMI screen into the family's wall board: littleweek.cloud/display in Chromium's kiosk mode, starting by itself, dark at night, off overnight, and back by itself after a power or Wi-Fi cut. Free; nothing to buy but the Pi. Written for the Raspberry Pi 3B+ (1 GB), the smallest board we support; any newer Pi works the same, faster.

We're still checking these steps on a real Raspberry Pi 3B+. If anything differs on yours, email hello@littleweek.cloud and we'll fix the guide.

What you need

1. Install Raspberry Pi OS Lite

  1. On a computer, open Raspberry Pi Imager. Choose your Pi, then Raspberry Pi OS (other) › Raspberry Pi OS Lite (64-bit) (Bookworm). Lite has no desktop, which leaves the 1 GB for the board.
  2. In the Imager's settings (the gear / "Edit settings"): set a hostname (littleweek-board), a user (board) and password, your Wi-Fi and its country, your time zone and keyboard, and turn on SSH.
  3. Write the card, put it in the Pi, connect the screen and power it on. Log in on the screen, or from a computer: ssh board@littleweek-board.local.

2. Install the kiosk pieces

sudo apt update && sudo apt full-upgrade -y
# A small Wayland compositor (the one Raspberry Pi OS's own desktop uses), Chromium, output control and HDMI-CEC tools.
sudo apt install -y --no-install-recommends labwc wlr-randr chromium-browser v4l-utils curl

On newer Raspberry Pi OS (Trixie) the package is chromium instead of chromium-browser; the rest is the same.

More room for a 1 GB board: swap in compressed memory instead of on the card.

sudo apt install -y zram-tools
echo -e "ALGO=zstd\nPERCENT=50" | sudo tee /etc/default/zramswap
sudo systemctl restart zramswap

3. Start the board at boot

  1. Log in automatically on the screen: sudo raspi-config › System Options › Boot / Auto Login › Console Autologin.
  2. Start the compositor when that login happens. Add to the end of ~/.profile:
    # Start the Littleweek board on the screen (not over SSH).
    if [ -z "$WAYLAND_DISPLAY" ] && [ "$(tty)" = "/dev/tty1" ]; then
      exec labwc
    fi
  1. Tell labwc to run the board. Create ~/.config/labwc/autostart:
    mkdir -p ~/.config/labwc
    cat > ~/.config/labwc/autostart <<'EOF'
    # Keep the board running: if Chromium ever quits, start it again.
    ~/littleweek-board.sh &
    # Bring it back after a network cut (section 5).
    ~/littleweek-watchdog.sh &
    EOF
  1. The board itself, ~/littleweek-board.sh:
    cat > ~/littleweek-board.sh <<'EOF'
    #!/bin/sh
    # littleweek.cloud/display in kiosk mode. Never add --incognito or --guest: the family's board (its key and its
    # copy of the calendar) lives in this browser profile; incognito would forget it at every restart.
    while true; do
      chromium-browser \
        --kiosk --ozone-platform=wayland \
        --noerrdialogs --disable-infobars --no-first-run --disable-session-crashed-bubble \
        --password-store=basic --disable-features=Translate,MediaRouter \
        --check-for-update-interval=31536000 \
        --renderer-process-limit=2 \
        https://littleweek.cloud/display/
      sleep 3
    done
    EOF
    chmod +x ~/littleweek-board.sh

    (If your system names it chromium, change the command.) --renderer-process-limit=2 keeps Chromium from starting more processes than a 1 GB board needs.

  1. Don't let the console blank the screen: sudo sed -i 's/$/ consoleblank=0/' /boot/firmware/cmdline.txt (one line; check it once with cat).
  1. Reboot: sudo reboot. The screen shows a big QR code and a six-letter code.

4. Link it from your phone

On a parent's phone: Family › Screens › Link a Screen, scan the code on the TV (or type the six letters), name it ("Kitchen"), pick a starter and what it may show. The board appears within a few seconds. Everything else (layout, text size, people, night and screen-off hours, touch, photos) is set from the phone, per screen, any time; the board picks changes up within 30 seconds. Removing the screen on the phone wipes it on its next check-in.

The board is decrypted on the Pi; littleweek.cloud can't read it. A screen is view-only unless you turn on touch.

5. Back by itself after a network cut

The board already copes: it keeps its last copy, says "Offline: showing the last copy" and catches up when the network returns, and it opens from its saved copy after a power cut. The one case it can't fix itself is a Chromium error page (the very first start without a network, before the board was ever saved). This watchdog restarts Chromium when the network comes back after being down for over two minutes:

cat > ~/littleweek-watchdog.sh <<'EOF'
#!/bin/sh
# Restarts the board's browser once the network is back after a cut of 2+ minutes (the board loop starts it again).
down=0
while true; do
  if curl -fsS --max-time 10 -o /dev/null https://littleweek.cloud/health; then
    [ "$down" -ge 4 ] && pkill -f 'chromium.*littleweek.cloud/display' || true
    down=0
  else
    down=$((down + 1))
  fi
  sleep 30
done
EOF
chmod +x ~/littleweek-watchdog.sh

6. Screen off at night

Two layers, set to the same hours:

  1. On the phone (Family › Screens › the screen › Screen off): the board goes black and stops drawing in that window.
  2. On the Pi, so the screen itself sleeps (less power, no glow). Use whichever your screen understands:
    • A TV (HDMI-CEC): the Pi asks the TV to go to standby and wakes it in the morning.
      cec-ctl -d /dev/cec0 --playback -S          # once: should list your TV
      cec-ctl -d /dev/cec0 --to 0 --standby       # TV off
      cec-ctl -d /dev/cec0 --to 0 --image-view-on # TV on (and switches to the Pi's input on most TVs)
    • A monitor: turn the Pi's HDMI output off and on with wlr-randr. Find the output's name first:
      WAYLAND_DISPLAY=wayland-0 XDG_RUNTIME_DIR=/run/user/$(id -u) wlr-randr   # e.g. HDMI-A-1

    Then schedule it with crontab -e (here off at 11 PM, on at 6 AM; use the hours you set on the phone):

    # Littleweek board: screen off at night.
    0 23 * * * WAYLAND_DISPLAY=wayland-0 XDG_RUNTIME_DIR=/run/user/1000 wlr-randr --output HDMI-A-1 --off; cec-ctl -d /dev/cec0 --to 0 --standby
    0 6  * * * WAYLAND_DISPLAY=wayland-0 XDG_RUNTIME_DIR=/run/user/1000 wlr-randr --output HDMI-A-1 --on;  cec-ctl -d /dev/cec0 --to 0 --image-view-on

    (1000 is the first user's id: check with id -u. Leave out the half your screen doesn't need; a failing cec-ctl on a monitor is harmless.)

7. Turning the screen, and other tweaks

How light it is

The board was built for this board: a small page, no animations, nothing redrawn unless something changed, one picture in memory at a time. Measured on a desktop with the CPU slowed 4×: under half a second to show the board, about 50 ms to redraw it, well under 1% of one core while idle, about 70 MB for the board's tab (about 100–120 MB with the photo slideshow on). Leave the rest of the Pi alone (no desktop, no other apps) and a 3B+ has room to spare.

Android photo frames and tablets: Fully Kiosk Browser

Any Android frame or tablet with a recent browser engine (Android System WebView or Chrome 89 or newer) can run the same board in Fully Kiosk Browser (from Google Play, or its APK from fully-kiosk.com for frames without Play):

  1. Install Fully Kiosk Browser and open it. Set the Start URL to https://littleweek.cloud/display/.
  2. In its settings (names as of Fully 1.5x; they move between versions):
    • Web Content Settings: JavaScript on, and don't clear cache, cookies or web storage on start or on reload: the board's link to the family is kept in the browser's storage.
    • Web Auto Reload: reload on network reconnect (the board also catches up by itself).
    • Device Management: Keep Screen On; Launch on Boot.
    • Screensaver / Sleep: leave off, or set its sleep hours to match the screen-off hours set on the phone.
    • Kiosk Mode (needs Fully's licence for some features): keeps people from leaving the board.
  3. Link it from a phone as in step 4. A frame without a camera can't scan anything; it doesn't need to: the phone scans the frame's QR, or types its six-letter code.

For tablets with the Littleweek app, the native Use as Wall Display (Family › Screens) is better (awake while charging, Guided Access or screen pinning). For Skylight-style Android frames, the sideloadable Littleweek APK is planned; until then, Fully Kiosk Browser works.

Removing a board

On a phone: Family › Screens › the screen › Remove This Screen. The Pi forgets the family on its next check-in and shows a new QR code. To reuse the Pi for something else, just write a new card.