I'm having trouble setting my keyboard settings to swedish, running Raspbian on a raspberry pi. I've tried everything and the only thing that worked was the command setxkbmap se.
But this doesn't permanently save the settings, and it's back to default after reboot. Is there a command to permanently save these settings?
setxkbmap seto/home/pi/.profilefixed it. Thanks, you saved me from alot of headache. – justanotherhobbyist Nov 06 '13 at 16:13/etc/profileis the global one which will always be read, whichever user is logging on. Each user then has their own personal.profilefile in their home folders. So,/root/.profileisroot's and/home/pi/.profileis the one for the userpi. I asked about the other files because if$HOME/.bash_profileor$HOME/.bash_loginexist those files are read instead of$HOME/.profile. If they don't exist, never mind. For more details, read theINVOCATIONsection of theman bashor see here. – terdon Nov 06 '13 at 16:20/etc/skel/.profilewould be better if I have more than 1 user? Or maybe/root/.profile? Which is best? – justanotherhobbyist Nov 06 '13 at 16:26/etc/profile. Adding it to/skel/profilewill cause any new user to have the layout set in their personal$HOME/.profilebut will not affect existing users. – terdon Nov 06 '13 at 16:28/etcshould be calledprofilenot.profile(no.). Does that work? – terdon Nov 06 '13 at 16:36~/.bash_profile- it only works when I add it to~/.profile(at least on Linux Mint 17.1). – Jan Warchoł Nov 20 '15 at 21:22~/.profile, to my knowledge, none of them source~/.bash_profile. It will work in~/.bash_profileif you log in from the command line (usingssh, for example). – terdon Nov 20 '15 at 21:56setxkbmapmake sense in a command-line login at all? If I ssh from host A to host B, and I have some xkb settings on host B, they won't matter anyway because my keyboard is controlled by host A. After all, isn't xkb a tool for configuring keyboard in an X environment? – Jan Warchoł Nov 23 '15 at 11:08.profileand not.bash_profile. – terdon Nov 23 '15 at 11:35$HOME/.profileis not loaded before login. So when I enter password it is still old QWERTY layout. – WesternGun May 29 '18 at 15:36.profileis a user-specific setting. You could probably add it in/etc/profile, but that would affect all users. It would be much better to do it by configuring your login manager. But for that, please ask a new question, explaining what operating system you are using, and what login manager. – terdon May 29 '18 at 15:39setxkbmap -option caps:swapescapecommand. I placed it in.profilebut no effect so in.xinitrc. When I placed it in.bashrcit only works with terminal. But I need it when I graphically log in. – LRDPRDX Dec 27 '19 at 03:49/etc/profileandhome/me/.profile. – jay.sf Jun 01 '21 at 10:00