[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How do I debug this?

From: Michael Albinus
Subject: Re: How do I debug this?
Date: Fri, 25 Aug 2017 10:26:29 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (gnu/linux)

Mark Geary <address@hidden> writes:

Hi Mark,

> Right. So I'm connecting from a Linux box running Emacs 23.1.1 and Tramp
> 2.1.15. The remote machine is the same FreeBSD box I described earlier.

Well, that's pretty old. Recent Tramp 2.3 does not support Emacs 23, but
maybe you could upgrade to Tramp 2.2.13?

> Tramp finds the prompt on the remote machine.
> [Diversion: What's the purpose of "_echo^H^H^H^H^H"?]

That's a trick to handle echoing shells.

> But (for historical resons) my shell here is tcsh, so the ssh method
> falls apart when tramp tries to set PS1.

tcsh shall not be in the way. Tramp calls immediately /bin/sh, in order
to avoid non POSIX shell problems.

> I tried the sshx method, but it still hangs at the same spot. Here's
> the end of the debug buffer:
>     14:38:08 tramp-open-connection-setup-interactive-shell (5) # Remote echo 
> still on. Ok.
>     14:38:08 tramp-send-command (6) # _echo^H^H^H^H^Hstty icanon erase ^H 
> cols 32767_echo^H^H^H^H^H
>     14:38:08 tramp-check-for-regexp (5) # echo-mark found
>     14:38:08 tramp-wait-for-regexp (6) #
>     $
>     14:38:08 tramp-open-connection-setup-interactive-shell (5) # Setting 
> shell prompt
>     14:38:08 tramp-send-command (6) # _echo^H^H^H^H^HPS1='
>     ///3ada5f533267468984eeb5d8b77f38c3
>     '_echo^H^H^H^H^H
>     14:38:08 tramp-check-for-regexp (5) # echo-mark found

That's OK so far. Nothing more?

> I logged on the remote machine directly and started /bin/sh manually. It seems
> it drops newlines in PS1. Is this what is causing Tramp to hang at this point?

Maybe. In this case, we would need excessive debugging. Set
tramp-verbose to 10, and show us the whole debug buffer then.

> /usr/local/bin/bash appears to preserve newlines. So I created a new
> connection method, copying from sshx but changing /bin/sh to
> /usr/local/bin/bash.
> (add-to-list 'tramp-methods '("sshxbash" [...] )) ; Is there a better way to 
> do this in Tramp 2.1.15?

Likely not. Connection-local variables exist only since Emacs 26 / Tramp 2.3.

> The *debug tramp/sshxbash io* buffer appears to stop at the same point
> as with the sshx method. It doesn't seem too long, so I'll include it
> below.

Hard to read, because the mail programs wrap lines. Pls send again the
whole debug buffer (with tramp-verbose being 10) as attachment.

Best regards, Michael.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]