On Fri, 21 Dec 2012 20:42:44 +0100 Michael Albinus <michael.albi...@gmx.de> 
wrote: 

MA> Ted Zlatanov <t...@lifelogs.com> writes:
>> With your code that works for you, from Debian to CentOS, I'm getting a
>> hang (only `C-g' aborts) to localhost or to wd01, and mosh-client is
>> running so the "mosh" command is hanging without output.  The level 10
>> debug log is below.  I don't see any output from the process filter.
>> Weird.

MA> Please use tramp-verbose 10. For me it is hanging as well; your filter
MA> implementation is missing :-)

OK.  I had it set to 9 and was convinced it was 10.  Sorry.

I added some improvements to the "mosh" `tramp-login-args' to set the
prompt even if the TERM is not dumb:

#+begin_src lisp
(add-to-list 'tramp-methods
  '("mosh"
    (tramp-login-program        "mosh")
    (tramp-login-args           (("-p" "%p") ("--") ("%h")
                                 ("/bin/env" "PS1=% " "/bin/sh")))
    (tramp-remote-shell         "/bin/sh")
    (tramp-remote-shell-args    ("-c"))
    (tramp-copy-keep-date       t)
    (tramp-copy-recursive       t)
    (tramp-gw-args              (("-o" "GlobalKnownHostsFile=/dev/null")
                                 ("-o" "UserKnownHostsFile=/dev/null")
                                 ("-o" "StrictHostKeyChecking=no")))
    (tramp-process-precommands ("stty rows 25" "stty cols 80"))
    (tramp-process-filter       tramp-mosh-process-filter)
    (tramp-default-port         22)))

#+end_src

Unfortunately even if TERM=dumb, mosh keeps sending ANSI escape
sequences, so I don't have that above as there's no point.

See attached for a partial filter implementation.  It wipes color
sequences and cursor hide/show, and generally converts positional escape
sequences to \n.  I think it needs much more awareness of the 25x80
screen, though, so I may make it smarter if necessary.  If you try it,
Tramp will lock in a loop checking for remote echo.  Is that because the
screen updates need to be smarter (e.g. redrawing a line should resend
the whole line)?  If so I will work on the filter improvements, but I
wanted to make sure the implementation otherwise is OK, especially the
`tramp-login-args' above.

Thanks for your help!
Ted

_______________________________________________
Tramp-devel mailing list
Tramp-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/tramp-devel

Reply via email to