Subject: Incorrect keyboard keys when connecting to local desktop session

From: Bryan Roessler <[email-masked]>
Date: Fri, 2 Nov 2018 12:13:21 -0400

Package: x2goserver
Version: 4.1.0.1

Client: Fedora 29
X2GoClient: 4.1.2.1

Server: Fedora 29
x2goserver: 4.1.0.1
x2goserver-common: 4.1.0.1
x2goserver-xsession: 4.1.0.1
nxagent: 3.5.99.16
DE: MATE 1.20.3

$>cat
/home/bryan/.x2go/C-bryan-50-1541170484_stS1XSHADbryanXSHADPP0_dp24/session.log
running as X2Go Agent

NXAGENT - Version 3.5.99.16

Copyright (c) 2001, 2011 NoMachine (http://www.nomachine.com)
Copyright (c) 2008-2014 Oleksandr Shneyder <[email-masked]>
Copyright (c) 2011-2016 Mike Gabriel <[email-masked]>
Copyright (c) 2014-2016 Ulrich Sibiller <[email-masked]>
Copyright (c) 2014-2016 Mihai Moldovan <[email-masked]>
Copyright (c) 2015-2016 Qindel Group (http://www.qindel.com)
See https://github.com/ArcticaProject/nx-libs for more information.

Info: Agent running with pid '5912'.
Session: Starting session at 'Fri Nov  2 09:54:46 2018'.
Info: Proxy running in client mode with pid '5912'.
Info: Using errors file
'/tmp/.x2go-bryan/C-bryan-50-1541170484_stS1XSHADbryanXSHADPP0_dp24/session.log'.
Info: Using stats file
'/tmp/.x2go-bryan/C-bryan-50-1541170484_stS1XSHADbryanXSHADPP0_dp24/C-bryan-50-1541170484_stS1XSHADbryanXSHADPP0_dp24/stats'.
Loop: WARNING! Unrecognized session type 'unix-kde-depth_24'. Assuming
agent session.
Warning: Unrecognized session type 'unix-kde-depth_24'. Assuming agent
session.
Info: Waiting for connection from 'localhost' on socket 'tcp:*:39826'.
Info: Accepted connection from '127.0.0.1'.
Info: Connection with remote proxy completed.
Info: Using WAN link parameters 1408/24/1/0.
Info: Using agent parameters 5000/5/50/0/0.
Info: Using cache parameters 4/4096KB/8192KB/8192KB.
Info: Using pack method '16m-jpeg-9' with session 'unix-kde-depth_24'.
Info: Using ZLIB data compression 1/1/32.
Info: Using ZLIB stream compression 1/1.
Info: No suitable cache file found.
Info: Listening to X11 connections on display ':50'.
Info: Established X client connection.
Info: Using shared memory parameters 1/1/0/0K.
Info: Using alpha channel in render extension.
Info: Not using local device configuration changes.
Warning: Cannot read keystroke file
'/home/bryan/.x2go/config/keystrokes.cfg'.
Info: using keystrokes file '/etc/x2go/keystrokes.cfg'
Info: ignoring unknown keystroke action 'debug_tree'.
Info: ignoring unknown keystroke action 'regions_on_screen'.
Info: ignoring unknown keystroke action 'test_input'.
Info: ignoring unknown keystroke action 'deactivate_input_devices_grab'.
Current known keystrokes:
  close_session         Ctrl+Alt+t
  switch_all_screens    Ctrl+Alt+f
  minimize              Ctrl+Alt+m
  resize                Ctrl+Alt+r
  defer                 Ctrl+Alt+e
  ignore                Ctrl+Alt+BackSpace
  force_synchronization Ctrl+Alt+j
  fullscreen            Ctrl+Shift+Alt+f
  viewport_move_left    Ctrl+Shift+Alt+Left
  viewport_move_up      Ctrl+Alt+Up
  viewport_move_right   Ctrl+Alt+Right
  viewport_move_down    Ctrl+Alt+Down
Info: keyboard file created:
'/home/bryan/.x2go/C-bryan-50-1541170484_stS1XSHADbryanXSHADPP0_dp24/keyboard'
Info: Keycode conversion auto-determined as on
Poller::shmInit: WARNING! Couldn't set uid for shm segment.
Session: Session started at 'Fri Nov  2 09:54:47 2018'.
Info: Screen [0] resized to geometry [1024x768] fullscreen [0].

$>cat
/home/bryan/.x2go/C-bryan-50-1541170484_stS1XSHADbryanXSHADPP0_dp24/keyboard
rules="evdev"
model="pc105"
layout="us"
variant=","
options=","

$>cat
/home/bryan/.x2go/C-bryan-50-1541170484_stS1XSHADbryanXSHADPP0_dp24/clients
error opening security policy file /usr/lib64/xserver/SecurityPolicy

$>cat
/home/bryan/.x2go/C-bryan-50-1541170484_stS1XSHADbryanXSHADPP0_dp24/options
nx/nx,link=wan,pack=16m-jpeg-9,limit=0,root=/tmp/.x2go-bryan/C-bryan-50-1541170484_stS1XSHADbryanXSHADPP0_dp24,cache=8M,images=32M,type=unix-kde-depth_24,id=bryan-50-1541170484_stS1XSHADbryanXSHADPP0_dp24,cookie=dbb08a1c05aab892d20bb46ef9e2a696,errors=/tmp/.x2go-bryan/C-bryan-50-1541170484_stS1XSHADbryanXSHADPP0_dp24/session.log,kbtype=null/null,geometry=1024x768+0+0,xinerama=0,resize=1,fullscreen=0,accept=localhost,listen=39826,clipboard=both,client=linux,menu=0,state=/tmp/.x2go-bryan/C-bryan-50-1541170484_stS1XSHADbryanXSHADPP0_dp24/state:50

$>setxkbmap -print
xkb_keymap {
    xkb_keycodes  { include "evdev+aliases(qwerty)"    };
    xkb_types     { include "complete"    };
    xkb_compat    { include "complete"    };
    xkb_symbols   { include "pc+us+inet(evdev)"    };
    xkb_geometry  { include "pc(pc105)"    };
};

Recently, when connecting to my local MATE desktop session some of the keys
are incorrectly mapped (e.g., the Del key triggers a screenshot) and some
(such as the up arrow) do not work at all. I have also lost the ability to
do bidirectional clipboard syncing.

I have tried configuring X2GoClient to automatically detect my keyboard
settings and also specifying them manually with no effect. I have tried
manually resetting the keyboard config on the server by piping the
setxkbmap output to xkbcomp.

This issue started about 6 months ago.

Thank you,
Bryan