0

At work I have a bunch of Debian 9 workstations. Default locale is set to en_US.utf8 on the systems. The default desktop environment is Xfce. There is one user who somehow has $LANG=C defined in his Xfce session. This causes various encoding issues as UTF-9 encoded characters are just shown as boxes.

I have tried adding export LANG=de_DE.utf8 into the .profile and .xprofile. There is no .bash_profile. Additionally I added export VAR_FROM_PROFILE=1 and export VAR_FROM_XPROFILE=1 to the respective files. When the user logs in, we can see both variables being defined in a shell, but LANG is still set to C. Sourcing the .profile manually and then opening programs makes them localized in German, so that works.

Something must change the LANG variable after sourcing .profile and .xprofile, but I did not find any occurrence of LANG in the dotfiles and in .config. What could reset the locale to C?

  • maybe turn on sh -x mode to try to get a trace of what is going on? or strace and see if any LANG or LC or locale stuff pops up – thrig Jan 25 at 0:14
  • Where would I insert this to capture the output? It seems that Xfce does something on startup with these things. – Martin Ueding Jan 27 at 8:05
  • maybe xterm -e "$SHELL -x" and then see what that shell gets, though if the problem is in the window manager that might require snooping around with sysdig or such – thrig Jan 27 at 15:43

Your Answer

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

Browse other questions tagged or ask your own question.