Fixing “cannot change locale (UTF-8)” error
By Rayed
I am trying new way to fix the annoying “cannot change locale (UTF-8)” error, this error usually show when you login from your OSX to a Linux machine:
osx$ ssh ubuntu-server Last login: Sat Mar 9 09:04:40 2013 from 10.10.12.16 -bash: warning: setlocale: LC_CTYPE: cannot change locale (UTF-8) [rayed@ubuntu-server ~]$
The problem happens because OSX send LC_CTYPE environment variable when you connect through ssh, the solution is to ask OSX not to send these variables. This can be done by editing you ssh config file on you OSX and commenting the “SendEnv” variable:
osx$ sudo vi /etc/ssh_config
:
#SendEnv LANG LC_*
: