Problems when switching keyboard layout in gnome + i3

asked 2014-09-02 17:08:15 +0000

gbitzes gravatar image

updated 2014-09-02 17:09:19 +0000

Hi all,

My setup is a clean Ubuntu GNOME 14.04 which I just installed. I found through tutorials online how to setup GNOME using i3 as its window manager. I've added the following two files:

/usr/share/xsessions/gnome-i3.desktop

[Desktop Entry]
Name=GNOME with i3
Comment=A GNOME fallback mode session using i3 as the window manager.
TryExec=gnome-session
Exec=gnome-session --session=i3

/usr/share/gnome-session/sessions/i3.session

[GNOME Session]
Name=i3
RequiredComponents=gnome-settings-daemon;i3;

Most things seem to work. Screen locking, fn+up/down arrows for volume all look OK. However, I can't get keyboard layout switching to work through GNOME.. Although I have configured English and Greek as my two languages in Region & Language -> Input sources and I have set up alt + shift as the shortcut to switch between the two, it doesn't work in i3. It works fine when using GNOME with its own window manager.

I have tried configuring X11 myself:

setxkbmap -option grp:switch,grp:alt_shift_toggle,grp_led:scroll us,el

Now the behavior is even more interesting: As soon as I press alt + shift, the scroll led lights up for a split second and then turns off again. The keyboard layout remains the same as before.

My solution to this is to tell gnome not to manage the keyboard settings at all, through dconf-editor and by changing org.gnome.settings-daemon.plugins.keyboard.active to false. Now, finally, pressing alt + shift changes the keyboard layout and the scroll led remains on while the layout is set to Greek.

This seems to work well enough, but is it possible to avoid it? Is there any way to manage my keyboard layout settings through GNOME?

edit retag flag offensive close merge delete