18

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"
EndSection           

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

1 Answer 1

15

Yes, Gnome overrides the xkb X settings.
You can set xkb layout/options in Gnome either using the CLI tools gsettings/dconf or via the GUI tool dconf-editor.
So, using gsettings, open a terminal and run:

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

and

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

Or fire up dconf-editor and edit like this (note each value must be quoted and multiple values are delimited by comma+space):

enter image description here

and

enter image description here

Both methods should yield the same results.

4
  • 1
    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, 2013 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 Mar 2, 2013 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, 2013 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, 2013 at 17:54

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .