I ssh to my Raspberry Pi running Raspian from my mac and try to run tmux, but I'm getting this error:
tmux: need UTF-8 locale (LC_CTYPE) but have ANSI_X3.4-1968
As suggested elsewhere, I commented
# SendEnv LANG LC_*
in /etc/ssh/ssh_config on my macbook and
#AcceptEnv LANG LC_*
in /etc/ssh/sshd_config on the Raspberry Pi. Both should prevent the Pi from getting a hickup because of the locale on the mac.
The output of locale is this:
LANG=
LANGUAGE=
LC_CTYPE="POSIX"
LC_NUMERIC="POSIX"
LC_TIME="POSIX"
LC_COLLATE="POSIX"
LC_MONETARY="POSIX"
LC_MESSAGES="POSIX"
LC_PAPER="POSIX"
LC_NAME="POSIX"
LC_ADDRESS="POSIX"
LC_TELEPHONE="POSIX"
LC_MEASUREMENT="POSIX"
LC_IDENTIFICATION="POSIX"
LC_ALL=
It has sometimes been en_GB.UTF-8 instead of POSIX, don't know why that keeps changing. In /etc/default/locale I added
LC_ALL=en_GB.UTF-8
but that doesn't seem to have any effect.
Exporting LC_ALL=en_GB.UTF-8 on the command line does work and I guess I could put it in .bashrc, but that seems like a cheap hack for something where there should be a sound solution. I ran locale-gen and raspi-config/localization a zillion times and rebooting, without a lasting effect.
How is localization configuration done properly?
raspi-config
is the recommended method, as this generates and installs ALL the files required. The error suggests you have not correctly setup; I suggest you use aUTF-8
locale. I useen_AU.UTF-8 UTF-8
you should tryen_GB.UTF-8 UTF-8