How to do XWayland on Nixos

i am currently trying to use steam on wayland, but dont find any good method for using x11 applications on wayland. does someone know a good way for doing this?

some info:

  • niri wm (wayland)
  • nixos 24.11 with flakes & home-manager

Already tried this?

programs.xwayland.enable = true;

is this for home-manager or system configuration?

system configuration!

now i get this

There’s a page on xwayland in the niri wiki that gives you some options, since niri doesn’t have xwayland support out of the box.
I’m using the xwayland-satellite option, which is basically starting xwayland-satellite (which you can get from nixpkgs) and setting the DISPLAY env variable mentioned in the wiki. Should hopefully work with no real issues :slight_smile:

1 Like

could you share your config?

Sorry, but I don’t use Niri, I just thought it was an easy fix.

1 Like

the niri wiki just describes how to use xwayland-satellite. just add that to your config, then run it and then run your app.

for example when I want to run yourX11App I do this in two terminal windows

$ xwayland-satellite
$ env DISPLAY=:0 yourX11App

there may be edge cases but this works as a quick way without having to suck up resources.

2 Likes

Also on niri and I tried these steps but I’m still getting the same error dialog as in @noofel.rouge’s screenshot above. I’m getting the following:

❯ env DISPLAY=:0 steam
steam.sh[80548]: Running Steam on nixos 25.05 64-bit
steam.sh[80548]: STEAM_RUNTIME is enabled automatically
setup.sh[80604]: Steam runtime environment up-to-date!
steam.sh[80548]: Log already open
steam.sh[80548]: Steam client's requirements are satisfied
CProcessEnvironmentManager is ready, 6 preallocated environment variables.
[2025-11-19 11:42:18] Startup - updater built Nov 19 2025 05:42:09
[2025-11-19 11:42:18] Startup - Steam Client launched with: '/home/skainswo/.local/share/Steam/ubuntu12_32/steam' '-srt-logger-opened'
11/19 11:42:18 minidumps folder is set to /tmp/dumps
11/19 11:42:18 Init: Installing breakpad exception handler for appid(steam)/version(1763531587)/tid(80646)
Looks like steam didn't shutdown cleanly, scheduling immediate update check
CProcessEnvironmentManager is ready, 6 preallocated environment variables.
[2025-11-19 11:42:18] Process started with command-line: '/home/skainswo/.local/share/Steam/ubuntu12_32/steam' '-child-update-ui' '-child-update-ui-socket' '8' '-srt-logger-opened'
11/19 11:42:18 minidumps folder is set to /tmp/dumps
[2025-11-19 11:42:18] Using update UI: xwin
11/19 11:42:18 Init: Installing breakpad exception handler for appid(steam)/version(0)/tid(80647)
[2025-11-19 11:42:18] Create window
CBaseLinuxUpdateUI::BaseCreateWindow: XOpenDisplay failed
Error: Check your DISPLAY environment variable and make sure that you have enabled X.
If you are running remotely, make sure that you have a remote connection which will allow an X connection.

For more information visit https://support.steampowered.com/kb_article.php?ref=4050-WOJB-0608
Using host zenity for message
[2025-11-19 11:42:19] Loading cached metrics from disk (/home/skainswo/.local/share/Steam/package/steam_client_metrics.bin)
[2025-11-19 11:42:19] Failed to load cached hosts file (File 'update_hosts_cached.vdf' not found), using defaults
[2025-11-19 11:42:19] Using the following download hosts for Public, Realm steamglobal
[2025-11-19 11:42:19] 1. https://client-update.steamstatic.com, /, Realm 'steamglobal', weight was 1, source = 'baked in'
[2025-11-19 11:42:19] Checking for update on startup
[2025-11-19 11:42:19] Set percent complete: 0
[2025-11-19 11:42:19] Checking for available updates...
[2025-11-19 11:42:19] Set status message: Checking for available updates...
[2025-11-19 11:42:19] Downloading manifest: https://client-update.steamstatic.com/steam_client_ubuntu12
[2025-11-19 11:42:19] Set percent complete: -1
[2025-11-19 11:42:19] Manifest download: send request
[2025-11-19 11:42:19] Manifest download: waiting for download to finish
[2025-11-19 11:42:19] Manifest download: finished
[2025-11-19 11:42:19] Download skipped: /steam_client_ubuntu12 version 1763531587, installed version 1763531587, existing pending version 0
[2025-11-19 11:42:19] Nothing to do
[2025-11-19 11:42:19] Verifying installation...
[2025-11-19 11:42:19] Set percent complete: -1
[2025-11-19 11:42:19] Verifying all executable checksums
[2025-11-19 11:42:19] Set status message: Verifying installation...
[2025-11-19 11:42:20] Verification complete
UpdateUI: skip show logo
[2025-11-19 11:42:20] Destroy window
[2025-11-19 11:42:20] Shutdown

Steam logging initialized: directory: /home/skainswo/.local/share/Steam/logs

crash_20251119114220_4.dmp[80668]: Uploading dump (out-of-process)
/tmp/dumps/crash_20251119114220_4.dmp
/home/skainswo/.local/share/Steam/steam.sh: line 928: 80646 Segmentation fault      (core dumped) "$STEAMROOT/$STEAMEXEPATH" "$@"

~ took 2s
❯ crash_20251119114220_4.dmp[80668]: Finished uploading minidump (out-of-process): success = yes
crash_20251119114220_4.dmp[80668]: response: CrashID=bp-40ae8d4e-c76b-49f7-96da-3cd582251119

~ took 2s
❯

and

~
❯ nix-shell -p xwayland-satellite --run xwayland-satellite
this path will be fetched (1.40 MiB download, 6.29 MiB unpacked):
  /nix/store/mz0jcqd5b567r78h1274xd3i562ssk9r-xwayland-satellite-0.7
copying path '/nix/store/mz0jcqd5b567r78h1274xd3i562ssk9r-xwayland-satellite-0.7' from 'https://cache.nixos.org'...
 2025-11-19T16:40:21.849Z INFO  xwayland_satellite > Starting xwayland-satellite version 0.7.0
 2025-11-19T16:40:22.024Z INFO  xwayland_process   > The XKEYBOARD keymap compiler (xkbcomp) reports:
 2025-11-19T16:40:22.024Z INFO  xwayland_process   > > Warning:          Could not resolve keysym XF86RefreshRateToggle
 2025-11-19T16:40:22.024Z INFO  xwayland_process   > > Warning:          Could not resolve keysym XF86Accessibility
 2025-11-19T16:40:22.024Z INFO  xwayland_process   > > Warning:          Could not resolve keysym XF86DoNotDisturb
 2025-11-19T16:40:22.026Z INFO  xwayland_process   > Errors from xkbcomp are not fatal to the X server
 2025-11-19T16:40:22.030Z INFO  xwayland_satellite::xstate > xfixes version: 1.0
 2025-11-19T16:40:22.034Z INFO  xwayland_satellite         > Connected to Xwayland on :0
 2025-11-19T16:40:22.034Z INFO  xwayland_satellite         > Successfully notified systemd of ready state.
 2025-11-19T16:40:22.046Z INFO  xwayland_process           > The XKEYBOARD keymap compiler (xkbcomp) reports:
 2025-11-19T16:40:22.046Z INFO  xwayland_process           > > Warning:          Unsupported maximum keycode 708, clipping.
 2025-11-19T16:40:22.046Z INFO  xwayland_process           > >                   X11 cannot support keycodes above 255.
 2025-11-19T16:40:22.047Z INFO  xwayland_process           > > Warning:          Could not resolve keysym XF86RefreshRateToggle
 2025-11-19T16:40:22.047Z INFO  xwayland_process           > > Warning:          Could not resolve keysym XF86Accessibility
 2025-11-19T16:40:22.047Z INFO  xwayland_process           > > Warning:          Could not resolve keysym XF86DoNotDisturb
 2025-11-19T16:40:22.047Z INFO  xwayland_process           > Errors from xkbcomp are not fatal to the X server

thread 'main' panicked at src/xstate/selection.rs:388:22:
called `Result::unwrap()` on an `Err` value: X(Window(ValueError { response_type: 0, error_code: 3, sequence: 185, bad_value: 10485805, minor_opcode: 0, major_opcode: 18, pad: 1 }), Some("x::ChangeProperty"))
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
 2025-11-19T16:41:30.043Z INFO  xwayland_process           > (EE) failed to read Wayland events: Broken pipe

~ took 1m13s
❯

Anyone have any ideas? It seems like it’s panic-ing in xwayland-satellite?

Ok, the following works for me:

  1. Ensure that you are using niri 25.08 or later:
❯ niri --version
niri 25.08 (Nixpkgs)
  1. Add xwayland-satellite to home.packages to put it in PATH for niri to detect.
  2. Reboot or otherwise restart niri and check that it has detected xwayland-satellite and is listening on an X11 socket:
❯ journalctl --user-unit=niri -b | grep listening
Nov 19 12:04:06 tropical-turnip niri[2139]: 2025-11-19T17:04:06.903672Z  INFO niri: listening on Wayland socket: wayland-1
Nov 19 12:04:06 tropical-turnip niri[2139]: 2025-11-19T17:04:06.903686Z  INFO niri: IPC listening on: /run/user/1000/niri.wayland-1.2139.sock
Nov 19 12:04:06 tropical-turnip niri[2139]: 2025-11-19T17:04:06.924982Z  INFO niri: listening on X11 socket: :0
  1. Launch steam or whatever other program as normal.

Check out Xwayland · YaLTeR/niri Wiki · GitHub for more info.

thats a bug with a bit old xwayland-sattelite version - for me its fixed by updating nixpkgs