[Bug]: vncserver broken since update to xkeyboard-config/x11 2.45
Problem description
Since the recent update to xkeyboard-config, vncserver fails. See below.
vncserver :5 Could not start Xvnc.
Xvnc TigerVNC 1.15.0 - built Mar 4 2025 13:49:08 Copyright (C) 1999-2025 TigerVNC team and many others (see README.rst) See https://www.tigervnc.org for information on TigerVNC. Underlying X server release 12101016
Built without GBM support Failed to initialize DRI3 extension Sync Extension 3.1
Mon Jun 9 14:54:53 2025 vncext: VNC extension running! vncext: Listening for VNC connections on all interface(s), port 5905 vncext: Created VNC server for screen 0 XKB: Failed to compile keymap Keyboard initialization failed. This could be a missing or incorrect setup of xkeyboard-config. (EE) Fatal server error: (EE) Failed to activate virtual core keyboard: 2(EE)
What steps will reproduce the bug?
vncserver :5
What is the expected behavior?
vncserver should start on port 5.
System information
Termux Variables:
TERMUX_API_VERSION=0.52.0
TERMUX_APK_RELEASE=F_DROID
TERMUX_APP_PACKAGE_MANAGER=apt
TERMUX_APP_PID=11153
TERMUX_APP__DATA_DIR=/data/user/0/com.termux
TERMUX_APP__LEGACY_DATA_DIR=/data/data/com.termux
TERMUX_APP__SE_FILE_CONTEXT=u:object_r:app_data_file:s0:c246,c256,c512,c768
TERMUX_APP__SE_INFO=default:targetSdkVersion=28:complete
TERMUX_IS_DEBUGGABLE_BUILD=0
TERMUX_MAIN_PACKAGE_FORMAT=debian
TERMUX_VERSION=0.118.3
TERMUX__HOME=/data/data/com.termux/files/home
TERMUX__PREFIX=/data/data/com.termux/files/usr
TERMUX__ROOTFS_DIR=/data/data/com.termux/files
TERMUX__SE_PROCESS_CONTEXT=u:r:untrusted_app_27:s0:c246,c256,c512,c768
TERMUX__USER_ID=0
Packages CPU architecture:
aarch64
Subscribed repositories:
# sources.list
deb https://mirrors.bfsu.edu.cn/termux/apt/termux-main stable main
# root-repo (sources.list.d/root.list)
deb https://mirrors.bfsu.edu.cn/termux/apt/termux-root root stable
# x11-repo (sources.list.d/x11.list)
deb https://mirrors.bfsu.edu.cn/termux/apt/termux-x11 x11 main
Updatable packages:
All packages up to date
termux-tools version:
1.45.0
Android version:
11
Kernel build information:
Linux localhost 4.9.227-perf+ #1 SMP PREEMPT Fri Nov 26 00:14:01 CST 2021 aarch64 Android
Device manufacturer:
OnePlus
Device model:
ONEPLUS A6003
Supported ABIs:
SUPPORTED_ABIS: arm64-v8a,armeabi-v7a,armeabi
SUPPORTED_32_BIT_ABIS: armeabi-v7a,armeabi
SUPPORTED_64_BIT_ABIS: arm64-v8a
LD Variables:
LD_LIBRARY_PATH=
LD_PRELOAD=/data/data/com.termux/files/usr/lib/libtermux-exec-ld-preload.so
Installed termux plugins:
com.termux.api versionCode:1001
com.termux.boot versionCode:1000
com.termux.styling versionCode:1000
com.termux.widget versionCode:12
com.termux.window versionCode:15
Reverting to xkeyboard-config 2.44 fixes the issue.
If you have updated to xkeyboard-config 2.45, the proper workaround will be as following.
rm -rf $PREFIX/share/X11/xkb
ln -s $PREFIX/share/xkeyboard-config-2 $PREFIX/share/X11/xkb
The symlink was not created properly after the update. Looking into it...
Yes, workround successful, thanks.
can confirm this bug exists, and the workaround by @Biswa96 works. but one has to make sure, that to use the paths as exactly as they wrote in the comment. not using $PREFIX, and using logical syntax of ../usr/ in the commands, leads to the ln -s command not work properly. so use $PREFIX if not used before.
Why would anyone chose to not use the $PREFIX I ask myself?
Why would anyone chose to not use the $PREFIX I ask myself?
The relative path version (../usr) assumes that the command is being run from the ~ ($HOME) directory.
That is not necessarily going to be the case, so using an absolute path via $PREFIX (/data/data/com.termux/files/usr by default) solves that issue.
Why would anyone chose to not use the $PREFIX I ask myself?
The relative path version (
../usr) assumes that the command is being run from the~($HOME) directory. That is not necessarily going to be the case, so using an absolute path via$PREFIXwhtwhy(/data/data/com.termux/files/usrby default) solves that issue.
Exactly, proving my point, why would anyone choose to not use the $PREFIX method?
linux newbie with 7+ years of experience of using termux, here. thought this ../usr/ method is an alternative/shortcut for typing the entire path. this is the first time of having such error, in the last 7 1/2 years. my bad guys.
This Issue Is Also Noticed By Rolling-Distros Like Linux From Scratch, Gentoo, Etc. Since Only Those Were The Ones Who Used The Newer Version Of xkeyboard-config And Were Affected By It.
Check Out The Issue Created At xkeyboard-config Source Repo :- https://gitlab.freedesktop.org/xkeyboard-config/xkeyboard-config/-/issues/531
And, Issues And Commit Fixes On LFS And Gentoo Repos :-
- https://www.linuxfromscratch.org/blfs/view/svn/x/xkeyboard-config.html
- https://packages.gentoo.org/packages/x11-misc/xkeyboard-config/changelog
- https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=61165c54af803d45d05e611bc95cfa1149352872
- https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=cea0e7e9372804723ecee46c4bb0c145c1128063
- https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d4239fb331007a732aa1bf77b8dfdf8c9030e525
The OP Also Mentioned This At Another Issue In Source Repo :- https://gitlab.freedesktop.org/xkeyboard-config/xkeyboard-config/-/issues/529#note_2951447
Hi, xkeyboard-config maintainer here. Our build system changes for 2.45 are documented in the release notes.
i think i found where the problem begins with.
in https://github.com/termux/termux-packages/actions/runs/15518278574/job/43688077371#step:7:1178 and onwards, the components are being installed at path $PREFIX/usr/share/xkeyboard-config-2 instead of $PREFIX/usr/share/X11/xkb, despite xkb-base set to the later one.
maybe it's not what i think is the issue, but it seems like one. i may be wrong, idk.
edit: i was wrong.
in https://github.com/termux/termux-packages/actions/runs/15518278574/job/43688077371#step:7:1575, the symlink being created, then it should have worked.
the problem is in meson build system. despite calling for creating symlink, it didn't. check out the comments on the package's source repo issue 531. i mentioned above. they also found out about the issue with meson build system.
Hi, xkeyboard-config maintainer here. Our build system changes for 2.45 are documented in the release notes.
Please check https://gitlab.freedesktop.org/xkeyboard-config/xkeyboard-config/-/issues/532 posted by someone
despite
xkb-baseset to the later one.maybe it's not what i think is the issue, but it seems like one. i may be wrong, idk.
@atikattar1104 I just checked, and it seems this setting is an autotools settings that never worked; I track this issue upstream.
confirm the issue!
and. missunderstanding how to solve it?
i need it. cause i have some vital deploys on termux!
and. missunderstanding how to solve it?
use this workaround by @Biswa96
rm -rf $PREFIX/share/X11/xkb
ln -s $PREFIX/share/xkeyboard-config-2 $PREFIX/share/X11/xkb
hope this helps 👍.
when launching nh kex, i get an error message as: vncserver: No matching VNC server running for this user then nh sho the server port (5901) and pocess then, shut down: [Process completed (signal 9) - press Enter] In that case, when i launch Kali, it fall down after some seconds if i haven't immediately an ECONNREFUSED message: failed to connect to localhost/127.0.0.1 (port 5901) IoBridge.java:187 PlainSocketImpl.java:142 AbstractPlainSocketImpl.java.390 ... etc
despite
xkb-baseset to the later one. maybe it's not what i think is the issue, but it seems like one. i may be wrong, idk.@atikattar1104 I just checked, and it seems this setting is an autotools settings that never worked; I track this issue upstream.
Upstream issue closed after removing that setting, so I guess this issue needs to be solved some other way.