[mosh-users] Mosh, iTerm and tmux

Eugene Doma eugene.doma at sydney.edu.au
Mon Dec 2 22:26:01 EST 2013


Hi Will !

My gut feeling is that the functionality you are seeking should be implemented by extending tmux / iTerm to maintain the mosh-like ssh link failure recovery mechanism.

Extending mosh to handle your particular use case would be like an open invitation for every other comparable combination of terminal emulator and server-side session management to be supported.

I’m sure the mosh designers and implementers will chime in with their observations.  I’m merely giving my support for keeping mosh (and all the other utilities that I use) to be as simple as possible.

Cheers,
Eugene

From: mosh-users-bounces at mit.edu [mailto:mosh-users-bounces at mit.edu] On Behalf Of William Uther
Sent: Friday, 29 November 2013 6:15 PM
To: mosh-users at mit.edu
Subject: [mosh-users] Mosh, iTerm and tmux

Hi,
  I recently discovered mosh.  Great work!

  However, I've just switched back to ssh, and I want to explain why as a sort of feature-request so I can get back to mosh one day...

  I'm not sure exactly what mosh features are needed for the experience I want though.  It may be that simply adding scroll-back is enough (I understand this is already planned - https://github.com/keithw/mosh/issues/2 ).  It may be that the option for sessions with multiple windows and tabs (as well as scrollback) would improve the experience.

  Here is the experience I'd like to see with mosh:

  My current setup is to use the iTerm terminal program on my mac with tmux.  iTerm interacts very nicely with tmux - there is a one-to-one mapping of tmux windows with iTerm windows and tmux tabs with iTerm tabs.  This works because tmux exposes a control protocol.  See https://code.google.com/p/iterm2/wiki/TmuxIntegration and http://www.openbsd.org/cgi-bin/man.cgi?query=tmux&sektion=1#CONTROL+MODE  My current understanding is that the tmux control protocol and the mosh synchronisation protocols fulfil similar roles - the tmux protocol can handle more complex sessions, and on the other hand the mosh protocol handles unreliable transport.  iTerm acts like mosh-client for the tmux control mode protocol.

  I use my setup as follows: in an iTerm terminal on my mac I ssh into a server.  I then run 'tmux -CC' on the server.  iTerm on the mac detects that tmux has started in control mode and so starts behaving as a tmux frontend.  It generally opens a new window for a new tmux session, but you can ask it to attach to a previous session (whereupon it will open new local windows for each tmux window).  You can then use normal mac UI - scrolling, moving windows around, etc - to interact with the windows and they work like ordinary mac terminal windows.  If you open a new tab locally then you get a new tmux tab on the remote machine.  Everything feels like you're working locally (or like you've opened a remote instance of a terminal program displaying locally using X forwarding).

  The one advantage mosh has is the 'mobile' part.  If the ssh link above fails then the remote iTerm windows freeze.  You can 'force close' the local tmux session, ssh back in and re-attach to the remote session which will reopen all your windows, but it isn't seamless like mosh.  autossh can make things better, but it still isn't as good as mosh.

  I can't just run tmux in control mode on top of mosh.  The tmux control link is not a screen state to be synchronised, but a protocol running over a stream, so tmux -CC doesn't work.

  What I'd like is for there to be a native terminal program on my mac supporting the mosh-client protocol.  With just the addition of a scrollback buffer in mosh-server you'd get mostly the experience I currently get, with the exception that every new tab would need its own mosh connection.  That means an additional login experience (which can be mitigated with the right ssh-agent setup, but still requires me to type 'mosh server' at the top of every tab).  If mosh-server also supported multiple windows/tabs within a single session like tmux, then one connection would allow easy opening and closing of windows and tabs.

  Is there any chance of this happening?  Would it be worth the added complexity?

Cheers,

Will             :-}

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.mit.edu/pipermail/mosh-users/attachments/20131203/d4942984/attachment.htm


More information about the mosh-users mailing list