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 se
to/home/pi/.profile
fixed it. Thanks, you saved me from alot of headache. – justanotherhobbyist Nov 06 '13 at 16:13/etc/profile
is the global one which will always be read, whichever user is logging on. Each user then has their own personal.profile
file in their home folders. So,/root/.profile
isroot
's and/home/pi/.profile
is the one for the userpi
. I asked about the other files because if$HOME/.bash_profile
or$HOME/.bash_login
exist those files are read instead of$HOME/.profile
. If they don't exist, never mind. For more details, read theINVOCATION
section of theman bash
or see here. – terdon Nov 06 '13 at 16:20/etc/skel/.profile
would 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/profile
will cause any new user to have the layout set in their personal$HOME/.profile
but will not affect existing users. – terdon Nov 06 '13 at 16:28/etc
should be calledprofile
not.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_profile
if you log in from the command line (usingssh
, for example). – terdon Nov 20 '15 at 21:56setxkbmap
make 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.profile
and not.bash_profile
. – terdon Nov 23 '15 at 11:35$HOME/.profile
is not loaded before login. So when I enter password it is still old QWERTY layout. – WesternGun May 29 '18 at 15:36.profile
is 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:swapescape
command. I placed it in.profile
but no effect so in.xinitrc
. When I placed it in.bashrc
it only works with terminal. But I need it when I graphically log in. – LRDPRDX Dec 27 '19 at 03:49/etc/profile
andhome/me/.profile
. – jay.sf Jun 01 '21 at 10:00