Unable to start TurboVNC

553 views
Skip to first unread message

Andrew Udvare

unread,
Feb 23, 2021, 11:04:03 PM2/23/21
to TurboVNC User Discussion/Support
Hello, I am getting a 'Keyboard initialization failed' error. Not sure what to try next. I have an xorg.conf generated by Nvidia's UI.

$ vncserver :1
WARNING: The first attempt to start Xvnc failed, possibly because the vncserver script was not able to figure out an appropriate X11 font path for this system or because the font path you specified with the -fp argument was not valid.
Attempting to restart Xvnc using the X Font Server (xfs) ...
Could not start Xvnc.

TurboVNC Server (Xvnc) 64-bit v2.2.5 (build 20210223)
Copyright (C) 1999-2020 The VirtualGL Project and many others (see README.txt)
Visit http://www.TurboVNC.org for more information on TurboVNC

23/02/2021 23:00:10 Using security configuration file /etc/turbovncserver-security.conf
23/02/2021 23:00:10 Enabled security type 'tlsvnc'
23/02/2021 23:00:10 Enabled security type 'tlsotp'
23/02/2021 23:00:10 Enabled security type 'tlsplain'
23/02/2021 23:00:10 Enabled security type 'x509vnc'
23/02/2021 23:00:10 Enabled security type 'x509otp'
23/02/2021 23:00:10 Enabled security type 'x509plain'
23/02/2021 23:00:10 Enabled security type 'vnc'
23/02/2021 23:00:10 Enabled security type 'otp'
23/02/2021 23:00:10 Enabled security type 'unixlogin'
23/02/2021 23:00:10 Enabled security type 'plain'
23/02/2021 23:00:10 Desktop name 'TurboVNC: limelight:1 (tatsh)' (limelight:1)
23/02/2021 23:00:10 Protocol versions supported: 3.3, 3.7, 3.8, 3.7t, 3.8t
23/02/2021 23:00:10 Listening for VNC connections on TCP port 5901
23/02/2021 23:00:10   Interface 0.0.0.0
23/02/2021 23:00:10 Framebuffer: BGRX 8/8/8/8
23/02/2021 23:00:10 New desktop size: 1920 x 1080
23/02/2021 23:00:10 New screen layout:
23/02/2021 23:00:10   0x00000040 (output 0x00000040): 1920x1080+0+0
23/02/2021 23:00:10 Maximum clipboard transfer size: 1048576 bytes
23/02/2021 23:00:10 VNC extension running!
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)
TurboVNC Server (Xvnc) 64-bit v2.2.5 (build 20210223)
Copyright (C) 1999-2020 The VirtualGL Project and many others (see README.txt)
Visit http://www.TurboVNC.org for more information on TurboVNC

23/02/2021 23:00:11 Using security configuration file /etc/turbovncserver-security.conf
23/02/2021 23:00:11 Enabled security type 'tlsvnc'
23/02/2021 23:00:11 Enabled security type 'tlsotp'
23/02/2021 23:00:11 Enabled security type 'tlsplain'
23/02/2021 23:00:11 Enabled security type 'x509vnc'
23/02/2021 23:00:11 Enabled security type 'x509otp'
23/02/2021 23:00:11 Enabled security type 'x509plain'
23/02/2021 23:00:11 Enabled security type 'vnc'
23/02/2021 23:00:11 Enabled security type 'otp'
23/02/2021 23:00:11 Enabled security type 'unixlogin'
23/02/2021 23:00:11 Enabled security type 'plain'
23/02/2021 23:00:11 Desktop name 'TurboVNC: limelight:1 (tatsh)' (limelight:1)
23/02/2021 23:00:11 Protocol versions supported: 3.3, 3.7, 3.8, 3.7t, 3.8t
23/02/2021 23:00:11 Listening for VNC connections on TCP port 5901
23/02/2021 23:00:11   Interface 0.0.0.0
23/02/2021 23:00:11 Framebuffer: BGRX 8/8/8/8
23/02/2021 23:00:11 New desktop size: 1920 x 1080
23/02/2021 23:00:11 New screen layout:
23/02/2021 23:00:11   0x00000040 (output 0x00000040): 1920x1080+0+0
23/02/2021 23:00:11 Maximum clipboard transfer size: 1048576 bytes
23/02/2021 23:00:11 VNC extension running!
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)

DRC

unread,
Feb 24, 2021, 3:17:23 PM2/24/21
to turbovn...@googlegroups.com

Note that TurboVNC does not in any way use xorg.conf.

This error is usually the result of a missing operating system package, but I can't tell you which package unless you specify the operating system you are using.

DRC

Andrew Udvare

unread,
Feb 24, 2021, 3:46:59 PM2/24/21
to turbovn...@googlegroups.com
I am on Gentoo.

From what I can tell it's failing due to XkbCompileKeymap() or XkbCompileKeymapFromString() returning NULL.

https://github.com/TurboVNC/turbovnc/blob/e6af315bd655432a6f120e7b983d1c73fdec65d2/unix/Xvnc/programs/Xserver/xkb/xkbInit.c#L564

These are the 'xkb' packages I do not have installed:

* x11-apps/xkbevd
Available versions: 1.1.4
Homepage: https://www.x.org/wiki/ https://gitlab.freedesktop.org/xorg/app/xkbevd
Description: XKB event daemon

* x11-apps/xkbprint
Available versions: 1.0.5
Homepage: https://www.x.org/wiki/ https://gitlab.freedesktop.org/xorg/app/xkbprint
Description: Print an XKB keyboard description

* x11-apps/xkbutils
Available versions: 1.0.4
Homepage: https://www.x.org/wiki/ https://gitlab.freedesktop.org/xorg/app/xkbutils
Description: X.Org xkbutils application

* x11-misc/qxkb
Available versions: (~)0.5.1_pre20190821
Homepage: https://github.com/disels/qxkb
Description: Qt-based keyboard layout switcher

* x11-misc/xkbd
Available versions: 0.8.16-r1 (~)0.8.18 **999999*l {debug +evdev +xft +xi +xpm +xrandr +xscreensaver}
Homepage: https://github.com/mahatma-kaganovich/xkbd
Description: onscreen soft keyboard for X11

* x11-misc/xkblayout-state
Available versions: (~)0_p20180118 **9999*l
Homepage: https://github.com/nonpop/xkblayout-state
Description: A small program to get/set the current XKB layout

* x11-misc/xkbset
Available versions: (~)0.5_p5_p1 (~)0.5_p6 (~)0.5_p7_p1 {tk}
Homepage: https://faculty.missouri.edu/~stephen/software/#xkbset
Description: User preference utility for XKB extensions for X

* x11-misc/xxkb
Available versions: 1.11.1 (~)1.11.1-r1 {svg}
Homepage: https://sourceforge.net/projects/xxkb/
Description: eXtended XKB - assign different keymaps to different windows

And the ones I do have installed:

[I] x11-apps/setxkbmap
Available versions: 1.3.2
Installed versions: 1.3.2(01:14:00 11/06/20)
Homepage: https://www.x.org/wiki/ https://gitlab.freedesktop.org/xorg/app/setxkbmap
Description: Controls the keyboard layout of a running X server

[I] x11-apps/xkbcomp
Available versions: 1.4.4
Installed versions: 1.4.4(21:03:57 05/11/20)
Homepage: https://www.x.org/wiki/ https://gitlab.freedesktop.org/xorg/app/xkbcomp
Description: XKB keyboard description compiler

[I] x11-libs/libxkbcommon
Available versions: 1.0.3^t {X doc static-libs test ABI_MIPS="n32 n64 o32" ABI_S390="32 64" ABI_X86="32 64 x32"}
Installed versions: 1.0.3^t(19:31:18 21/02/21)(X -doc -static-libs -test ABI_MIPS="-n32 -n64 -o32" ABI_S390="-32 -64" ABI_X86="32 64 -x32")
Homepage: https://xkbcommon.org/ https://github.com/xkbcommon/libxkbcommon/
Description: keymap handling library for toolkits and window systems

[I] x11-libs/libxkbfile
Available versions: 1.1.0 {ABI_MIPS="n32 n64 o32" ABI_S390="32 64" ABI_X86="32 64 x32"}
Installed versions: 1.1.0(01:00:46 16/01/21)(ABI_MIPS="-n32 -n64 -o32" ABI_S390="-32 -64" ABI_X86="64 -32 -x32")
Homepage: https://www.x.org/wiki/ https://gitlab.freedesktop.org/xorg/lib/libxkbfile
Description: X.Org xkbfile library


--
Andrew Udvare
> --
> You received this message because you are subscribed to a topic in the Google Groups "TurboVNC User Discussion/Support" group.
> To unsubscribe from this topic, visit https://groups.google.com/d/topic/turbovnc-users/42GLfRY5m6g/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to turbovnc-user...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/turbovnc-users/a42801f7-3ff5-6698-0a7c-6b5c63f33019%40virtualgl.org.

DRC

unread,
Feb 25, 2021, 8:08:34 PM2/25/21
to turbovn...@googlegroups.com
The most likely cause is an incorrect or missing XKB path. The
vncserver script checks for the XKB directory under the usual Linux and
FreeBSD locations. If the directory is somewhere else on Gentoo, then
the vncserver script will have to be modified to check that location as
well (but you can temporarily work around the problem by passing
'-xkbdir {location}' to vncserver.) If the directory is missing, then
it is likely provided by one of the packages you haven't installed. On
CentOS, it's in the 'xkeyboard-config' package, for instance.

Andrew Udvare

unread,
Feb 25, 2021, 11:33:02 PM2/25/21
to turbovn...@googlegroups.com
In the vncserver script, I had to add /usr/bin as a search path for xkbcomp.

Then I did: cp /usr/share/X11/xkb/rules/base /usr/share/X11/xkb/rules/xorg

This file 'xorg' does not exist on my machine for whatever reason. Not sure if there's a package that would provide this.

--
Andrew Udvare
> --
> You received this message because you are subscribed to a topic in the Google Groups "TurboVNC User Discussion/Support" group.
> To unsubscribe from this topic, visit https://groups.google.com/d/topic/turbovnc-users/42GLfRY5m6g/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to turbovnc-user...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/turbovnc-users/a1943fbb-21f4-0aa0-db38-3d713002c61f%40virtualgl.org.

DRC

unread,
Feb 26, 2021, 1:26:02 PM2/26/21
to turbovn...@googlegroups.com
On 2/25/21 10:32 PM, Andrew Udvare wrote:
In the vncserver script, I had to add /usr/bin as a search path for xkbcomp.

That shouldn't be necessary unless /usr/bin is not in the PATH, which would be very unusual.  Regardless, you don't have to modify vncserver.  Just pass -xkbcompdir /usr/bin to /opt/TurboVNC/bin/vncserver when starting a TurboVNC session.  You could also rebuild the TurboVNC Server with the XKB_BIN_DIRECTORY CMake variable explicitly set to /usr/bin.  (The default value of XKB_BIN_DIRECTORY is empty, which requires xkbcomp to be in the PATH unless vncserver finds it in one of the directories it searches.)


Then I did: cp /usr/share/X11/xkb/rules/base /usr/share/X11/xkb/rules/xorg

This file 'xorg' does not exist on my machine for whatever reason. Not sure if there's a package that would provide this.

On CentOS, xorg is just a symlink to base, so this seems like a valid strategy.  You could also rebuild the TurboVNC Server with the XKB_DFLT_RULES CMake variable explicitly set to base.


Andrew Udvare

unread,
Feb 26, 2021, 2:54:36 PM2/26/21
to TurboVNC User Discussion/Support
Thanks for the info. I submitted a PR to the author of the package: https://github.com/ceamac/overlay/pull/2
Reply all
Reply to author
Forward
0 new messages