mosh complains about locale issues

Ask questions about Arch Linux ARM. Please search before making a new topic.

mosh complains about locale issues

Postby Ataraxy » Thu Jul 09, 2020 6:46 am

My client:

$this->bbcode_second_pass_quote('', '
')% env | /bin/grep '^L[AC]' 1.299s | 20-07-09 13:42:11
LC_TELEPHONE=en_AU.UTF-8
LC_TIME=en_AU.UTF-8
LANG=en_AU.utf8
LC_MONETARY=en_AU.UTF-8
LC_PAPER=en_AU.UTF-8
LC_ADDRESS=en_AU.UTF-8
LC_IDENTIFICATION=en_AU.UTF-8
LC_NUMERIC=en_AU.UTF-8
LC_MEASUREMENT=en_AU.UTF-8
LC_NAME=en_AU.UTF-8


When trying to `mosh` to my Pi:

$this->bbcode_second_pass_quote('', '
')% mosh alarm@192.168.123.2 tmux
alarm@192.168.123.2's password:
The locale requested by LANG=en_AU.utf8 isn't available here.
Running `locale-gen en_AU.utf8' may be necessary.

mosh-server needs a UTF-8 native locale to run.

Unfortunately, the local environment ([no charset variables]) specifies
the character set "US-ASCII",

The client-supplied environment (LANG=en_AU.utf8) specifies
the character set "US-ASCII".

locale: Cannot set LC_CTYPE to default locale: No such file or directory
locale: Cannot set LC_MESSAGES to default locale: No such file or directory
locale: Cannot set LC_ALL to default locale: No such file or directory
LANG=en_AU.utf8
LC_CTYPE="en_AU.utf8"
LC_NUMERIC=en_AU.UTF-8
LC_TIME=en_AU.UTF-8
LC_COLLATE="en_AU.utf8"
LC_MONETARY=en_AU.UTF-8
LC_MESSAGES="en_AU.utf8"
LC_PAPER=en_AU.UTF-8
LC_NAME=en_AU.UTF-8
LC_ADDRESS=en_AU.UTF-8
LC_TELEPHONE=en_AU.UTF-8
LC_MEASUREMENT=en_AU.UTF-8
LC_IDENTIFICATION=en_AU.UTF-8
LC_ALL=
Connection to 192.168.123.2 closed.
/usr/bin/mosh: Did not find mosh server startup message. (Have you installed mosh on your server?)


I have run `sudo locale-gen en_AU.utf8` on the server.

What magic am I missing to have my Pi know about the locale en_AU.UTF-8?
Ataraxy
 
Posts: 9
Joined: Fri Feb 15, 2019 6:04 am

Re: mosh complains about locale issues

Postby karog » Thu Jul 09, 2020 2:45 pm

In /etc/locale.gen you have to uncomment en_AU.utf8 then execute

$this->bbcode_second_pass_code('', 'sudo locale-gen')
karog
 
Posts: 301
Joined: Thu Jan 05, 2012 7:55 pm

Re: mosh complains about locale issues

Postby Ataraxy » Fri Jul 10, 2020 7:39 am

Cheers @karog.

Here's how I automated it:

sudo sed -i -E 's/\#(en_AU.UTF-8 UTF-8.*)/\1/' /etc/locale.gen
sudo locale-gen &>/dev/null &
sudo localectl set-locale LANG=en_AU.UTF-8 LANGUAGE=en_AU:en_GB:en

The last line has Australians fall back to GB spelling before US :)
Ataraxy
 
Posts: 9
Joined: Fri Feb 15, 2019 6:04 am


Return to User Questions

Who is online

Users browsing this forum: Google [Bot] and 29 guests