Subject: Mac x2goclient keyboard map scrambled for 'connect to local desktop', non-US keyboard

From: Theo Markettos <[email-masked]>
Date: Wed, 29 Jun 2016 12:31:02 +0100

Package: x2goclient
Version: 4.0.5.1

Client: Mac OS X 10.9.5, x2goclient 4.0.5.1 (Qt - 4.8.7), XQuartz 2.7.9,
Macbook Pro 15", keyboard layout British - PC

Server: Ubuntu 14.04, amd64 kernel 3.13.0-87-generic, XFCE 4.10.1, packages:
ii  x2goagent                                             2:3.5.0.33-0~677~ubuntu14.04.1
ii  x2goclient                                            4.0.5.2-0~1197~ubuntu14.04.1
ii  x2goserver                                            4.1.0.0-0~1317~ubuntu14.04.1
ii  x2goserver-common                                     4.1.0.0-0~1317~ubuntu14.04.1
ii  x2goserver-extensions                                 4.1.0.0-0~1317~ubuntu14.04.1
ii  x2goserver-xsession                                   4.1.0.0-0~1317~ubuntu14.04.1

If I 'connect to local desktop' to an existing XFCE session, that has XFCE
set to use the
English - English (UK, extended WinKeys)
keyboard layout, I get junk keyboard mappings for punctuation mostly when
shift is pressed.  eg

< generates Z
> generates X
{ generates &
key labelled " generates the 1/8 symbol (it should generate @ on the British PC map)
key labelled \ generates the pound symbol (should generate #)
; generates @
: generates an omega symbol
Both the key to the left of '1' and the left of Z generate U+00AC NOT SIGN
There is no way to generate ~

Letter and number keys seem fine.

If I connect to a 'Terminal' session rather than a local desktop the
keyboard layout works fine.

It looks like I have xmodmap in place on Mac:

user-109-43:~ atm26$ ls -l /usr/X11/bin/xmodmap
-rwxr-xr-x  1 root  wheel  97888 May  5 09:32 /usr/X11/bin/xmodmap
user-109-43:~ atm26$ ls -l /opt/X11/bin/xmodmap
-rwxr-xr-x  1 root  wheel  97888 May  5 09:32 /opt/X11/bin/xmodmap
user-109-43:~ atm26$ ls -l /opt/local/bin/xmodmap
lrwxr-xr-x  1 root  admin  20 Jun  2  2015 /opt/local/bin/xmodmap -> /usr/X11/bin/xmodmap
user-109-43:~ atm26$ md5 /usr/X11/bin/xmodmap
MD5 (/usr/X11/bin/xmodmap) = da41f91233eceefaa673680adc6ff924
user-109-43:~ atm26$ md5 /opt/X11/bin/xmodmap
MD5 (/opt/X11/bin/xmodmap) = da41f91233eceefaa673680adc6ff924

XQuartz' 'Follow system keyboard layout' box was ticked, but seems to make
no difference ticked or unticked if I flip local keyboard layouts.  (Do I
have to restart my session for this to take effect?)

If I change the server end to use a US keyboard layout and restart the
display manager the keys are mapped correctly, but it's annoying to use it
locally with a US map on a hardware UK keyboard.  I can't seem to change
layout without restarting the DM, otherwise I could workaround by flipping
it to US for the duration of my x2go session.

Any ideas?

Thanks
Theo