tramp-devel
[Top][All Lists]
Advanced

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

Re: tramp (2.0.36); tramp-rsh-end-of-line needs to be changed in my conf


From: Greek0
Subject: Re: tramp (2.0.36); tramp-rsh-end-of-line needs to be changed in my configuration.
Date: Sun, 6 Jun 2004 12:56:38 +0200

On Sat, 05 Jun 2004 20:55:31 +0200
Michael Albinus <address@hidden> wrote:

> address@hidden writes:
> 
> > I'm using tramp with Emacs on Windows Xp. I want to connect to a
> > linux box via ssh using putty (0.53b). The ssh server is running
> > OpenSSH_3.8p1 Debian 1:3.8p1-2. The ssh/sshx methods using the
> > cygwin OpenSSH binaries didn't work at all out-of-the-box, but I
> > didn't dig into the problem, instead I looked at putty/plink. Using
> > plink the connection is opened, the password is prompted, but after
> > `stty -inlcr -echo kill '^U'` it doesn't recognize the shell prompt
> > any more, and after 30 seconds it gives up. The reason is that
> > tramp-send-command-internal uses tramp-rsh-end-of-line (per default
> > "\n") as line terminator, which seems to expand to CRLF on windows.
> > The server misinterprets this as 2 line breaks, which results in 2
> > command prompts in the new stty mode: "$ $ ". This is the case after
> > every command given, since the wrong line terminator is always used.
> >
> > I fixed this by setting tramp-rsh-end-of-line to \r in my .emacs
> > file, everything works fine thereafter. The documentation to that
> > variable says it normally doesn't need to be changed, and a
> > notification is requested otherwise.
> > I guess it really is a windows specific problem that \n expands to 2
> > characters. Another way to fix it would be to tell stty to recognize
> > CRLF as one line-break instead of two, although I don't know how to
> > do this properly.
> 
> See the discussion in variable `tramp-default-password-end-of-line'
> about this problem. I guess there is no consistent way to set it,
> otherwise Kai wouldn't have introduced it.

But still the tramp-rsh-end-of-line docs say that it shouldn't be
changed normally, perhaps a remark that it might be necessary with plink
would be nice. I don't know how often this is needed with plink, but if
it's more or less common, you should perhaps add paragraph to your
manual.

At first it really didn't look that tramp-rsh-end-of-line was the source
of the problem. I tried playing with the tramp-shell-prompt-pattern,
because I thought that's why the prompt isn't recognized. Then I thought
tramp-open-connection-setup-interactive-shell inserted an adiditional \n
somewhere, from there I dug into tramp-send-command-internal, where I
finally found tramp-rsh-end-of-line.
Long story short: It's not obvious to change tramp-rsh-end-of-line, so a
remark somewhere (aside from the documentation of a variable I didn't
even bother to look at in the beginning) would be nice.

Cheers,
Greek0




reply via email to

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