Skip to content

Instantly share code, notes, and snippets.

@seffs
Last active April 6, 2025 01:31
Show Gist options
  • Save seffs/2395ca640d6d8d8228a19a9995418211 to your computer and use it in GitHub Desktop.
Save seffs/2395ca640d6d8d8228a19a9995418211 to your computer and use it in GitHub Desktop.
Raspbian Bookworm - Ultra Minimal Kiosk Setup

This was tested on a FRESH Raspbian Bookworm Lite installation. Proceed with caution.

EDIT 23/12/2023: Removed dead download link and added own release

EDIT 09/06/2024: Force wayland after install

EDIT 06/07/2024: Add Troubleshooting section

EDIT 11/09/2024: Rearrange config file


First Steps

Update your system

sudo apt update && sudo apt -y full-upgrade

Install core packages

sudo apt install wayfire seatd xdg-user-dirs

Create ~/.config/wayfire.ini

mkdir -p ~/.config
touch ~/.config/wayfire.ini

Force Wayland through raspi-config

See https://raspberrypi.stackexchange.com/a/144867 ---> REBOOT

On systems older than Pi4: you need wayland=on
See https://www.raspberrypi.com/documentation/computers/configuration.html#wayland
---> REBOOT

Test wayfire

wayfire ---> A black screen should appear with the mouse pointer at the center. Otherwise see Troubleshooting

Note: if you are controlling your Pi with a physical keyboard, you might not be able to terminate the process from the same session. This is because no keybindings exist in the config file yet. You can spawn a second tty with ctrl+alt+f2 and kill it from there.


Change display orientation

sudo apt install wlr-randr

Rotate display: WAYLAND_DISPLAY=wayland-1 wlr-randr --output HDMI-A-1 --transform 180
(------------------------has to be launched from within the session. Keep reading---------------------------)


Hide mouse pointer

You'll need the wayfire-plugins-extra package. Unfortunately it is not available in the Bookworm repos. You have two ways to install it [1]

1.1) Download compiled library

  1. Choose your arch
  1. Decompress with tar xf /path/to/wayfire-plugins-extra.tar.xz
  2. Each plugin comes with a .so and a an .xml file. You will need to copy those files to their correct paths:
    /usr/lib/<your-arch-linux-gnu>/wayfire/<desired-plugin>.so
    /usr/share/wayfire/metadata/<desired-plugin>.xml

1.2) Build from source

  1. Install dev packages:
    sudo apt install libglibmm-2.4-dev libglm-dev libxml2-dev libpango1.0-dev libcairo2-dev wayfire-dev libwlroots-dev libwf-config-dev
  2. Follow the instructions in https://github.com/seffs/wayfire-plugins-extra-raspbian/
  3. Each plugin comes with a .so and .xml file. meson should take care of the installation. Otherwise check if the following path exists for any new extra plugin:
    ls /usr/lib/<your-arch-linux-gnu>/wayfire/<new-extra-plugin>.so
    ls /usr/share/wayfire/metadata/<new-extra-plugin>.xml

2) Activate your plugin(s)

I was only interested in hiding the mouse pointer. This can be accomplished with the hide_cursor plugin. The same concept applies to the rest of plugins.

Open your ~/.config/wayfire.ini file and paste the following:

[core]
plugins = \
        autostart \
        ### We need to add the extra plugin to the list ###
        hide-cursor

### We can tweak it to our liking. You will find the documentation inside of each plugin's XML file. ###
#[hide-cursor]
#toggle = <alt> KEY_Z
#hide_delay = 3

### Execute commands on compositor startup ###
[autostart]
# my_script = /path/to/script
rotate_display = WAYLAND_DISPLAY=wayland-1 wlr-randr --output HDMI-A-1 --transform 360

Execute your script on startup

Adjust my_script = /path/to/script to your needs. Don't forget to uncomment it.

Start wayfire

wayfire -c ~/.config/wayfire.ini ---> See? No pointer!

Troubleshooting

failed to open vc4: /usr/lib/dri/vc4_dri.so

sudo apt install libgl1-mesa-dri
sudo apt install mesa-utils --> If you want to test the mesa drivers

Vulkan support

sudo apt install vulkan-tools mesa-vulkan-drivers

X11 support

sudo apt install xwayland --> Lots of dependencies. Install if necessary


[1] Based on bjtheone's instructions

@ruperthair
Copy link

For anyone on a Pi 3, the kernel command line parameter is wayland=on and not wayland=enabled as above. Thanks for the guide, and it would be great if you could update it.

@seffs
Copy link
Author

seffs commented Oct 29, 2024

Updated the cmdline. Thanks @ruperthair

@jorritsmit
Copy link

if it helps anyone: i installed the compiled libraries but couldn't start alacritty in wayfire. installing libwlroots-dev fixed that

@Amotrax
Copy link

Amotrax commented Feb 9, 2025

Thanks ! This tutorial help me on Debian 12 for RPI4 :
sudo apt install libgl1-mesa-dri
sudo apt install mesa-util
without that amiberry don't work and give me this error :

MESA-LOADER: failed to open vc4: /usr/lib/dri/vc4_dri.so: cannot open shared object file: No such file or directory (search paths /usr/lib/arm-linux-gnueabihf/dri:$${ORIGIN}/dri:/usr/lib/dri, suffix _dri)
MESA-LOADER: failed to open zink: /usr/lib/dri/zink_dri.so: cannot open shared object file: No such file or directory (search paths /usr/lib/arm-linux-gnueabihf/dri:$${ORIGIN}/dri:/usr/lib/dri, suffix _dri)
MESA-LOADER: failed to open kms_swrast: /usr/lib/dri/kms_swrast_dri.so: cannot open shared object file: No such file or directory (search paths /usr/lib/arm-linux-gnueabihf/dri:$${ORIGIN}/dri:/usr/lib/dri, suffix _dri)
MESA-LOADER: failed to open swrast: /usr/lib/dri/swrast_dri.so: cannot open shared object file: No such file or directory (search paths /usr/lib/arm-linux-gnueabihf/dri:$${ORIGIN}/dri:/usr/lib/dri, suffix _dri)
Unable to create window: EGL not initialized

So you save me from this galley ! :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment