So I got Ubuntu 9.04 installed on my wanna be HTPC. I try to VNC ( ultraVNC) into via PuTTy through my desktop windows box and when I try to type stuff it all comes out stupid. The keyboard layout was completely jacked. I hit an 's' and out comes a 'b'. So anyways looking around on them world wide internets I find a bunch of people with the same problem. I have no clue as to how it works, but it worked.
Here's the fix:
in your ~/.vnc/xstartup file, make it look like this
#!/bin/sh
xrdb $HOME/.Xresources
xsetroot -solid grey
#x-terminal-emulator -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" &
#x-window-manager &
export XKL_XMODMAP_DISABLE=1 ##### <<<<<<>
/etc/X11/Xsession
It was a pain in the ass to find so I'm "e-blogging" about it. Hope this helps someone out there.