termux-packages icon indicating copy to clipboard operation
termux-packages copied to clipboard

[Bug]: vncserver broken since update to xkeyboard-config/x11 2.45

Open macerg opened this issue 6 months ago • 15 comments

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

macerg avatar Jun 09 '25 14:06 macerg

Reverting to xkeyboard-config 2.44 fixes the issue.

macerg avatar Jun 09 '25 14:06 macerg

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...

Biswa96 avatar Jun 09 '25 14:06 Biswa96

Yes, workround successful, thanks.

macerg avatar Jun 09 '25 14:06 macerg

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.

atikattar1104 avatar Jun 09 '25 21:06 atikattar1104

Why would anyone chose to not use the $PREFIX I ask myself?

macerg avatar Jun 10 '25 06:06 macerg

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.

TomJo2000 avatar Jun 10 '25 08:06 TomJo2000

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/usr by default) solves that issue.

Exactly, proving my point, why would anyone choose to not use the $PREFIX method?

macerg avatar Jun 10 '25 08:06 macerg

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.

atikattar1104 avatar Jun 10 '25 13:06 atikattar1104

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 :-

  1. https://www.linuxfromscratch.org/blfs/view/svn/x/xkeyboard-config.html
  2. https://packages.gentoo.org/packages/x11-misc/xkeyboard-config/changelog
  3. https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=61165c54af803d45d05e611bc95cfa1149352872
  4. https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=cea0e7e9372804723ecee46c4bb0c145c1128063
  5. https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d4239fb331007a732aa1bf77b8dfdf8c9030e525

atikattar1104 avatar Jun 10 '25 14:06 atikattar1104

The OP Also Mentioned This At Another Issue In Source Repo :- https://gitlab.freedesktop.org/xkeyboard-config/xkeyboard-config/-/issues/529#note_2951447

atikattar1104 avatar Jun 10 '25 14:06 atikattar1104

Hi, xkeyboard-config maintainer here. Our build system changes for 2.45 are documented in the release notes.

wismill avatar Jun 11 '25 09:06 wismill

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.

atikattar1104 avatar Jun 11 '25 09:06 atikattar1104

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.

atikattar1104 avatar Jun 11 '25 09:06 atikattar1104

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

truboxl avatar Jun 11 '25 09:06 truboxl

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.

@atikattar1104 I just checked, and it seems this setting is an autotools settings that never worked; I track this issue upstream.

wismill avatar Jun 11 '25 09:06 wismill

confirm the issue!

Image

and. missunderstanding how to solve it?

i need it. cause i have some vital deploys on termux!

mrgab0 avatar Jul 15 '25 01:07 mrgab0

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 👍.

atikattar1104 avatar Jul 22 '25 09:07 atikattar1104

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

Paype67210 avatar Aug 22 '25 09:08 Paype67210

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.

@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.

45mg avatar Nov 20 '25 04:11 45mg