Skip to content

ddxLoad: Check XDG_RUNTIME_DIR before fallback to /tmp/

The XKM_OUTPUT_DIR folder by default is defined as ${datadir}/X11/xkb/compiled and it is usually defined as /var/lib/xkb or %{_localstatedir}/lib/xkb by distributions. If X is executed as non-root it won't have permissions to write into that folder. If we fallback directly to /tmp we might get name collisions:

> Error: Cannot open "/tmp/server-10.xkm" to write keyboard description
> Exiting

Where the file /tmp/server-10.xkm already exists but is owned by another user that previously executed X and had the display number 10. This is specially problematic when exeuting Xvfb.

Before falling back to /tmp/ check first the XDG_RUNTIME_DIR.

Merge request reports

Loading