Using xwayland-satellite
Available since version 25.08
Automatic Integration
With no configuration, niri will:- Create X11 sockets on disk
- Export
$DISPLAY - Spawn xwayland-satellite on-demand when an X11 client connects
- Automatically restart xwayland-satellite if it dies
Remove Custom Config
If you had a custom config which manually started
xwayland-satellite and set $DISPLAY, you should remove those customizations for the automatic integration to work.Why xwayland-satellite?
We’re using xwayland-satellite rather than Xwayland directly because X11 is very cursed. xwayland-satellite takes on the bulk of the work dealing with the X11 peculiarities from us, giving niri normal Wayland windows to manage.Using the labwc Wayland Compositor
Labwc is a traditional stacking Wayland compositor with Xwayland. You can run it as a window, then run X11 apps inside.Directly Running Xwayland in Rootful Mode
This method involves invoking Xwayland directly and running it as its own window. It also requires an extra X11 window manager running inside it.Start Xwayland
Run This will spawn a black window which you can resize and fullscreen (with
Xwayland (just the binary on its own without flags):Mod+Shift+F).On older Xwayland versions the window will be screen-sized and non-resizable.
Run X11 Window Manager
Run an X11 window manager inside Xwayland:This way you can manage X11 windows inside the Xwayland instance.
Clipboard Sharing
For textual data you can do it manually using wl-clipboard:Hotkey Bindings
You can bind these to hotkeys:Using xwayland-run
xwayland-run is a helper utility to run an X11 client within a dedicated Xwayland rootful server. It takes care of starting Xwayland, setting the X11 DISPLAY environment variable, setting up xauth and running the specified X11 client. When the X11 client terminates, xwayland-run will automatically close the dedicated Xwayland server.Usage
Example
Using the Cage Wayland Compositor
It is also possible to run the X11 application in Cage, which runs a nested Wayland session which also supports Xwayland.Setup
Desktop Entry Modification
Optionally, you can modify the desktop entry for the application and add thecage -- prefix to the Exec property. For example, the Spotify Flatpak would look like:
Proton-GE Native Wayland
It’s possible to run some games as native Wayland clients, sidestepping the issues related to X11. You can do it with a custom version of Proton like Proton-GE by setting thePROTON_ENABLE_WAYLAND=1 environmental variable in the game’s launch parameters.
Steam Launch Options
Using gamescope
You can use gamescope to run X11 games and even Steam itself.Similar to Cage, gamescope will only show a single, topmost window, so it’s not very suitable for running regular apps. But you can run Steam in gamescope and then start games from Steam just fine.