Originally reported in Ubuntu: https://bugs.launchpad.net/bugs/960096 using libxklavier 5.2.1 We had a problem where after autologin, the wrong keyboard layout group would get selected instead of the default. Seems to be caused by http://cgit.freedesktop.org/libxklavier/commit/?id=18e75ba865e5f23b5e0b6926cc20ee82b0782084 To reproduce: 1) gsettings set org.gnome.libgnomekbd.keyboard layouts "['it','it\tnodeadkeys','it\tus']" 2) startx # assuming this launches GNOME Shell or Unity, haven't tested other environments) Notice that your layout ends up being "it\tus" instead of "it". If you instead set your layouts to ['it','it\tnodeadkeys','it\tmac'], you DO NOT get the bug. That is, libxklavier is matching against the 'us' part of 'it\tus' for some reason.
If you disable autologin - what is the layout used in GDM?
I'm not sure. Ubuntu doesn't use GDM by default. LightDM happens to do the right thing, and leaves the layout correct when it starts the user session, which is why the Ubuntu bug mentions autologin. But autologin is a bit of a red herring, because the reproduction steps I gave don't involve a display manager at all, just startx.
I guess it is a (patched?) g-s-d. I tried to reproduce in FC16 - and my first layout is ‘it‘. Please file a bug against g-s-d - but first check if it is reproducible in other distros
I now managed to reproduce it in FC - but still it is an issue with gnome-settings-daemon
I guess it is the same as https://bugzilla.gnome.org/show_bug.cgi?id=671880 Actually, just running gsettings set org.gnome.libgnomekbd.keyboard layouts "['us','ru']" gsettings set org.gnome.libgnomekbd.keyboard layouts "['it','it\tnodeadkeys','it\tus']" selects 3rd italian layout. For some reason.
It is in libxklavier indeed. Investigating. Fixing.
Perhaps even deeper, in X.Org. It seems XOrg has issue loading keymaps generated by libxklavier. For example, that one: xkb_keymap { xkb_keycodes { include "evdev+aliases(qwerty)" }; xkb_types { include "complete" }; xkb_compat { include "complete" }; xkb_symbols { include "pc+it+it(nodeadkeys):2+it(us):3+inet(evdev)+group(rctrl_toggle)+srvr_ctrl(no_srvr_keys)" }; xkb_geometry { include "pc(pc104)" }; }; Could please anyone having that issue try to load that keymap to X without GNOME ("xkbcomp input.xkb :0"). And then check the resulting group names: "xkbcomp :0 -xkb - | grep name"). What names do you see for groups 1-3? I see a very strange thing: name[group1]="Italian"; name[group2]="Italian (eliminate dead keys)"; name[group3]="English (US)"; Instead of name[group1]="Italian"; name[group2]="Italian (eliminate dead keys)"; name[group3]="Italian (US keyboard with Italian letters)"; What are your results?
Stupid me! Here is the answer. Try to change name[Group1]= "Italian (US keyboard with Italian letters)"; include "us(euro)" to include "us(euro)" name[Group1]= "Italian (US keyboard with Italian letters)"; in /usr/share/X11/xkb/symbols/it. It works for me.
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.