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.
Both GNOME and KDE Plasma have Wayland sessions. For GNOME, Wayland is already the default session, while Plasma still has a few issues to iron out, so their default remains a Xorg session. While running these desktop environments, applications built with GTK+ will automatically choose the Wayland backend, but Qt applications might require the proper environment variable in GNOME. This is explained below.
Void Linux currently packages the following Wayland compositors:
- Weston: reference compositor for Wayland
- Sway: an i3-compatible Wayland compositor
- Wayfire: 3D Wayland compositor
- Cage: a Wayland kiosk
KDE Plasma has an implementation for the proprietary NVIDIA API used for
Wayland. The other Wayland compositors require open source drivers that
implement EGL. The main driver for this purpose is provided by the mesa-dri
package. The graphics section has more details
for setting up graphics in different systems.
Qt5 based applications require the installation of the qt5-wayland
package and
setting the environment variable QT_QPA_PLATFORM=wayland-egl
to enable their
Wayland backend. Some KDE specific applications might also require the
installation of the kwayland
package. GTK+ applications should do it
automatically, but setting GDK_BACKEND=wayland
can force the Wayland backend
(however, this can break applications such as Chromium).
Mozilla Firefox ships with a Wayland backend which is disabled by default.
Launching Firefox with MOZ_ENABLE_WAYLAND=1
is required to enable it.
The Midori browser, which has a GTK+ interface, should also work on Wayland.
Qt5 based browsers, such as qutebrowser, also work on Wayland.
- Alacritty (it's the standard terminal emulator for Sway)
- Kitty
- Sakura
Both mpv and VLC work on Wayland, with hardware acceleration (if available and enabled).
For image viewing, imv works natively on Wayland.
- For screenshots:
grim
andslurp
.slurp
is required to define a geometry. - For accessing the clipboard:
wl-clipboard
. - For displaying notifications (notification daemon):
mako
. - For launching applications:
- wofi
- bemenu
- dmenu-wayland
If an application still doesn't support Wayland, it can still be run 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
.