[Thinlinc-technical] Keyboard configuration in KDE

Andreas v. Heydwolff listmail at sandpsych.at
Sun Jun 10 20:25:15 CEST 2012

Hello Peter,

thank you for the reply.

On 2012-06-05 10:01, Peter Åstrand wrote:

> Hi! In general, it is not necessary to change the keyboard layout in the
> ThinLinc session. We are using the VNC protocol which is "layoutless"
> and can in principle support all layouts at the same time. You need to
> configure the correct keyboard layout on the client side though.

This does work nicely in my KDE 4.8

> Unfortunately, in practice there are a few problems:
> * Some legacy applications does not adhere to the X11 protocol
> specification, and tries to interpret the physical "keycode", in a
> layout dependent way. This is why we have the -KeyboardMap compatibility
> option, for simulating a physical keyboard. However, at this time, only
> a few compatibility maps are defined: Swedish ("sv"), US English ("en"),
> Brazilian ABNT2 ("pt-br") and Turkish ("tr").

Ok. With the "strings" command applied to your Xvnc binary I saw that
these four languages are hard coded into the binary. So this must be the
reason why various attempts at using -KeyboardMap=de yielded no result

> VirtualBox is such an application (see
> https://www.virtualbox.org/ticket/2595).

Indeed. No matter what configuration I tried, either the virtual Windows
machine had its layout in order (with client side EN keyboard settings
and immutable US Keyboard in KDE but perfectly working keyboards in
WinXP running in VBox

> * There's also something called XKB - X keyboard extension, which
> provides a lot of new functionality, but at a great cost: It is a very
> large and complex protocol. Bugs are common. At this time, we do not
> provide XKB by default. It is possible to enable XKB in ThinLinc by
> adding "+kb" to the /vsmagent/xserver_args parameter, although th/usr/lib/vmware/vnckeymap# ls
de  de-ch  es  fi  fr  fr-be  fr-ch  is  it  jp  nl-be  no  pt  uk  us
is is
> not very well tested.

This works in KDE for me, strangely only in my aged user account on the
server but not in a newly created test account.

> The VirtualBox ticket claims that they have XKB support, so you might
> want to try this out and see if this helps.

However, even in VBox running inside my KDE user account with XKB/+kb
added to the Xvnc configuration AltGr never works, <CTL_L>+<Alt_L>
brings about a German @ character but Shift over the numbers does not
work properly and other AltGr chars neither.

> Wrt the KDE keyboard tools, it is possible that the settings are grayed
> out due to missing XKB support. 

With the +kb option set they were visible but its use yielded variable
success. BTW, would combining +kb and -KeyboardMap=nn make any sense if
I used the right map in -KeyboardMap= ?

Interestingly, VMWare seems to have an option with which one can set the
keyboard the VM receives.

What puzzles me is that while VMWare player installs vnc keymaps under

# ls /usr/lib/vmware/vnckeymap/*
de  de-ch  es  fi  fr  fr-be  fr-ch  is  it  jp  nl-be  no  pt  uk  us

# head /usr/lib/vmware/vnckeymap/us displays
0xff1b = 0x001 # Escape
0x0031 = 0x002 # 1
0x0021 = 0x002 # exclam
0x0032 = 0x003 # 2
0x0040 = 0x003 # at
0x0033 = 0x004 # 3
0x0023 = 0x004 # numbersign
0x0034 = 0x005 # 4
0x0024 = 0x005 # dollar
0x0035 = 0x006 # 5

while in TL displays

# head /opt/thinlinc/share/rdesktop/keymaps/en-us

# generated from XKB map us
include common
map 0x409
exclam 0x02 shift
at 0x03 shift
numbersign 0x04 shift
dollar 0x05 shift
percent 0x06 shift
asciicircum 0x07 shiftthinlinc-technical at lists.cendio.se
ampersand 0x08 shift

So the mapping in TL does not have the 0x0021 type entries of the VMWare
vnc keymaps. Is the first column of their map not necessary in TL's Xvnc?

Bottom line is for me that maybe with VMWare I could run Windows VMs
with proper keyboard mappings in TL, but so far I see no way how I can
use German keyboards in both KDE and VBox VMs, even if I forfeit
switching languages in KDE, not using xkb.

If some debugging of /opt/thinlinc/share/rdesktop/keymaps/de is needed
for making -KeyboardMap=de in a TL Xvnc beta work, I'd gladly volunteer.

Best regards,

More information about the Thinlinc-technical mailing list