You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@guacamole.apache.org by Matti Kaupenjohann <ma...@fh-dortmund.de> on 2022/05/02 13:47:30 UTC

VNC uses weird Keyboard-Layout

Hi,

before upgrading to 1.4.0 and after fixing the ip connection problem in
1.4.0 for our setup, I ran into an issue with a vnc connection. I
initial hoped the upgrade may fix it but it doesn't.

I have a VM installed headless via KVM and virttools on a ubuntu system.
I setted the VM up with graphics using vnc and listen to 0.0.0.0. This
setup made it possible to use tigervnc from any system which is inside
our network. The usage of togervnc workes perfectly fine and also the
german keyboard layout is beeing recognized with no issue. But if I
setup a connection to this system in guacamole the keyboard layout
begins with weird stuff. First I thought oh some vnc translation errors
and the system uses now british/us qwerty. Instead some very weird
layout is used. With [ALT GR] I am possible to achieve a lot of unicode
chars, which normaly are not printed out over the letter keys. I also
tested with the on screen keyboard which is still qwertz with the same
result.

The Workaround I would use for the moment:

  1. Install xrdp
  2. nat the xrdp port to kvm host
  3. create connection

But I am intrigued that it should work since tigervnc did.

Greeting

matti


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@guacamole.apache.org
For additional commands, e-mail: user-help@guacamole.apache.org


Re: VNC uses weird Keyboard-Layout

Posted by Michael Jumper <mj...@apache.org>.
On Mon, May 2, 2022 at 6:47 AM Matti Kaupenjohann <
matti.kaupenjohann@fh-dortmund.de> wrote:

> Hi,
>
> before upgrading to 1.4.0 and after fixing the ip connection problem in
> 1.4.0 for our setup, I ran into an issue with a vnc connection. I
> initial hoped the upgrade may fix it but it doesn't.
>
> I have a VM installed headless via KVM and virttools on a ubuntu system.
> I setted the VM up with graphics using vnc and listen to 0.0.0.0. This
> setup made it possible to use tigervnc from any system which is inside
> our network. The usage of togervnc workes perfectly fine and also the
> german keyboard layout is beeing recognized with no issue. But if I
> setup a connection to this system in guacamole the keyboard layout
> begins with weird stuff. First I thought oh some vnc translation errors
> and the system uses now british/us qwerty. Instead some very weird
> layout is used. With [ALT GR] I am possible to achieve a lot of unicode
> chars, which normaly are not printed out over the letter keys. I also
> tested with the on screen keyboard which is still qwertz with the same
> result.


This is because KVM cannot implement keyboard in the same way that a normal
VNC server would:

VNC accepts key events in the form of keysyms, which are layout
independent. If you type "z", the VNC server handles it as "z" and
preserves the key's identity, even if the keyboard layouts of local and
remote systems do not match. Guacamole follows this same approach.

KVM, on the other hand, is required by its own nature to transform these
into hardware scancodes to emulate the keyboard connected to the VM. These
scancodes represent key location, not identity, so there will be unexpected
behavior if the OS inside the VM is actually configured to use a different
layout from what KVM expects.

For example, if the VM is configured within KVM to use a US Qwerty layout,
but the OS within the VM is configured to use Qwertz:

1. User types "z" while using Guacamole.
2. Guacamole sends "z" to the Guacamole server.
3. The Guacamole server sends "z" to the VNC server (KVM).
4. KVM translates that "z" to a scancode that's essentially equivalent to
"the second key in the fourth row".
5. The OS within the VM receives the scancode, but handles it as "y"
because that's the key at that location according to the OS' configured
layout.

- Mike