[mosh-users] Mosh, clusterssh and colors

Keith Winstein keithw at mit.edu
Tue Jun 7 23:02:56 EDT 2016


Whoops, my own reply didn't get sent from earlier in the day. Echoing what
John said:

===

Long story short, I think you need to ensure that cssh is running the `
base16-default.dark.sh` script in each new terminal *before* it runs mosh.

You might need to make a wrapper around mosh that first runs
base16-default.dark.sh and then runs mosh.

The basic story is that the escape sequences that base16 uses rely not just
on using the 256color escape sequences, but by actually changing the color
palette itself. Mosh (and some other terminal emulators, including
Terminal.app) doesn't support those escape sequences, but mosh won't screw
up your color palette if you've changed it before running mosh.

Hope this helps!

Best regards,
Keith

On Tue, Jun 7, 2016 at 7:56 PM, John Hood <cgull at glup.org> wrote:

> On 06/07/2016 14:56, Niklaas Baudet von Gersdorff wrote:
> > Hello Keith,
> >
> > thanks for your reply.
> >
> > Keith Winstein [2016-06-07 10:24 -0700] :
> >
> >> (1) Does mosh work properly by itself (forgetting clusterssh for the
> >> moment)?
> > I does so perfectly. I use it for my everyday work on the same server
> > with the same set-up without any problems.
> >
> > Also, I don't get wrong colors with ssh+clusterssh. I only get wrong
> > colors with mosh+clusterssh. I might be wrong but that made me suspect
> > that it's related with mosh (and not something else).
> The base16 scripts rely on an obscure XTerm feature-- the OSC
> change-color commands.  Mosh doesn't support those commands, or pass
> them through.
>
> My best guess is that you have a base16 script set up in your shell
> profile/login scripts on both client and server.  When you use plain
> ssh, everything is fine, because base16 runs both when you start the
> client XTerm and when you login to the remote server.  When you use
> plain Mosh, everything is fine-- because base16 runs when you start the
> client XTerm, and the base16 invocation on the server is essentially
> discarded by Mosh.  When you use cssh with ssh, everything is fine--
> cssh starts an XTerm invoking ssh and base16 does not get run there, but
> the remote server runs base16 and it's passed through to the XTerm.
> When you use cssh with mosh, it breaks-- base16 is not run locally on
> the new XTerm and the server's invocation is discarded.
>
> Unfortunately, implementing this feature is going to be pretty low on
> the priority list-- you're the first person to run into this issue that
> I know of.  A possible workaround is to write a wrapper script that
> invokes the base16 script, then runs mosh.  Use that as the ssh command
> in your .clusterssh/config file.  That way, when cssh starts the XTerm,
> the base16 script is always run locally.  You might even find benefit in
> doing this for ssh, ignoring mosh.
>
> You could also investigate XTerm's XTerm.vt100.color* resources,
> documented in the man page, which appear to have the needed
> functionality.  X resources are horribly archaic, but they should work
> reliably for any XTerm you start without requiring any scripting.
>
> Regards,
>
>   --jh
>
> _______________________________________________
> mosh-users mailing list
> mosh-users at mit.edu
> http://mailman.mit.edu/mailman/listinfo/mosh-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.mit.edu/pipermail/mosh-users/attachments/20160607/24599325/attachment.html


More information about the mosh-users mailing list