From unknown Fri Mar 29 00:08:06 2024 X-Loop: owner@bugs.x2go.org Subject: Bug#978: change set-kbd option default to 1 on mac osx clients Reply-To: joerg@hydrops.han.de, 978@bugs.x2go.org Resent-From: joerg@hydrops.han.de Resent-To: x2go-dev@lists.x2go.org Resent-CC: X2Go Developers X-Loop: owner@bugs.x2go.org Resent-Date: Thu, 07 Jan 2016 20:20:02 +0000 Resent-Message-ID: Resent-Sender: owner@bugs.x2go.org X-X2Go-PR-Message: report 978 X-X2Go-PR-Package: x2goclient X-X2Go-PR-Keywords: Received: via spool by submit@bugs.x2go.org id=B.14521978442914 (code B); Thu, 07 Jan 2016 20:20:02 +0000 Received: (at submit) by bugs.x2go.org; 7 Jan 2016 20:17:24 +0000 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on ymir.das-netzwerkteam.de X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50 autolearn=ham version=3.3.2 Received: from haldir.han.de (haldir.han.de [5.35.241.151]) by ymir.das-netzwerkteam.de (Postfix) with ESMTPS id 2F78D5DB11 for ; Thu, 7 Jan 2016 21:17:22 +0100 (CET) Received: by haldir.han.de (Postfix, from userid 10) id D78B917E0027; Thu, 7 Jan 2016 21:17:21 +0100 (CET) Received: from test.hidden.han.de by hydrops.han.de with smtp (Linux Smail3.1.29.1 #24) id m1aHGyc-0009PEC; Thu, 7 Jan 2016 21:16 MET Received: (qmail 3896 invoked by uid 500); 7 Jan 2016 20:16:06 -0000 Resent-From: joerg@hydrops.han.de Resent-Date: Thu, 7 Jan 2016 21:16:06 +0100 Resent-Message-ID: <20160107201606.GA3822@hydrops.han.de> Resent-To: submit@bugs.x2go.org Date: Thu, 7 Jan 2016 20:46:45 +0100 From: joerg@hydrops.han.de To: submit@bugs.x2go.org Message-ID: <20160107194644.GA3188@hydrops.han.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.23 (2014-03-12) Package: x2goclient Version: 4.0.5.0 This bug affects mac clients only. Systems: OSX 10.6.8 + XQuartz 2.7.5 from macports OSX 10.10.5 + XQuartz 2.7.5 from macports Hi, Problem: The keyboard works fine in x2goclient session (if xmodmap is found at hardcoded path "/opt/X11/bin/xmodmap")(see Bugs #487 and #977) only using virtualbox gives a completely garbled keyboard. Explanation for the virtualbox part: virtualbox on a linux host has to find a mapping from X11 keycodes to scancodes that are to be sent to the guest system. It uses three methods to guess this mapping: "byXKB", "byType" and "byLayout". All three methods look at the keycode to keyname mapping of X11, if method "byXKB" gives a result that matches one of several known keyboard layouts, this result is used. Failing this, the results of the other two methods are checked. This works quite well for - linux local access - native X11 remote access from linux client systems - x2goclient access from windows clients - x2goclient access from linux clients but it does not work for x2goclient access from mac clients, because the x2goserver provides bogus keynames for the XkbGetKeyboard() call. This could be fixed using the x2goclient command line parameter --set-kbd=1 because then x2goserver uses some other way to set up XKB key mappings. This method results in virtualbox getting a good keyname to keycode mapping with XkbGetKeyboard(). I have not seen any problems with other X11 clients using the --set-kbd=1 parameter. Unfortunately the parameter value for "--set-kbd" is silently overridden for max osx client in onmainwindow.cpp to 0 . I spent some hours of testing and looking at the source code of virtualbox, x2goserver, the nx part of x2goserver and at last found this code in onmainwindow.cpp: #ifdef Q_OS_DARWIN usekbd=0; type="query"; #endif in two places. I changed it to "usekbd=1" and virtualbox found a perfect keycode to scancode mapping. As I did not find any problems using this setting, I suggest to use usekbd=1; type="query"; as default for x2goclient on OSX. Joerg