Introduction to Xwayland

The Xwayland package is an Xorg server running on top of the wayland server. It has been separated from the main Xorg server package. It allows running X clients inside a wayland session.

This package is known to build and work properly using an LFS-11.2 platform.

Package Information

Xwayland Dependencies


libxcvt-0.1.2, Pixman-0.40.0, wayland-protocols-1.26, and Xorg Fonts (only font-util)



git-2.37.2 (to download packages needed for the tests), libgcrypt-1.10.1, Nettle-3.8.1, xmlto-0.0.28, Xorg Legacy Fonts (only bdftopcf, for building fonts required for the tests), rendercheck (for tests), and weston (for tests)

User Notes: https://wiki.linuxfromscratch.org/blfs/wiki/xwayland

Installation of Xwayland

Install xwayland by running the following commands:

sed -i '/install_man/,$d' meson.build &&

mkdir build &&
cd    build &&

meson --prefix=$XORG_PREFIX         \
      -Dxkb_output_dir=/var/lib/xkb \
      ..                            &&

Building the test framework needs some work. First, weston brings in several dependencies, but the number can be reduced by disabling unneeded features. The meson command for a stripped down build of weston is shown in Upstream continuous integration build.

Running the tests involves downloading two other frameworks, in addition to the mentioned optional dependencies:

mkdir tools &&
pushd tools &&

git clone https://gitlab.freedesktop.org/mesa/piglit.git --depth 1 &&
cat > piglit/piglit.conf << EOF                                    &&

git clone https://gitlab.freedesktop.org/xorg/test/xts --depth 1   &&

export DISPLAY=:22           &&
../hw/vfb/Xvfb $DISPLAY &
VFB_PID=$!                   &&
cd xts                       &&
CFLAGS=-fcommon ./autogen.sh &&
make                         &&
kill $VFB_PID                &&
unset DISPLAY VFB_PID        &&

Then the tests can be run with:

XTEST_DIR=$(pwd)/tools/xts PIGLIT_DIR=$(pwd)/tools/piglit ninja test

Now, as the root user:

ninja install &&
mkdir -pv /etc/X11/xorg.conf.d &&
cat >> /etc/sysconfig/createfiles << "EOF"
/tmp/.X11-unix dir 1777 root root

If Xorg-Server-21.1.4 is not installed and you do not plan to install it later, you can install Xvfb from this package. As the root user:

install -vm755 hw/vfb/Xvfb /usr/bin

Command Explanations

sed -i '/install_man/,$d' meson.build: Prevents installing a manual page for Xserver, which is not part of this package.

mkdir -pv /etc/X11/xorg.conf.d: This directory is needed to put configuration files for Xwayland. This command ensures that it exists, as some applications might use it without first creating it.

cat >> /etc/sysconfig/createfiles...: This command creates the /tmp/.X11-unix directory at startup, and ensures that the permissions and ownership are correct as required by applications using Xwayland.


Installed Program: Xwayland
Installed Library: None
Installed Directory: None

Short Descriptions


Allows X clients to run under wayland