这是indexloc提供的服务,不要输入任何密码
Skip to content

[BUG] xkbcomp warnings on startup due to incorrect default config path #923

@5m2wse50

Description

@5m2wse50

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions