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: 62% [?]

» Filed Under Linux

Comments

11 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!

  6. Jason on March 21st, 2010 2:00 am

    Thankyou so much, this issue is found so much around the net on various distros of Linux, I’m surprised it hasnt been resolved yet

  7. Untanux on March 22nd, 2010 12:45 am

    The second example worked for me just fine. Thank you very much.

  8. Preston on March 30th, 2010 12:30 pm

    #1 worked for me but I had to modify some of the options to use two dashes:

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

  9. milkfilk on May 26th, 2010 7:07 am

    I’ve never had this problem all the years of using Linux but on a new install I eventually did have this problem. Your post was very helpful (#2).

  10. Andrew on June 3rd, 2010 1:25 am

    Thanks for tip #2!

    What a horrible and frustrating problem!

  11. val on June 16th, 2010 9:22 pm

    Great tip, thanks!

Leave a Reply