This is an old revision of the document!
Table of Contents
Raspberry Pi: X11 or Wayland
With the operating system Raspbian GNU/Linux 12 (bookworm) it is possibile to choose between the traditional X11 graphical backend and the new Wayland. With X11 you can use only the Openbox window manager, while in Wayland you can choose Wayfire or the Labwc window manager.
Start the raspi-config and navigate the Advanced Options ⇒ Wayland to make your choice.
If you are using the default LightDM desktop manager, the settings are saved into /etc/lightdm/lightdm.conf. Here are the entries for Wayland Wayfire and Labwc respectively:
greeter-session=pi-greeter-wayfire user-session=LXDE-pi-wayfire autologin-session=LXDE-pi-wayfire fallback-test=/usr/bin/xfallback.sh fallback-session=LXDE-pi-x fallback-greeter=pi-greeter
greeter-session=pi-greeter-labwc user-session=LXDE-pi-labwc autologin-session=LXDE-pi-labwc #fallback-test= #fallback-session= #fallback-greeter=
How to tell if X11 or Wayland is running
From a terminal running in the graphical environment:
echo $XDG_SESSION_TYPE x11
A more comprensive insight for a Wayland session:
set | grep XDG_SESSION XDG_SESSION_CLASS=user XDG_SESSION_DESKTOP=LXDE-pi-labwc XDG_SESSION_ID=1 XDG_SESSION_PATH=/org/freedesktop/DisplayManager/Session0 XDG_SESSION_TYPE=wayland
Starting the Wayland backend manually
First of all you have to stop the running graphical environment:
sudo systemctl stop lightdm.service
Then, as the unprivileged user, you can run the commad
wayfire-pi
or
labwc-pi
This can be useful to capture stdout and stderr messages from the window manager.