Friday, April 30, 2010

tightvnc with gnome messes up the keyboard mapping

Everytime I run our unit tests, I get Java Swing windows flying across my screen making it impossible to work. A friend suggested that if I ran the tests in a vncclient session, the windows will be contained within vncviewers window.

So I installed tightvncserver and client on my Ubuntu 9.10 machine. When I started vncviewer I realized that the keyboard mapping as messed up, making it impossible to type anything sensibly in the vnc session.

Some searching seems to suggest that Gnome is causing this problem. This page offered a solution of changing VNC's startup file to not fully start Gnome, and it worked for me.

Workaround: I modified my ~/.vnc/xstartup to be:

#!/bin/sh

xrdb $HOME/.Xresources
gnome-wm &
gnome-panel &
nautilus --no-default-window &
gnome-cups-icon &
gnome-volume-manager &
xterm &

No comments: