Gconf and Keyboard warnings

Update:This post has served as a good learning tool about gconf and the keyboard, though a couple bits are off. To summarize, Gnome shouldn’t have anything to do with keyboard settings, this is the responsibility of the Xserver and has been for awhile. Gnome keyboard settings need to be erased, including the backup. Also, PowerPC computer users might want to look at PPC – How I Got the Left Side of My Keyboard Back.

I’ve had the occasional run-in with gconf before. The first time happened when I attempted to make my first ebuild of of pyrename. Gconf still appears like a megalithic entity to me. Gconf, I lately discovered, was responsible for the xcb warnings I have been seeing loading X.

In a offhandish experiment, a few weeks ago I disabled the ADB driver in the kernel. The ADB driver for the iBook controls the keyboard and trackpad. Touchpad tapping was driving me so crazy it was worth the effort (hoping the x-server keyboard driver would take over [it didn’t]). Now I see these messages every time I boot:

The X system keyboard settings differ from your current GNOME keyboard settings…

Followed by:
Error activating XKB configuration…

and a choice to use either X server keyboard settings or GNOME’s.

I looked around and one person found a solution by deleting ~/.gnome2 directory. I will only ever erase the .gnome2 settings if there is no other choice. Changing all my applications preferences is a process that can take days and very tedious.

Another person was able to match the xorg and gnome settings.

xprop -root | grep XKB

Unfortunately mine keyboard settings matched.

I discovered a manual: GNOME and XKB: looking at the issues and it told me where to look in gconf to discover if the settings were right:

gconftool-2 -R /desktop/gnome/peripherals/keyboard/kbd

This is what I saw:

layouts = []
model =
overrideSettings = true
options = []

Yikes! So I was just going to change this with the gconf-editor but:

It is not recommended to modify these variables manually using Configuration Editor (gconf-editor). The delimiter used in the “layouts” and “options” values is not reproducible in this GUI tool.

So I did a little reading on the gconftool-2 and learned how to enter the setting (I thought):

gconftool-2 -s -t list --list-type=string /desktop/gnome/peripherals/keyboard/kbd [us]

Unfortunately “gconftool-2 -R /desktop/gnome/peripherals/keyboard/kbd” didn’t list it. Using vim to look at ~/.gconf/desktop/gnome/peripherals/keyboard/kbd and I did see a value.

Unsure why this didn’t work I decided to take a risk and just use gconf-editor to enter the value. Doing this did show the value using gconftools-2 -R. I restarted X but the first dialog box appears still but second dialog box is gone. I can live with that – for the time.


Though some functions keys still don’t work, I have stopped the warnings. Just mv ~/.gconf/desktop/gnome/peripherals/keyboard/kbd/%gconf.xml to the Desktop. This is a hackish fix and the warnings will reappear if a keyboard layout is selected in the Gnome control panel.


Thanks to Domino who pointed out:

The problem is caused by a old stored version of the X settings in gconf. Just alter the “model” and “layouts” values in ~/.gconf/desktop/gnome/peripherals/keyboard/kbd.sysbackup/%gconf.xml to match the current setup and the message will go away.

About Gen2ly

<3's linux

Posted on 2007-12-19, in Linux. Bookmark the permalink. 4 Comments.

  1. Domino Marama

    The problem is caused by a old stored version of the X settings in gconf. Just alter the “model” and “layouts” values in ~/.gconf/desktop/gnome/peripherals/keyboard/kbd.sysbackup/%gconf.xml to match the current setup and the message will go away.

  2. If you use VNC, this issue most likely is bugging you. Anyway, I just wanted to add my particular workaround here … since this article helped jumpstart my everything.

    If you just want to disable the annoying error message “The X system keyboard settings differ from your current GNOME keyboard settings…“ but the error message doesnt have the option “never show again” then open gconf-editor and navigate to /desktop/gnome/peripherals/keyboard/general and check ‘disable_sysconfig_changed_warning’.

    Now some background info.
    The /desktop/gnome/peripherals/keyboard/kbd keys are not really used. Since v2.12 gnome automatically uses the system (/etc/X11/xorg.conf) kbd values. The checkbox ‘overrideSettings’ doesnt have any affect whatsoever.
    So if you run gconftool-2 -R /desktop/gnome/peripherals/keyboard/kbd and see:
    layouts = []
    model =
    overrideSettings = true
    options = []

    That is perfectly normal. In fact, youll see that the gnome settings in fact are exactly the same as the system if you run
    xprop -root | grep XKB
    _XKB_RULES_NAMES_BACKUP(STRING) = “xorg”, “pc105”, “us”, “”, “”
    _XKB_RULES_NAMES(STRING) = “xorg”, “pc105”, “us”, “”, “”

    However, every time you log in via VNC, gnome-control panel tries to automatically detect the keyboard and fails miserably. It creates the new keys in /desktop/gnome/peripherals/keyboard/kbd.sysbackup and usually with the wrong settings

    When you log in via VNC (if you fool around with the gconf keys its possible you get the error even when logging in locally) gnome incorrectly detects the keyboard, sets the values in kbd.sysbackup, realizes that the keys in kbd and kbd.sysbackup are different, and throws the error.

    There is really no solution. You can try to make ~/.gconf/desktop/gnome/peripherals/keyboard/kbd.sysbackup/%gconf.xml read-only by root etc, but the gconf keys are flexible and modify themselves (ie old unset keys are auto. removed, etc)

    Now if VNC picks a really bad config and the keyboard is completely scrambled, the fix is here: https://bugs.launchpad.net/ubuntu/+source/control-center/+bug/108928

    However, if the keymaps are OK, then as temporary fix (i dont know if this actually makes a difference) make a script with the following lines and run it at startup (it will only run when logged on via vnc)
    [ “$DISPLAY” != “:0.0” ] && gconftool-2 -s -t list –list-type=string /desktop/gnome/peripherals/keyboard/kbd.sysbackup/layouts [us]
    [ “$DISPLAY” != “:0.0” ] && gconftool-2 -s -t string /desktop/gnome/peripherals/keyboard/kbd.sysbackup/model pc105

    Of course change the values to fit.

  3. Amazing Site I like it. It Was Quite Interesting NiceWork I appreciate the information you provided Excellent post. Keep it up! Good day!

  4. thanks Shams, appreciate the observation.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s


Get every new post delivered to your Inbox.

Join 58 other followers

%d bloggers like this: