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?

6 Answers 6


The problem was keyboard layout.

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

  • 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? Commented May 23, 2014 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
    Commented May 29, 2014 at 7:17
  • @esxzawq, your comment is unclear, can you please be so kind to update your answer with more details ? Commented Mar 8, 2020 at 12:18

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)).

  • 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
    Commented Feb 12, 2019 at 3:39
  • So, how should I fix the bug? Commented Mar 8, 2020 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 Commented Mar 9, 2020 at 5:04

Run on the server:

setxkbmap us -print | xkbcomp - $DISPLAY

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

  • @JosephKern It isn't a question, it is an answer.
    – peterh
    Commented Jun 28, 2015 at 12:37
  • Clicked on the wrong bit. Thanks for updating your answer with an explanation. Commented Jun 28, 2015 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
    Commented Jul 7, 2016 at 1:38
  • I see warnings, but it doesn't fix the bug. Commented Mar 8, 2020 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
    Commented Jul 21, 2021 at 14:55

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.


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.


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

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .