How to fix keyboard mapping issue of Gnome / Vnc in ubuntu

Posted on June 18, 2009

Yesterday I just intalled an ubuntu 9.04 Server for my co-work.After installed VNC on this server I found the keyboard was messed up while I am connecting this server via vnc client from Windows.After search from internet I found there are 2 good solutions to fix this isssue.

1.In the terminal of this server ,type the following command ,then kill your old vnc then create a new one

gconftool –set /desktop/gnome/peripherals/keyboard/kbd/layouts –type List –list-type String [aa]

2.Another way is to edit your xstartup file and add 1 new line “export XKL_XMODMAP_DISABLE=1″ (location is $HOME/.vnc/xstartup) then re-create a new vnc session.Below is an example.

#!/bin/sh

xrdb $HOME/.Xresources
xsetroot -solid grey
#x-terminal-emulator -geometry 80×24+10+10 -ls -title “$VNCDESKTOP Desktop” &
#x-window-manager &
export XKL_XMODMAP_DISABLE=1
/etc/X11/Xsession

Note:Please add this line before line “/etc/X11/Xsession”

tip

Popularity: 100% [?]

» Filed Under Linux

Comments

5 Responses to “How to fix keyboard mapping issue of Gnome / Vnc in ubuntu”

  1. Drew on October 6th, 2009 7:46 pm

    The second example fixed it for me. Thank you very much.

  2. Andy Mitchell on December 11th, 2009 9:45 am

    Spot-on, am a “Rookie Linux” guy and this worked for me

  3. Kristof Szabo on December 13th, 2009 2:32 pm

    Many thanks! (I used the second method as well.)

  4. EricInWisconsin on February 19th, 2010 1:24 pm

    First solution did nothing. No joy.

    The second solution was the key. Thanks!

  5. Tony on February 24th, 2010 8:39 am

    The first one failed for me (Unknown option -set) but the second one worked like a charm. Thanks!

Leave a Reply