You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@guacamole.apache.org by Hogne Vevle <hv...@webhuset.no> on 2017/01/10 20:08:26 UTC

Keyboard mapping with Ubuntu 16 and CentOS 7

Hi all,

We are having some strange issues when connecting to machines running Ubuntu 16 and CentOS 7 via VNC, where the keyboard mappings will not work properly. 

The problem exists both for physical keyboard input and when using the on-screen keyboard. Our physical keyboards have Norwegian layouts, and the on-screen keyboard has the en-US layout. I have not been able to test using an English layout physical keyboard.

Examples from a Mac (Norwegian keyboard <http://img.gfx.no/958/958819/MacBook_Air_tastatur.jpg>):
- ‘ (top left, above the tab key) becomes ‘æ'.
- ‘<' (bottom left, besides Shift) becomes ‘,’ 
- ‘-‘ (bottom right, below return key) becomes ‘+'
- ‘+’ (top right, below F10 and F11) becomes ‘\’

Examples from the on-screen keyboard (en-US):
- ‘=‘ (below F10) becomes ‘\’
- ‘\’ (below Backspace) becomes ‘
- ‘[‘ becomes ‘å’
- ‘]’ does not work (nothing happens)
- ‘;’ becomes ‘ø' 
 - ‘`’ (above Tab) becomes ‘|' (pipe)

I can produce examples from a Windows computer tomorrow, if needed. 

For other operating systems (e.g. Windows, Debian, CentOS 6 and older, and older Ubuntu's) everything works as intended. 

Can anyone else reproduce this, or could it be some misconfiguration of the machines we are connecting to? (All machines we connect to are VM's, so there is a possibility that the cause could be with the VM template we are using, if some misconfiguration on the target could cause such an issue). 

Kind regards
Hogne Vevle

Re: Keyboard mapping with Ubuntu 16 and CentOS 7

Posted by Hogne Vevle <hv...@webhuset.no>.
Thanks a lot, Frode and Mike!

All connections are made towards XenServer, which provides a VNC endpoint for all its VM's. Could seem like a bug in XenServer then. This one seems very relevant: https://bugs.xenserver.org/browse/XSO-650 <https://bugs.xenserver.org/browse/XSO-650> . 

I’ll do some tests with newer versions of XenServer (all VM’s I’ve currently tested were on XS 6.5). Hopefully that will provide a solution, and give us yet another incentive for pushing forward our migrations to XS 7 :)

Thanks again! 

Cheers,
Hogne


> 20. jan. 2017 kl. 20.10 skrev Frode Langelo <fr...@apache.org>:
> 
> As Mike says; QEMU needs to know which keyboard layout is to be used for non-US keyboards. Try running with -k no for Norwegian layout.
> 
> There is some more info here:
> http://wiki.qemu.org/download/qemu-doc.html#sec_005finvocation <http://wiki.qemu.org/download/qemu-doc.html#sec_005finvocation>
> 
> Frode
> 
> On Fri, Jan 20, 2017 at 11:05 AM, Mike Jumper <mike.jumper@guac-dev.org <ma...@guac-dev.org>> wrote:
> On Fri, Jan 20, 2017 at 10:56 AM, Hogne Vevle <hv@webhuset.no <ma...@webhuset.no>> wrote:
> Hi again, all!
> 
> I’m following up on this with some guacd logs:
> 
> Jan 20 19:46:21 vps-vnc-proxy guacd[14279]: Protocol "vnc" selected
> Jan 20 19:46:21 vps-vnc-proxy guacd[14279]: Connection ID is "$62f15d6f-da12-45d5-990b-84d57e2c3946"
> Jan 20 19:46:21 vps-vnc-proxy guacd[14279]: VNC server supports protocol version 3.8 (viewer 3.8)
> Jan 20 19:46:21 vps-vnc-proxy guacd[14279]: We have 1 security types to read
> Jan 20 19:46:21 vps-vnc-proxy guacd[14279]: 0) Received security type 1
> Jan 20 19:46:21 vps-vnc-proxy guacd[14279]: Selecting security type 1 (0/1 in the list)
> Jan 20 19:46:21 vps-vnc-proxy guacd[14279]: Selected Security Scheme 1
> Jan 20 19:46:21 vps-vnc-proxy guacd[14279]: No authentication needed
> Jan 20 19:46:21 vps-vnc-proxy guacd[14279]: VNC authentication succeeded
> Jan 20 19:46:21 vps-vnc-proxy guacd[14279]: Desktop name "QEMU"
> 
> If you're connecting to QEMU's built-in VNC server, this may be why the keyboard mapping is not working correctly.
> 
> Both Guacamole and VNC use X11 keysyms to represent key events. These keysyms are independent of keyboard layout, and represent the actual identity of the key pressed. Because QEMU needs to emulate the hardware of the keyboard, it will internally need to translate those keysyms back into scancodes, thus removing the identity of the key pressed. The information reaching the OS running beneath QEMU describes nothing more than the location of the key on the keyboard, and the OS will re-interpret that according to the keyboard layout it's configured to use.
> 
> There is likely a way to inform QEMU of the keyboard layout of the guest OS, allowing that mapping process to work correctly, but you will still be limited by the keys defined by the layout of the guest OS. You won't be able to type characters which are not present in that keyboard layout.
> 
> If you instead run a native VNC server within the guest OS itself, there won't be that intervening keysym -> scancode layer, and things should work as expected.
> 
> - Mike
> 
> 


Re: Keyboard mapping with Ubuntu 16 and CentOS 7

Posted by Frode Langelo <fr...@apache.org>.
As Mike says; QEMU needs to know which keyboard layout is to be used for
non-US keyboards. Try running with *-k no *for Norwegian layout.

There is some more info here:
http://wiki.qemu.org/download/qemu-doc.html#sec_005finvocation

Frode

On Fri, Jan 20, 2017 at 11:05 AM, Mike Jumper <mi...@guac-dev.org>
wrote:

> On Fri, Jan 20, 2017 at 10:56 AM, Hogne Vevle <hv...@webhuset.no> wrote:
>
>> Hi again, all!
>>
>> I’m following up on this with some guacd logs:
>>
>> Jan 20 19:46:21 vps-vnc-proxy guacd[14279]: Protocol "vnc" selected
>> Jan 20 19:46:21 vps-vnc-proxy guacd[14279]: Connection ID is
>> "$62f15d6f-da12-45d5-990b-84d57e2c3946"
>> Jan 20 19:46:21 vps-vnc-proxy guacd[14279]: VNC server supports protocol
>> version 3.8 (viewer 3.8)
>> Jan 20 19:46:21 vps-vnc-proxy guacd[14279]: We have 1 security types to
>> read
>> Jan 20 19:46:21 vps-vnc-proxy guacd[14279]: 0) Received security type 1
>> Jan 20 19:46:21 vps-vnc-proxy guacd[14279]: Selecting security type 1
>> (0/1 in the list)
>> Jan 20 19:46:21 vps-vnc-proxy guacd[14279]: Selected Security Scheme 1
>> Jan 20 19:46:21 vps-vnc-proxy guacd[14279]: No authentication needed
>> Jan 20 19:46:21 vps-vnc-proxy guacd[14279]: VNC authentication succeeded
>> Jan 20 19:46:21 vps-vnc-proxy guacd[14279]: Desktop name "QEMU"
>>
>
> If you're connecting to QEMU's built-in VNC server, this may be why the
> keyboard mapping is not working correctly.
>
> Both Guacamole and VNC use X11 keysyms to represent key events. These
> keysyms are independent of keyboard layout, and represent the actual
> identity of the key pressed. Because QEMU needs to emulate the hardware of
> the keyboard, it will internally need to translate those keysyms back into
> scancodes, thus removing the identity of the key pressed. The information
> reaching the OS running beneath QEMU describes nothing more than the
> location of the key on the keyboard, and the OS will re-interpret that
> according to the keyboard layout it's configured to use.
>
> There is likely a way to inform QEMU of the keyboard layout of the guest
> OS, allowing that mapping process to work correctly, but you will still be
> limited by the keys defined by the layout of the guest OS. You won't be
> able to type characters which are not present in that keyboard layout.
>
> If you instead run a native VNC server within the guest OS itself, there
> won't be that intervening keysym -> scancode layer, and things should work
> as expected.
>
> - Mike
>
>

Re: Keyboard mapping with Ubuntu 16 and CentOS 7

Posted by Mike Jumper <mi...@guac-dev.org>.
On Fri, Jan 20, 2017 at 10:56 AM, Hogne Vevle <hv...@webhuset.no> wrote:

> Hi again, all!
>
> I’m following up on this with some guacd logs:
>
> Jan 20 19:46:21 vps-vnc-proxy guacd[14279]: Protocol "vnc" selected
> Jan 20 19:46:21 vps-vnc-proxy guacd[14279]: Connection ID is
> "$62f15d6f-da12-45d5-990b-84d57e2c3946"
> Jan 20 19:46:21 vps-vnc-proxy guacd[14279]: VNC server supports protocol
> version 3.8 (viewer 3.8)
> Jan 20 19:46:21 vps-vnc-proxy guacd[14279]: We have 1 security types to
> read
> Jan 20 19:46:21 vps-vnc-proxy guacd[14279]: 0) Received security type 1
> Jan 20 19:46:21 vps-vnc-proxy guacd[14279]: Selecting security type 1 (0/1
> in the list)
> Jan 20 19:46:21 vps-vnc-proxy guacd[14279]: Selected Security Scheme 1
> Jan 20 19:46:21 vps-vnc-proxy guacd[14279]: No authentication needed
> Jan 20 19:46:21 vps-vnc-proxy guacd[14279]: VNC authentication succeeded
> Jan 20 19:46:21 vps-vnc-proxy guacd[14279]: Desktop name "QEMU"
>

If you're connecting to QEMU's built-in VNC server, this may be why the
keyboard mapping is not working correctly.

Both Guacamole and VNC use X11 keysyms to represent key events. These
keysyms are independent of keyboard layout, and represent the actual
identity of the key pressed. Because QEMU needs to emulate the hardware of
the keyboard, it will internally need to translate those keysyms back into
scancodes, thus removing the identity of the key pressed. The information
reaching the OS running beneath QEMU describes nothing more than the
location of the key on the keyboard, and the OS will re-interpret that
according to the keyboard layout it's configured to use.

There is likely a way to inform QEMU of the keyboard layout of the guest
OS, allowing that mapping process to work correctly, but you will still be
limited by the keys defined by the layout of the guest OS. You won't be
able to type characters which are not present in that keyboard layout.

If you instead run a native VNC server within the guest OS itself, there
won't be that intervening keysym -> scancode layer, and things should work
as expected.

- Mike

Re: Keyboard mapping with Ubuntu 16 and CentOS 7

Posted by Hogne Vevle <hv...@webhuset.no>.
Hi again, all!

I’m following up on this with some guacd logs:

Jan 20 19:46:21 vps-vnc-proxy guacd[14279]: Protocol "vnc" selected
Jan 20 19:46:21 vps-vnc-proxy guacd[14279]: Connection ID is "$62f15d6f-da12-45d5-990b-84d57e2c3946"
Jan 20 19:46:21 vps-vnc-proxy guacd[14279]: VNC server supports protocol version 3.8 (viewer 3.8)
Jan 20 19:46:21 vps-vnc-proxy guacd[14279]: We have 1 security types to read
Jan 20 19:46:21 vps-vnc-proxy guacd[14279]: 0) Received security type 1
Jan 20 19:46:21 vps-vnc-proxy guacd[14279]: Selecting security type 1 (0/1 in the list)
Jan 20 19:46:21 vps-vnc-proxy guacd[14279]: Selected Security Scheme 1
Jan 20 19:46:21 vps-vnc-proxy guacd[14279]: No authentication needed
Jan 20 19:46:21 vps-vnc-proxy guacd[14279]: VNC authentication succeeded
Jan 20 19:46:21 vps-vnc-proxy guacd[14279]: Desktop name "QEMU"
Jan 20 19:46:21 vps-vnc-proxy guacd[14279]: Connected to VNC server, using protocol version 3.8
Jan 20 19:46:21 vps-vnc-proxy guacd[14279]: VNC server default format:
Jan 20 19:46:21 vps-vnc-proxy guacd[14279]:   32 bits per pixel.
Jan 20 19:46:21 vps-vnc-proxy guacd[14279]:   Least significant byte first in each pixel.
Jan 20 19:46:21 vps-vnc-proxy guacd[14279]:   TRUE colour: max red 255 green 255 blue 255, shift red 16 green 8 blue 0
Jan 20 19:46:21 vps-vnc-proxy guacd[14279]: Starting client

I’m not immediately seeing anything relevant. I’ve set log_level = debug in /etc/guacamole/guacd.conf under [daemon].

Anything else I should check, either on the Guacamole server or the connection target?

Could anyone please report their experiences with Ubuntu 16.04 / CentOS 7 connections over VNC - is it working as expected for you?

Any input would be greatly appreciated :)

Kind regards
Hogne 

> 10. jan. 2017 kl. 21.08 skrev Hogne Vevle <hv...@webhuset.no>:
> 
> Hi all,
> 
> We are having some strange issues when connecting to machines running Ubuntu 16 and CentOS 7 via VNC, where the keyboard mappings will not work properly. 
> 
> The problem exists both for physical keyboard input and when using the on-screen keyboard. Our physical keyboards have Norwegian layouts, and the on-screen keyboard has the en-US layout. I have not been able to test using an English layout physical keyboard.
> 
> Examples from a Mac (Norwegian keyboard <http://img.gfx.no/958/958819/MacBook_Air_tastatur.jpg>):
> - ‘ (top left, above the tab key) becomes ‘æ'.
> - ‘<' (bottom left, besides Shift) becomes ‘,’ 
> - ‘-‘ (bottom right, below return key) becomes ‘+'
> - ‘+’ (top right, below F10 and F11) becomes ‘\’
> 
> Examples from the on-screen keyboard (en-US):
> - ‘=‘ (below F10) becomes ‘\’
> - ‘\’ (below Backspace) becomes ‘
> - ‘[‘ becomes ‘å’
> - ‘]’ does not work (nothing happens)
> - ‘;’ becomes ‘ø' 
>  - ‘`’ (above Tab) becomes ‘|' (pipe)
> 
> I can produce examples from a Windows computer tomorrow, if needed. 
> 
> For other operating systems (e.g. Windows, Debian, CentOS 6 and older, and older Ubuntu's) everything works as intended. 
> 
> Can anyone else reproduce this, or could it be some misconfiguration of the machines we are connecting to? (All machines we connect to are VM's, so there is a possibility that the cause could be with the VM template we are using, if some misconfiguration on the target could cause such an issue). 
> 
> Kind regards
> Hogne Vevle