7.8 KiB
12to11 for Fedora and Enterprise Linux
This repository contains the RPM packaging for 12to11, a Wayland-to-X11 protocol translator. Packages are built in the andersrh/12to11 COPR project. The repository also builds 12to11-autostart, a small companion package that launches 12to11 automatically when an X11 session begins.
What is 12to11?
12to11 is a small Wayland compositor that runs as a regular X11 client. It creates a Wayland socket and displays Wayland applications as normal X11 windows. This makes it possible to run Wayland-only applications, such as Waydroid, from an X11 session without running Weston as a nested compositor.
The package is built with EGL/OpenGL ES 2.0 rendering enabled. 12to11 also implements the Wayland data-device and X11 selection handling needed for clipboard integration between Wayland applications and the X11 desktop.
This package tracks the actively developed fish4terrisa-MSDSM fork and is licensed under GPL-3.0-only.
Example: Waydroid running through 12to11
The following screenshot shows Waydroid running as a Wayland application through 12to11 on an X11 desktop:
Supported targets
The COPR project currently provides builds for:
- Fedora 43, Fedora 44, Fedora 45, and Fedora Rawhide
- EPEL 10
- AlmaLinux 10 with EPEL (x86_64-v2)
The COPR builds are unofficial and are provided as-is.
Installation from COPR
The dnf copr command is provided by dnf-plugins-core. Install it first if it is not already available.
Fedora
sudo dnf install dnf-plugins-core
sudo dnf copr enable andersrh/12to11
sudo dnf install 12to11
AlmaLinux, RHEL-compatible distributions, and EPEL
The EL builds use libXpresent from the xlibre/xlibre-xserver COPR, because libXpresent is not available in the standard EL repositories.
On AlmaLinux, install and enable EPEL if necessary, then enable both COPR repositories:
sudo dnf install epel-release dnf-plugins-core
sudo dnf copr enable @xlibre/xlibre-xserver
sudo dnf copr enable andersrh/12to11
sudo dnf install 12to11
On RHEL-compatible distributions where epel-release is not available directly, enable EPEL using the distribution's documented procedure before installing 12to11.
Starting 12to11 automatically
The optional 12to11-autostart package installs /etc/xdg/autostart/12to11.desktop, so desktop environments that follow the XDG autostart specification launch 12to11 at the start of each X11 session:
sudo dnf install 12to11-autostart
The entry uses NoDisplay=true, so it does not appear in application menus. To disable it for a single user, copy the file to ~/.config/autostart/ and add Hidden=true.
When 12to11 is started this way it listens on the first free Wayland socket, normally wayland-0.
Running 12to11 with Waydroid
Start 12to11 in an X11 session. If 12to11-autostart is installed, 12to11 is already running when the session starts and this step can be skipped. The -printsocket option prints the Wayland socket name while the compositor continues running:
RENDERER=egl 12to11 -printsocket
For example, it may print:
wayland-0
Keep that process running. In another terminal, use the socket name printed by 12to11:
export WAYLAND_DISPLAY=wayland-0
waydroid show-full-ui
If 12to11 prints a different socket name, use that name instead. Do not assume that the socket is always wayland-0.
If the Waydroid session is not already running, start it before showing the UI:
waydroid session start
The exact Waydroid setup still depends on the Android image, kernel support, graphics driver, and whether Google Apps are installed.
Fixing a very small Waydroid window
If Waydroid appears as a very small window in the lower-left corner, set its display dimensions while the Waydroid session is running. The following example uses a 1920×1080 display; replace these values with your own screen resolution. When choosing the dimensions, account for desktop panels, taskbars, or docks that occupy part of the screen; subtract their height or width where appropriate:
waydroid prop set persist.waydroid.height 1080
waydroid prop set persist.waydroid.width 1920
Restart the Waydroid session and container so the new dimensions take effect:
waydroid session stop
sudo waydroid container stop
waydroid show-full-ui
If you are running 12to11 on a non-default Wayland socket, export the socket name before starting the UI as described above.
Building the RPM locally
The spec file builds the upstream GitHub release tarball using the project's Makefile, with EGL support enabled (the upstream default).
1. Install packaging tools
Fedora:
sudo dnf install rpm-build rpmdevtools dnf-plugins-core
AlmaLinux, RHEL-compatible distributions, and EPEL:
sudo dnf install epel-release rpm-build rpmdevtools dnf-plugins-core
sudo dnf copr enable @xlibre/xlibre-xserver
2. Install the build dependencies
Run this from the repository checkout:
sudo dnf builddep 12to11.spec
On EL systems, the xlibre COPR must be enabled first so that libXpresent-devel can be resolved.
3. Build the package
rpmdev-setuptree
cp 12to11.spec ~/rpmbuild/SPECS/
spectool -g --directory ~/rpmbuild/SOURCES ~/rpmbuild/SPECS/12to11.spec
rpmbuild -ba ~/rpmbuild/SPECS/12to11.spec
12to11-autostart needs no downloaded source — its Source0 is the 12to11.desktop file in this repository:
cp 12to11-autostart.spec ~/rpmbuild/SPECS/
cp 12to11.desktop ~/rpmbuild/SOURCES/
rpmbuild -ba ~/rpmbuild/SPECS/12to11-autostart.spec
The resulting files are written to:
~/rpmbuild/RPMS/$(uname -m)/
~/rpmbuild/SRPMS/
Install the locally built package with:
sudo dnf install ~/rpmbuild/RPMS/$(uname -m)/12to11-*.rpm
12to11-autostart is a noarch package, so it is written to ~/rpmbuild/RPMS/noarch/ instead:
sudo dnf install ~/rpmbuild/RPMS/noarch/12to11-autostart-*.rpm
Building in COPR
COPR reads 12to11.spec, downloads the source archive specified by Source0, installs the BuildRequires, and builds the package in a clean chroot for each enabled target. The EL builds also have the xlibre/xlibre-xserver COPR configured as an external repository so that libXpresent-devel is available during the build.
12to11-autostart is built from 12to11-autostart.spec in the same way. Its Source0 is the 12to11.desktop file in this repository rather than a remote archive, so the file must be available alongside the spec file (for example, committed to the same COPR source repository).
To update to a new upstream release, change Version in 12to11.spec, update the changelog, and submit the changed spec file to the COPR project.
Known limitations
12to11 is not a complete Wayland compositor. According to the upstream project:
- Touchscreen support is not implemented.
- Device switching in DMA-BUF feedback is not implemented.
- It requires X.Org Server 1.20 or later.
- It works best with a compositing window manager that supports the EWMH frame-synchronization protocol.
- Upstream testing has primarily been done with GNOME Shell; other window managers may have compatibility issues.
For Waydroid controlled with a mouse on an X11 desktop, the missing touchscreen support is usually not a problem.
