Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Is there a way to query where xkb is getting its configuration from? Under ArchLinux I have /etc/X11/xorg.conf.d/00-keyboard.conf with

Section "InputClass"
    Identifier "system-keyboard"
    MatchIsKeyboard "on"
    Option "XkbLayout" "us,us"
    Option "XkbVariant" "altgr-intl,colemak"
    Option "XKbOptions" "ctrl:nocaps,grp:alt_shift_toggle"

but when I start up, if I do setxkbmap -query, I only get

rules:      evdev
model:      evdev
layout:     us,us
variant:    altgr-intl,

So neither the alternative variants nor options are recognized (needless to say, I cannot change layout). If I however run

setxkbmap -layout "us,us" -variant "altgr-intl,colemak" -option "ctrl:nocaps,grp:alt_shift_toggle"

I get the correct

rules:      evdev
model:      evdev
layout:     us,us
variant:    altgr-intl,colemak
options:    ctrl:nocaps,grp:alt_shift_toggle

So is there a possibility something is overwriting my configuration? I am running GNOME/Cinnamon

share|improve this question
up vote 7 down vote accepted

Yes, Gnome overrides the xkb X settings. I don't know about Cinnamon but vanilla Gnome desktop used to allow you to add different keyboard layouts thorough System Settings > Region & Language > Input Sources:

enter image description here

and then you had Layout Options on the bottom where you could add options. However, in gnome-control-center-3.6 that option no longer works - it's greyed out (see explanation for 3.4 > 3.6 Transition here).
Anyway, you have the options to set xkb layout/options in Gnome either through dconf-editor or gsettings( if you prefer the command line).

gsettings - in terminal, run:

gsettings set org.gnome.desktop.input-sources sources "[('xkb', 'us'), ('xkb', 'us+altgr-intl'), ('xkb', 'us+colemak')]"


gsettings set org.gnome.desktop.input-sources xkb-options "['ctrl:nocaps','grp:alt_shift_toggle']"  

dconf-editor - go to org::gnome::desktop::input-sources and edit like this:

enter image description here

Note that values are delimited by comma+space.

Both methods should yield the same results.

share|improve this answer
Hi, thanks for the response. In dconf-editor, my current setting seems to be [('xkb', 'us+altgr-intl'), ('xkb', 'us+colemak')], so it should work, shouldn't it? Or do I need the first ('xkb','us')? There is also the possibility it is still messing something up. Can I stop GNOME from overriding the xkb settings? – rabipelais Mar 2 '13 at 16:13
It should work without the first ('xkb, 'us'), at least it works on my install (it doesn't hurt to add it and see if it makes any difference). If it still doesn't work then something must be wrong on your side as I am also on Archlinux and setting your layouts and options works fine on my side. Also, I don't think you can stop Gnome from overriding the xkb settings as it's hardcoded into gnome-settings-daemon – don_crissti Mar 2 '13 at 16:58
Mmmm didn't work either way, I still get the broken result. If I however change the order to [('xkb', 'us+colemak'), ('xkb', 'us+altgr-intl')], it does get the colemak configuration (and not the altgr one), but setxkbmap -query gives only variant: colemak, . A bug, perhaps? I don't know whom I could report to. – rabipelais Mar 2 '13 at 17:26
Ok, I tried it again with dvorak instead of colemak and it worked. I put colemak again, and it did work this time....weird. Thansk a lot. – rabipelais Mar 2 '13 at 17:54

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.