wiki: Update Xwayland-related info
Browse files at this commitbf472970c6b84b02d51a195b322dfd741c586e9eParent: 082d0583 changed files +27 -38
- docs/wiki/FAQ.md +2 -2
- docs/wiki/Integrating-niri.md +1 -1
- docs/wiki/Xwayland.md +24 -35
docs/wiki/FAQ.mdmodified+2 -2
| @@ -60,9 +60,9 @@ A combination of factors: | |||
| 60 | 60 | ||
| 61 | All in all, the situation works out in favor of avoiding Xwayland integration. | 61 | All in all, the situation works out in favor of avoiding Xwayland integration. |
| 62 | 62 | ||
| 63 | -Also, in the next release niri will have seamless built-in xwayland-satellite integration, that will solve the big rough edge of having to set it up manually. | 63 | +<sup>Since: next release</sup> niri has seamless built-in xwayland-satellite integration that by and large works as well as built-in Xwayland in other compositors, solving the hurdle of having to set it up manually. |
| 64 | 64 | ||
| 65 | -Besides, I wouldn't be too surprised if, down the road, xwayland-satellite becomes the standard way of integrating Xwayland into new compositors, since it takes on the bulk of the annoying work, and isolates the compositor from misbehaving clients. | 65 | +I wouldn't be too surprised if, down the road, xwayland-satellite becomes the standard way of integrating Xwayland into new compositors, since it takes on the bulk of the annoying work, and isolates the compositor from misbehaving clients. |
| 66 | 66 | ||
| 67 | ### Can I enable blur behind semitransparent windows? | 67 | ### Can I enable blur behind semitransparent windows? |
| 68 | 68 | ||
docs/wiki/Integrating-niri.mdmodified+1 -1
| @@ -20,7 +20,7 @@ Xwayland is required for running X11 apps and games, and also the Orca screen re | |||
| 20 | <sup>Since: next release</sup> Niri integrates with [xwayland-satellite](https://github.com/Supreeeme/xwayland-satellite) out of the box. | 20 | <sup>Since: next release</sup> Niri integrates with [xwayland-satellite](https://github.com/Supreeeme/xwayland-satellite) out of the box. |
| 21 | The integration requires xwayland-satellite >= 0.7 available in `$PATH`. | 21 | The integration requires xwayland-satellite >= 0.7 available in `$PATH`. |
| 22 | Please consider making niri depend on (or at least recommend) the xwayland-satellite package. | 22 | Please consider making niri depend on (or at least recommend) the xwayland-satellite package. |
| 23 | -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. | 23 | +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. |
| 24 | 24 | ||
| 25 | You can change the path where niri looks for xwayland-satellite using the [`xwayland-satellite` top-level option](./Configuration:-Miscellaneous.md#xwayland-satellite). | 25 | You can change the path where niri looks for xwayland-satellite using the [`xwayland-satellite` top-level option](./Configuration:-Miscellaneous.md#xwayland-satellite). |
| 26 | 26 | ||
docs/wiki/Xwayland.mdmodified+24 -35
| @@ -1,48 +1,37 @@ | |||
| 1 | -X11 is very cursed, so built-in Xwayland support [is not planned at the moment](./FAQ.md#why-doesnt-niri-integrate-xwayland-like-other-compositors). | ||
| 2 | -However, there are multiple solutions to running X11 apps in niri. | ||
| 3 | - | ||
| 4 | ## Using xwayland-satellite | 1 | ## Using xwayland-satellite |
| 5 | 2 | ||
| 6 | -[xwayland-satellite] implements rootless Xwayland in a separate application, without the host compositor's involvement. | 3 | +<sup>Since: next release</sup> |
| 7 | -It makes X11 windows appear as normal windows, just like a native Xwayland integration. | ||
| 8 | -xwayland-satellite works well with most applications: Steam, games, Discord, even more exotic things like Ardour with wine Windows VST plugins. | ||
| 9 | -However, X11 apps that want to position windows or bars at specific screen coordinates won't behave correctly. | ||
| 10 | 4 | ||
| 11 | -> [!NOTE] | 5 | +Niri integrates with [xwayland-satellite](https://github.com/Supreeeme/xwayland-satellite) out of the box. |
| 12 | -> In the next release, niri will have [built-in xwayland-satellite integration](./Configuration:-Miscellaneous.md#xwayland-satellite). | 6 | +Ensure xwayland-satellite >= 0.7 is installed and available in `$PATH`. |
| 13 | -> You can try it by installing git versions of both niri and xwayland-satellite. | 7 | +With no further configuration, niri will create X11 sockets on disk, export `$DISPLAY`, and spawn xwayland-satellite on-demand when an X11 client connects. |
| 14 | -> With no further configuration, niri will create X11 sockets, then when an X11 client connects, automatically start xwayland-satellite. | 8 | +If xwayland-satellite dies, niri will automatically restart it. |
| 15 | -> | ||
| 16 | -> This matches how other compositors run Xwayland (but in niri's case, it's xwayland-satellite rather than Xwayland itself). | ||
| 17 | -> It also makes X11 apps work fine in `spawn-at-startup` and in XDG autostart. | ||
| 18 | 9 | ||
| 19 | -Install it from your package manager, or build it according to instructions from its README, then run the `xwayland-satellite` binary. | 10 | +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. |
| 20 | -Look for a log message like: `Connected to Xwayland on :0`. | ||
| 21 | -Now you can start X11 applications on this X11 DISPLAY: | ||
| 22 | 11 | ||
| 23 | -``` | 12 | +To check that the integration works, verify that the niri output says something like `listening on X11 socket: :0`: |
| 24 | -env DISPLAY=:0 flatpak run com.valvesoftware.Steam | 13 | + |
| 14 | +```sh | ||
| 15 | +$ journalctl --user-unit=niri -b | ||
| 16 | +systemd[2338]: Starting niri.service - A scrollable-tiling Wayland compositor... | ||
| 17 | +niri[2474]: 2025-08-29T04:07:40.043402Z INFO niri: starting version 25.05.1 (0.0.git.2345.d9833fc1) | ||
| 18 | +(...) | ||
| 19 | +niri[2474]: 2025-08-29T04:07:40.690512Z INFO niri: listening on Wayland socket: wayland-1 | ||
| 20 | +niri[2474]: 2025-08-29T04:07:40.690520Z INFO niri: IPC listening on: /run/user/1000/niri.wayland-1.2474.sock | ||
| 21 | +niri[2474]: 2025-08-29T04:07:40.700137Z INFO niri: listening on X11 socket: :0 | ||
| 22 | +systemd[2338]: Started niri.service - A scrollable-tiling Wayland compositor. | ||
| 23 | +$ echo $DISPLAY | ||
| 24 | +:0 | ||
| 25 | ``` | 25 | ``` |
| 26 | 26 | ||
| 27 |  | 27 |  |
| 28 | 28 | ||
| 29 | -You can also automatically run it at startup, and set `DISPLAY` by default for all apps by adding it to the [`environment`](./Configuration:-Miscellaneous.md#environment) section of the niri config: | 29 | +We're using xwayland-satellite rather than Xwayland directly because [X11 is very cursed](./FAQ.md#why-doesnt-niri-integrate-xwayland-like-other-compositors). |
| 30 | - | 30 | +xwayland-satellite takes on the bulk of the work dealing with the X11 peculiarities from us, giving niri normal Wayland windows to manage. |
| 31 | -```kdl | ||
| 32 | -spawn-at-startup "xwayland-satellite" | ||
| 33 | -// Or, if you built it by hand: | ||
| 34 | -// spawn-at-startup "~/path/to/code/target/release/xwayland-satellite" | ||
| 35 | 31 | ||
| 36 | -environment { | 32 | +xwayland-satellite works well with most applications: Steam, games, Discord, even more exotic things like Ardour with wine Windows VST plugins. |
| 37 | - DISPLAY ":0" | 33 | +However, X11 apps that want to position windows or bars at specific screen coordinates won't behave correctly and will need a nested compositor to run. |
| 38 | -} | 34 | +See sections below for how to do that. |
| 39 | -``` | ||
| 40 | - | ||
| 41 | -> [!NOTE] | ||
| 42 | -> If the `:0` DISPLAY is already taken (for example, by some other Xwayland server like `xwayland-run`), `xwayland-satellite` will try the next DISPLAY numbers in order: `:1`, `:2`, etc. and tell you which one it used in its output. | ||
| 43 | -> Then, you will need to use that DISPLAY number for the `env` command or for the niri [`environment`](./Configuration:-Miscellaneous.md#environment) section. | ||
| 44 | -> | ||
| 45 | -> You can also force a specific DISPLAY number like so: `xwayland-satellite :12` will start on `DISPLAY=:12`. | ||
| 46 | 35 | ||
| 47 | ## Using the labwc Wayland compositor | 36 | ## Using the labwc Wayland compositor |
| 48 | 37 | ||