Skip to content

appimage: Point libxkbcommon at the host's keyboard data when /usr/share/X11/xkb is missing (#2437) - #2438

Merged
zackees merged 2 commits into
masterfrom
appimage/2437-xkb-root
Oct 26, 2026
Merged

zackees merged 2 commits into
masterfrom
appimage/2437-xkb-root

Conversation

@zackees

@zackees zackees commented Oct 26, 2026

Copy link
Copy Markdown
Member

Fixes #2437

Change

AppRun exports XKB_CONFIG_ROOT only when the user hasn't set it and /usr/share/X11/xkb (the bundled libxkbcommon's compiled default) doesn't exist. It uses the first of /etc/X11/xkb (NixOS, from services.xserver.xkb) and /run/current-system/sw/share/X11/xkb that exists. On every other distro, nothing changes.

Tests

  • build-aux/appimage/test-apprun-driver-env.sh now also checks the XKB_CONFIG_ROOT the running obs process sees, in each case:
    • nixos / none: unset when the default exists, else the first existing fallback;
    • user: a preset value reaches obs unchanged.
  • test-appimage.sh already runs this check (--check) against the real packaged OBS on each distro container, so it covers the packaged AppImage too.
  • RED (4e771d2f0), run on a NixOS 26.05 host (no /usr/share/X11/xkb, /etc/X11/xkb present):
    FAIL [nixos] XKB_CONFIG_ROOT: expected set:/etc/X11/xkb, obs has unset
    FAIL [none] XKB_CONFIG_ROOT: expected set:/etc/X11/xkb, obs has unset
    PASS [user] XKB_CONFIG_ROOT: set:/user/selected/XKB_CONFIG_ROOT
    
  • GREEN: all three pass on the same host, before and after rebasing onto build-aux: AppRun adds the NixOS driver libraries to nix-ld's path (#891) #2436.

Not done: a real start of the packaged AppImage on a Wayland compositor with no /usr/share/X11/xkb, which is the issue's suggested packaged check. The existing test checks what the loader sees, not a full Qt Wayland start.

…are/X11/xkb is missing (GREEN, #2437)

NixOS keeps the keyboard data at /etc/X11/xkb and sets no XKB_CONFIG_ROOT.
The bundled libxkbcommon only searched its compiled default, so Qt's Wayland
plugin got no xkb context and crashed at start. AppRun now exports the first
of /etc/X11/xkb and /run/current-system/sw/share/X11/xkb that exists, unless
the user set XKB_CONFIG_ROOT or the default exists.
@zackees
zackees enabled auto-merge October 26, 2026 02:54
@zackees
zackees added this pull request to the merge queue Oct 26, 2026
Merged via the queue into master with commit 6eeb47d Oct 26, 2026
31 checks passed
rdoupe pushed a commit to rdoupe/obs-studio that referenced this pull request Oct 26, 2026
obs-rust#2439's (obs-rust#2441)

obs-rust#2438 and obs-rust#2439 fixed obs-rust#2437 independently and merged a minute apart. Master
had two XKB_CONFIG_ROOT blocks in AppRun, two features ledger lines, and two
checks in test-apprun-driver-env.sh. The user case preset the variable twice
with different values, so one check always failed:
  FAIL [user] XKB_CONFIG_ROOT: expected set:/user/selected/XKB_CONFIG_ROOT,
  obs has set:/user/selected/xkb
This reverts obs-rust#2438 (6eeb47d). obs-rust#2439's code, check and ledger line stay.
@zackees
zackees deleted the appimage/2437-xkb-root branch October 26, 2026 15:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

appimage: crashes at start on NixOS Wayland: bundled libxkbcommon finds no keyboard data (/usr/share/X11/xkb)

1 participant