mobile-shell / mobile-shell/mosh

Any chance of mosh-server ASCII locale support?

Open
#1,020 10 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C++
Stars
14.5k
Forks
865
PR merge metrics
No merged PRs in 30d

Description

I am hoping to use mosh to connect to a remote embedded device, which has two properties:

  1. It has intermittent, slow, and high-latency sat or cell network conditions. This is my motivation for using mosh over vanilla ssh.
  2. It has a very stripped down version of linux, which does not have a UTF-8 native locale (locale and locale-gen are not found).

Here's the output I get when trying to connect:

NI Linux Real-Time (run mode)

Log in with your NI-Auth credentials.

The locale requested by LANG=en_CA.UTF-8 isn't available here.
Running `locale-gen en_CA.UTF-8' 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_CA.UTF-8) specifies
the character set "US-ASCII".

sh: locale: command not found
Connection to {ip} closed.
/usr/local/bin/mosh: Did not find mosh server startup message. (Have you installed mosh on your server?)

running mosh-server manually gives:

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

Unfortunately, the local environment (LANG=L1) specifies
the character set "ISO-8859-1",

The client-supplied environment ([no charset variables]) specifies
the character set "US-ASCII".

sh: locale: command not found

I've tried temporarily changing my client LANG to L1, ISO-8859-1, or US-ASCII and that doesn't seem to work. Am I correct in assuming lack of UTF-8 locale in the server OS is causing the issue? Here https://github.com/mobile-shell/mosh/issues/793#issuecomment-240795633, it's mentioned that mosh is more eager than ssh to halt if there's a locale issue. I understand this is a sensible default, however is there a way to override this behaviour and silently ignore locale issues like ssh does? I don't care about the possibility of corrupted or garbled text (it doesn't happen that often when I use ssh), the main feature of mosh I'm hoping to use is a shell that's more robust to changing network conditions. Any chance of this becoming a supported scenario in the future?

Thanks.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at the mosh-server startup path and review the locale-related behavior discussed in issue #793. Determine how startup handles US-ASCII or other non-UTF-8 server locales, then verify that a supported override can establish a session without requiring locale or locale-gen on the remote device.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp, linux
Domain
cli, internationalization, operating-systems
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.