[mosh-devel] Is there a way to tell if you are running inside mosh?

Keith Winstein keithw at cs.stanford.edu
Thu Nov 15 12:48:11 EST 2018


Hello -- I think the main issue here is that you are using ISO 2022 shift
sequences to switch to the "alternate character set" to draw those lines on
the screen. Mosh follows the practice of some (but not most) UTF-8 (ISO
10646) ANSI terminal emulators in refusing to interpret the "locking
shifts" of the older ISO 2022 standard. Hence all those "q"s on the screen.

Your options are probably:

a) Change your shell configuration to send real Unicode (UTF-8) characters
instead of switching into an alternate character set via ISO 2022
b) Use a program like "screen", "tmux", or "luit" to translate between ISO
2022 (input) and UTF-8 (output) for Mosh.
c) Detect if you are running inside a mosh-server with a command like
`pstree -plus $$ | grep mosh-server`

Would have happily answered this over IRC as well!

Best regards,
Keith

On Thu, Nov 15, 2018 at 7:47 AM TJ Luoma <luomat at gmail.com> wrote:

> > What's the value of TERM outside, without running ssh?
>
> same, "xterm-256color"
>
> TjL
>
> --
> TJ Luoma
> TJ @ MacStories
> Personal Website: luo.ma (aka RhymesWithDiploma.com)
> Twitter: @tjluoma
> _______________________________________________
> mosh-devel mailing list
> mosh-devel at mit.edu
> http://mailman.mit.edu/mailman/listinfo/mosh-devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.mit.edu/pipermail/mosh-devel/attachments/20181115/6e0f7637/attachment.html


More information about the mosh-devel mailing list