I have a problem with nomachine NX-client in Ubuntu. It seems that the keymapping has a problem. For example, the arrow keys do not work (except for up key which opens printscreen!). I searched online and found several solutions. However none of them worked for me:

solution 1)

On the server, change System->Preferences->Keyboard->Layouts to “Evdev-managed keyboard”

The server that I log into has Centos 5.7 on it and I cannot find “Evdev-managed keyboard” layout in keyboard setting. I tried several other generic keyboard layouts with no success.

solution 2)

add the following lines to /etc/X11/xorg.conf:

Section "ServerFlags"
Option "AutoAddDevices" "false"

I did it and my keyboard stopped working completely! I had to use the on-screen keyboard to remove this setting and get back to normal.

solution 3)

Run xmodmap -pke > localxmodmap locally

Copy the file to server as .Xmodmap

Run xmodmap ~/.Xmodmap from terminal.

which gives me a bunch of errors such as:

xmodmap:  /home/fzc23/.Xmodmap:60:  bad keysym name 'XF86Switch_VT_1' in keysym list

and doesn't work.

I do not know what else to do. I would appreciate if somebody could help me out.

BTW, the NX-client on windows connects to the same server with no keymapping problem so I believe this is a problem in Ubuntu and has nothing to do with the server side.


I had the same problem under Gentoo. I can't promise that this will work on a CentOS 5 server, but this worked for me on a Gentoo server.

Inside your nx session, open a terminal window and run:

setxkbmap -model evdev -layout us

Replacing "us" with your desired layout if it isn't the US layout. Your keymap should be correct now. If you start your nx session using an .xsession/.xinitrc style script, you can add the setxkbmap command to the startup script.

  • NX broke for me on both Windows and Linux clients after installing newer versions of xorg with evdev keyboard drivers, but this command fixes it whenever I log on or resume a session. – Andrew Mao Oct 9 '12 at 22:34

I solved the problem by going to PreferencesKeyboard Shortcuts and selecting DesktopTake a screenshot.

Keyboard Shortcuts

The setting there showed (seemingly correct) Print. However, I removed it by clicking the entry and then hitting backspace, changings it to Disabled. After that my cursor up key worked 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.