6

I have installed ubuntu 12.04.1 and x2goclient on it.

when connetc to a x2goserver (ubuntu 12.04.1) the arrow keys didnt work properly

e.g: down key works like Enter

Did anyone have this problem, too?

4

The problem was keyboard layout.

that was null , I changed it to English(US) , now it is working correctly.

3
  • 2
    I had the same problem. How did you change it? I have to set "setxkbmap de nodeadkeys" on every login and it does not work for rdb sessions. Do you have a better solution? May 23 '14 at 9:55
  • 1. in the "session preference" in the "setting" tab " check the "Keep current keyboard Setting" 2.set a layout , default layout is (null) add a new layout and delete the (null)
    – esxzawq
    May 29 '14 at 7:17
  • @esxzawq, your comment is unclear, can you please be so kind to update your answer with more details ? Mar 8 '20 at 12:18
3

I would like to explain what happened:

On your local X11 your keyboard's keycodes are:

  • 111 for (up arrow key)
  • 104 for ENTER on keypad

But over x2go, the very same keys produce different keycodes!

  • 104 for (up arrow key)

I have no idea why the implementation of x2go does this (instead of forwarding the keycode as is!), but that it how it is. This does not happen with all keycodes/keys.

So when you instruct x2go to do nothing about the XKB setup, the assignments keycode -> keysym is effectively the same and keycode 104 has still the same result: keypad's ENTER.

The interesting thing is: there is a schema behind this mapping! The x2go side seems to use the keycodes written down in the "old" XKBROOT/keycodes/xfree86 file, while a "modern" Linux desktop has the keycodes comming from evdev who's keycodes is written down in the file XKBROOT/keycodes/evdev.

Result: you always have to load a new XKB configuration in x2go. Let the x2go client initiate that itself or load your own, but keep in mind to use the xfree86 rules (or directly the keycodes from xfree86 (same name)).

3
  • So +1, man! Although this wasn't my problem, your solution pointed me in the very right direction - I used x2go with non-bundled vcxsrv and had some keys randomly mismatched. After copying xkbdata from bundled vcxsrv to the external one I used, works like a charm!
    – ogurets
    Feb 12 '19 at 3:39
  • So, how should I fix the bug? Mar 8 '20 at 12:15
  • 1
    @SteveYakovenko I disabled the keycode translation (by clearing _XKB_RULES_NAMES), did a local dump of the XKB configuration and loaded that very configuration on the client side of x2go. See my long bug report for tools and command lines to do that. bugs.x2go.org/cgi-bin/bugreport.cgi?bug=674 Mar 9 '20 at 5:04
2

Run on the server:

setxkbmap us -print | xkbcomp - $DISPLAY

It dumps the us english keyboard mapping table, and reinitializes your X with it.

5
  • @JosephKern It isn't a question, it is an answer.
    – peterh
    Jun 28 '15 at 12:37
  • Clicked on the wrong bit. Thanks for updating your answer with an explanation. Jun 28 '15 at 17:21
  • This worked connecting from a ubuntu mate 16.04 x2goclient to a x2go session running on ubuntu server 16.04. I ran it in the x2go session, Ie. I was connected to a x2go twm desktop session, opened xterm in that session and ran the above. Lots of warnings, but it fixed the issue.
    – Mead
    Jul 7 '16 at 1:38
  • I see warnings, but it doesn't fix the bug. Mar 8 '20 at 12:14
  • I use dvorak on both sides. Half the time the keys are scrambled, and sometimes you can't toggle between dvorak/us using the keyboard shortcut. After over a year of fighting this, a work around: setxkbmap dvorak -print | xkbcomp - $DISPLAY
    – poleguy
    Jul 21 at 14:55
1

I had a similar issue: keys had a random effect in the remote session. Then I realized that on the client computer (a mac) I had another keyboard layout activated than the usual one. After setting it back to the usual (on the mac), typing worked again in the remote session.

0

In my case I was using Archlinux and x2goserver requires xorg-setxkbmap and xorg-xkbcomp packages to be installed on server side though x2goserver package itself does not list these packages as dependencies. It can not apply keyboard settings without them. You can install them in Archlinux with:

sudo pacman -S xorg-setxkbmap xorg-xkbcomp

I submitted bug report.

0

What worked for me, was setting the keyboard layout in the x2go-client settings to something else and then back again.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.