<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><meta http-equiv=Content-Type content="text/html; charset=utf-8"><meta name=Generator content="Microsoft Word 15 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
        {font-family:Helvetica;
        panose-1:0 0 0 0 0 0 0 0 0 0;}
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:"Times New Roman \(Body CS\)";
        panose-1:2 11 6 4 2 2 2 2 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
span.EmailStyle18
        {mso-style-type:personal-reply;
        font-family:Helvetica;
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
--></style></head><body lang=EN-US link=blue vlink=purple style='word-wrap:break-word'><div class=WordSection1><p class=MsoNormal><span style='font-family:Helvetica'>In both the current and patched versions of X2GoClient, changing the X11 keyboard map on the client side seems to have no immediate impact on an active X2Go session. If a session is suspended, though, the session’s keyboard map does get updated when it’s resumed by either version.<o:p></o:p></span></p><p class=MsoNormal><span style='font-family:Helvetica'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-family:Helvetica'>I believe this is the case because the client only constructs a keyboard map during the first keyboard update in ONMainWindow::slotSetModMap. This map is held in memory and reused by subsequent keyboard updates until it is deleted during a session suspension or termination.<o:p></o:p></span></p><p class=MsoNormal><span style='font-family:Helvetica'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-family:Helvetica'>(It’s worth noting that macOS uses an entirely-separate mechanism for managing the keyboard layout for non-X11 programs. Changing the keyboard layout in System Preferences affects the Qt components of X2GoClient, but anything X11-based is not affected by those changes. Only the X11 keyboard map as reported by xmodmap is used by local X11 apps and by X2GoClient’s keyboard map builder.)<o:p></o:p></span></p><p class=MsoNormal><span style='font-family:Helvetica'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-family:Helvetica'>Tom</span><span style='font-family:Helvetica'><o:p></o:p></span></p><p class=MsoNormal><span style='font-family:Helvetica'><o:p> </o:p></span></p><div style='border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in'><p class=MsoNormal><b><span style='font-size:12.0pt;color:black'>From: </span></b><span style='font-size:12.0pt;color:black'>Ulrich Sibiller <ulrich.sibiller@gmail.com><br><b>Reply-To: </b>"uli42@gmx.de" <uli42@gmx.de><br><b>Date: </b>Tuesday, November 3, 2020 at 1:30 AM<br><b>To: </b>Tom Yearke <tyearke@buffalo.edu>, "1502@bugs.x2go.org" <1502@bugs.x2go.org><br><b>Cc: </b>"submit@bugs.x2go.org" <submit@bugs.x2go.org><br><b>Subject: </b>Re: [X2Go-Dev] Bug#1502: macOS X2GoClient keyboard map updates crash specific server applications, spike server CPU usage<o:p></o:p></span></p></div><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal>Thanks for the patch. Keyboard on MacOS is special. As I do not have/know MacOS I don't know why it was implemented that way.  <o:p></o:p></p><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal>What happens if you change the MacOS keyboard while a session is running?<o:p></o:p></p></div><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal>Uli<o:p></o:p></p></div></div><p class=MsoNormal><o:p> </o:p></p><div><div><p class=MsoNormal>Yearke, Thomas <<a href="mailto:tyearke@buffalo.edu" target="_blank">tyearke@buffalo.edu</a>> schrieb am Di., 3. Nov. 2020, 01:45:<o:p></o:p></p></div><blockquote style='border:none;border-left:solid #CCCCCC 1.0pt;padding:0in 0in 0in 6.0pt;margin-left:4.8pt;margin-right:0in'><p class=MsoNormal>Package: x2goclient<br>Version: 4.1.2.2<br>Tag: patch<br><br>When the macOS version of X2GoClient is connected to a server, it updates the session's keyboard map every 10 seconds. Depending on how other programs running on the server respond to keyboard map changes, the repeated updates can cause brief CPU usage spikes or (in the case of one of our applications) they can cause freezes and crashes.<br><br>The attached patch modifies the macOS client to only run the keyboard map update once on session startup. Testing done on my devices showed that this change resolved the issue without introducing noticeable side effects. However, I was not able to find the reason why the keyboard map is being updated regularly, so this may (re)introduce a problem I'm not aware of.<br><br>Client OS: macOS 10.14.6<br>Client Software: X2GoClient 4.1.2.2<br>Server OS: CentOS 7.8<br>Server Desktop Environment: XFCE 4<br>Server x2goserver Version: 4.1.0.3<br>Server x2goserver-xsession Version: 4.1.0.3<br>Server nxagent Version: 3.5.99.24<br><br>Thank you for your consideration!<br><br>Tom Yearke<br>Software Engineer<br>Science and Engineering Node Services<br>University at Buffalo<br><br><br>_______________________________________________<br>x2go-dev mailing list<br><a href="mailto:x2go-dev@lists.x2go.org" target="_blank">x2go-dev@lists.x2go.org</a><br><a href="https://lists.x2go.org/listinfo/x2go-dev" target="_blank">https://lists.x2go.org/listinfo/x2go-dev</a><o:p></o:p></p></blockquote></div></div></body></html>