# Xvnc keyboard issue

## LimeFrog

Hi, i've followed the guide how-to setup an Xvnc terminal server (https://forums.gentoo.org/viewtopic-t-72893.html) with succes. Everything works like charm, everything except my keyboard. The problem is that keys get tossed around without any logic, when i press "Q" i get "C" and "W" becomes "." and so on. I got no problem with this during local sessions. Anyone know what could be wrong? I've checked the keymapping in Gnome and it's set to Swedish. Also if i clear all Gnome config files and restart X and then login to Xvnc the keyboard works, but after the next reboot the same problem occurs.  :Rolling Eyes: 

Help anyone?

----------

## dalamarian

I have the same exact problem, still haven't figured it out yet.

----------

## LimeFrog

 :Exclamation:  BUMP  :Exclamation: 

Anyone got any sugjestions? This is really bugging me..

----------

## terrym

I had the same problem.  I just emerged Xorg-6.8.2-r2 and the problem went away.

----------

## LimeFrog

Hmm, so the problem could be Xorg related? Got to try changing version then and see if it helps.

Thanks for the tip!  :Very Happy: 

----------

## LimeFrog

Hmm, when i was looking in ".xsession-errors" i found this line.

```
Window manager warning: Log level 32: could not find XKB extension.
```

Could it be the lack of XKB that screws up the keyboard map? Sounds reasonable to me.

So how do i get the XKB extension to load?

----------

## terrym

Ok, so here is a little more info.  I am not sure if this is the full answer, but it seems to have worked for me.

After upgrading to the latest stable xorg, the problem went away for my Gnome login.  Then my wife logs in to her account (using xdmcp) and she gets the Gnome message that the keyboard has changed.  So I looked at the Gnome configuration and found different model settings for "kbd" and "xkb" (under desktop/gnome/peripherals/keyboard/kbd/model and desktop/gnome/peripherals/keyboard/xkb/model).  One was set for 104 key, the other 105 keys.  The setting for /desktop/gnome/peripherals/keyboard/general/disable_sysconfig_changed_warning was also checked.  So I set both keyboards to 105, and unchecked the warning.  Now her account works correctly with a gdm login on the local machine, or a remote login with vnc or xdmcp.

I wonder if a conflict between xorg.conf and the Gnome settings was causing this?  When I upgraded xorg, it overwrote my xorg.conf.  I did etc-update, but I must have missed the file, I usually just update the ones I know are customized and then do a -5 on all the rest, but it must have slipped by me......  So maybe just reconstructing my xorg.conf fixed it, not the xorg update itself.

----------

## LimeFrog

I checked in the configuration editor but i lack "desktop/gnome/peripherals/keyboard/xkb/model", so it seems i don't have the XKB extension.

So if anyone know how or where i get XKB please let me know.

----------

## blahbla

i had the same problem with the keyboard and xkb extension. I noticed that xorg was emerged without the dlloader and insecure-drivers flags. I put them in and emerged xorg again and that seems to have fixed it for me. probably the dlloader, but i don't really know. Just happy it works now  :Cool: 

----------

## komoto

Has this problem been solved yet, because I have the exact same problem as LimeFrog, right down to the keys "Q" becomming "C" and "W" becomming "."

It's strange because I only get this problem with gnome. If I use the twm window manager with Xvnc I get no problem at all.

-Komoto

----------

## dtremblay

Ok, so I've read the posts, re-emerged Xorg.  Killed and restarted vncserver a million of time in various configurations.  Change keyboard from 105 to 101 keys and still have this most annoying problem.  I've deleted .gconf and .gconfd from the user account.  I've played with the /etc/gconf/...

This problem doesn't occur with fvwm.  If only I didn't like gnome so much...  The problem doesn't occur in X when I'm actually using the terminal.

If anyone has found a solution, please let me know.

Edit

Well, after all this, I've used the gnome Keyboard Settings utility, and clicked the 'Reset to Defaults' button.  I logged out and saved my settings, and now it works.  Going back to the Keyboard Settings show 'Unkown keyboard model' (this used to say Generic) and the layout is now us (instead of 105 keys (with Windows Key)).  So... while I'm happy it works, I still have this odd feeling in my stomach that tells me "You don't have a clue why it works..."

Anyway, before this I never had to think about keyboard layouts or whatnot, so... back to work.[/glsa]

Thanks,

----------

