This is Gentoo's testing wiki. It is a non-operational environment and its textual content is outdated.
Please visit our production wiki at https://wiki.gentoo.org
Wayland
Wayland is intended to be a simpler replacement for X display server.
"Wayland is a protocol for a compositor to talk to its clients as well as a C library implementation of that protocol. The compositor can be a standalone display server running on Linux kernel modesetting and evdev input devices, an X application, or a wayland client itself. The clients can be traditional applications, X servers (rootless or fullscreen) or other display servers."[1] Where possible, Wayland reuses existing drivers and infrastructure, such as the DRI drivers, the kernel side GEM scheduler and kernel mode setting.
Installation
USE flags
Global
Several packages are aware of the global wayland
USE flag.
Local
USE flags for dev-libs/wayland Wayland protocol libraries
Emerge
root #
emerge --ask dev-libs/wayland
Toolkit support
GTK
Wayland is completely supported in GTK+ 3.22[2]. Nevertheless, when porting application in general two issues must be considered:
- Ensure that your application uses gtk+-3.0 for its pkg-config request.
- All calls to the gdk_x11_ namespace and raw Xlib calls must be wrapped in build-time and run-time backend checks.
More details including plans and progress can be found on the GNOME wiki.
Qt
For Qt an additional package called dev-qt/qtwayland is required. In the Qt Wiki it says: "QtWayland is a Qt 5 module that wraps the functionality of Wayland. QtWayland is separated into a client and server side. The client side is the wayland platform plugin, and provides a way to run Qt applications as Wayland clients. The server side is the QtCompositor API, and allows users to write their own Wayland compositors."
Porting Qt applications is much easier than GTK+ applications. More information on how to use QtWayland can be found at https://wiki.qt.io/Qtwayland and at https://wayland.freedesktop.org/qt5.html.
Applications
As mentioned above GTK3+ and Qt support Wayland. Unfortunately most applications still require the X server. Several scenarios are possible to get them working:
- Porting the application by rewriting the components with X.org dependencies such that they work also for wayland. Cf. Wayland-Ports. Other examples are mpv which is a video player based on MPlayer/mplayer2 or the minimalist web-client xombrero, midori and epiphany also have full support for wayland. GNOME and KDE are expected to be ported to it.
- Xclients can be run on Wayland. Afterwards the required application can be run as usual on the Xclient. See X server running on wayland.
- Xwayland it the third option which is running Wayland on the X server.
See also
- Wayland compositor — list of display servers implementing the Wayland protocol (similar to a window manager under X)
- Xorg — an open source implementation of the X Window System. Xorg will one day deprecate in favor of Wayland.
- Sakaki's EFI Install Guide — includes a tutorial-style chapter covering the installation of GNOME over Wayland (systemd version, OpenRC version).
External resources
- https://wiki.archlinux.org/index.php/Wayland
- http://manpages.ubuntu.com/manpages/xenial/en/man1/weston.1.html
- http://manpages.ubuntu.com/manpages/xenial/en/man5/weston.ini.5.html
- https://wiki.qt.io/Qtwayland
- https://wiki.gnome.org/Initiatives/Wayland/GTK%2B
- https://www.linux.com/news/what-why-and-how-wayland-and-weston-linux - A Linux.com article explaining Wayland (and Weston).