This section details the manual installation and configuration of Wayland compositors and related services and utilities.
Unlike Xorg, Wayland implementations combine the display server, the window manager and the compositor in a single application.
GNOME, KDE Plasma and Enlightenment have Wayland sessions. GNOME uses its Wayland session by default. When using these desktop environments, applications built with GTK+ will automatically choose the Wayland backend, while Qt5 and EFL applications might require setting some environment variables if used outside KDE or Enlightenment, respectively.
Void Linux currently packages the following Wayland compositors:
- Weston: reference compositor for Wayland
- Sway: an i3-compatible Wayland compositor
- Wayfire: 3D Wayland compositor
- Hikari: a stacking compositor with some tiling features
- Cage: a Wayland kiosk
Both GNOME and KDE Plasma have EGLStreams backends for Wayland, which means they
can use the proprietary NVIDIA drivers. Most other Wayland compositors require
drivers that implement the GBM interface. The main driver for this purpose is
provided by the mesa-dri package. The "Graphics
Drivers" section has more details regarding
setting up graphics in different systems.
Qt5-based applications require
installing the qt5-wayland package and setting the environment variable
QT_QPA_PLATFORM=wayland-egl to enable their Wayland backend. Some KDE specific
applications also require installing the kwayland package.
EFL-based applications require
setting the environment variable ELM_DISPLAY=wl, and can have issues without
it, due to not supporting XWayland properly.
GTK+-based applications
should use the Wayland backend automatically. Information about other toolkits
can be found in the Wayland
documentation.
Media applications, such as mpv(1),
vlc(1) and imv work natively on Wayland.
Mozilla Firefox ships with a Wayland backend which is disabled by default. To
enable the Wayland backend, either set the environment variable
MOZ_ENABLE_WAYLAND=1 before running firefox or use the provided
firefox-wayland script.
Browsers based on GTK+ or Qt5, such as Midori and qutebrowser(1), should work on Wayland natively.
If an application doesn't support Wayland, it can still be used in a Wayland
context. XWayland is an X server that bridges this gap for most Wayland
compositors, and is installed as a dependency for most of them. Its package is
xorg-server-xwayland. For Weston, the correct package is weston-xwayland.
The Wayland API uses the XDG_RUNTIME_DIR environment variable to determine the
directory for the Wayland socket.
Install elogind as your session manager to
automatically setup XDG_RUNTIME_DIR.
Alternatively, manually set the environment variable through the shell. Make
sure to create a dedicated user directory and set its permissions to 700. A
good default location is /run/user/$(id -u).
It is also possible that some applications use the XDG_SESSION_TYPE
environment variable in some way, which requires that you set it to wayland.