I am on a multi user Debian Stretch system which has en_US.UTF-8
as default locale, but I want de_DE.UTF-8
for my user. I was able to set it for terminals, by adding export LANG=de_DE.UTF-8
to ~/.bashrc
.
The problem is that my X environment (with XFCE as window manager and lightdm as login manager) still uses the default locale, which isn't a surprise as .bashrc
is just for bash. So I tried setting the variable in various other files:
~/.xinitrc
This file doesn't seem to get executed at all.
~/.config/xfce4/xinitrc
Setting the variable here didn't work either (no observed change in behaviour). Also, if I switch the window manager, I need to set it for the new one again, which isn't very appealing.
~/.xsession
Setting the variable here presumably works, but I would also need to start the window manager here, so I'm hoping to find a better place.
~/.pam_environment
Seems to be ignored on Debian
~/.xsessionrc
Setting environment variables here actually seems to work, but it looks like LANG
is set to en_US.UTF-8
later in the startup process.
~/.i18n
Setting a language here doesn't seem to work.
It seems like all these aren't the right place to set the LANG
variable. Where should I set it, to get the desired result?
~/.pam_environment
is read by default on Debian. Did you writeLANG=de_DE.UTF-8
orexport LANG=de_DE.UTF-8
?export
is wrong there, this isn't a shell script, just a list ofVARIABLE=value
lines.LANG=de_DE.UTF-8
. I also triedTEST=something
to be sure thatLANG
isn't overwritten somewhere else. However, ITEST
wasn't set on either physical or X terminals.