Currently I have to run setxkbmap gb every time I restart my system. This started happening since I upgraded to Ubuntu 15.04 with systemd. It used to work putting this command in the .xsession file, which still starts my window manager and changes the cursor and so on. Here are its contents:

xsetroot -cursor_name left_ptr
feh --bg-fill ~/wallpapers/luke-twyman-wallpaper-1920x1200.jpg
setxkbmap -layout gb

Also, the actual system console is set to the correct gb locale and the keyboard layout is fine. This problem is only with X.

Also it may be relevant that I use the text login, which I enabled with systemctl set-default multi-user.target. I don't really understand why that command has this effect but I guess that would be another question.

  • I have the same problem. I'm running xmonad on trusty with lightdm, and for some reason, setxkbmap won't work in the .xsession file for me either. I'm still looking for a solution. – Andrew Thaddeus Martin Oct 20 '15 at 14:47

Try this (it helped me):

  1. Run ibus-setup.
  2. Click Advanced tab.
  3. Click Use system keyboard layout.
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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