-
-
Notifications
You must be signed in to change notification settings - Fork 442
Description
Symptom:
Startup of termux-x11 produces a series of xkbcomp warnings:
'''
The XKEYBOARD keymap compiler (xkbcomp) reports:
Warning: Could not resolve keysym XF86OK
...
Errors from xkbcomp are not fatal to the X server
'''
Root Cause:
The application appears to be compiled with DFLT_XKB_CONFIG_ROOT set to /. This was identified in the source code file app/src/main/cpp/recipes/xkbcomp.cmake:
target_compile_options(xkbcomp PRIVATE ... "-DDFLT_XKB_CONFIG_ROOT=\\"/\\"" ...)
This hardcoded default path prevents the embedded xkbcomp from locating the keymap files at their correct location (/data/data/com.termux/files/usr/share/X11/xkb).
Solution:
A system-level fix is to modify the launch script at /data/data/com.termux/files/usr/bin/termux-x11 to set the correct environment variable before the application executes.
Adding the following line to the top of the script resolves all warnings:
export XKB_CONFIG_ROOT=/data/data/com.termux/files/usr/share/X11/xkb
Modified Script:
sh
#!/data/data/com.termux/files/usr/bin/sh
export XKB_CONFIG_ROOT=/data/data/com.termux/files/usr/share/X11/xkb
[ -z "${LD_LIBRARY_PATH+x}" ] || export XSTARTUP_LD_LIBRARY_PATH="$LD_LIBRARY_PATH"
[ -z "${LD_PRELOAD+x}" ] || export XSTARTUP_LD_PRELOAD="$LD_PRELOAD"
# ... (rest of script)
This provides a system-wide solution without requiring user-specific configuration changes.