[SOLVED] Cannot permanently switch to US keyboard layout
Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I'm running E19 on Sparky Linux (Debian 8) and just installed a new keyboard on my Lenovo T420. Before I had a UK keyboard, but now I have US keyboard. I've tried deleting the UK keyboard layout and adding the US keyboard under keyboard settings but that doesn't work, even though it shows the American keyboard as being active and the UK layout isn't there at all. The output of my /etc/default/keyboard is
You're not being specific as to where the keyboard layout is not working as expected. /etc/default/keyboard is, as I recall, system wide configuration but does not apply to X. So after making those changes, you should get the US keyboard layout in VTs, but not while in X?
keyboard-configuration may also not affect X (can't remember). Most likely your system locale is set to UK and I believe X tries to autoconfigure its keybaord layout based on that and not the keyboard layout in use by the system.
This should work in your ~/.xinitrc
Code:
setxkbmap -layout us
(if it doesn't exist, create it)
Failing that put it in ~/.xsession
If none of that works for whatever reason, creating/modifying an xorg config file and specifying the layout you want to use should work.
Mostly from the arch wiki. I'm not really sure how to set it outside of the package management system. Although setxkbmap seems to have some effect on my jessie install. But you're obviously overriding system defaults "somewhere". Is something in /etc/X11/xkb/ ? Perhaps remove or move it and see if things change. You'll probably need to restart X to have it take.
Is this a system that you've had a while and upgraded to jessie / debian 8? Problems like this normally go away if you do a fresh install. Various other information about keyboards is found in /usr/share/X11/xkb/*, although that doesn't "set" the keyboard. You can probably set the keyboard in the display manager and/or window manager, depending on what you use. Elightenment is obviously one of those.
I wonder that if you create a new user, if that user has the layout that you want and set with the package management system? If it does then there's something in your ~/.* files that is in the way. If it doesn't, then there's likely something in /etc/* that's in the way.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.