tramp-devel
[Top][All Lists]
Advanced

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

Re: tramp (2.0.35); login not recognized


From: Kai Großjohann
Subject: Re: tramp (2.0.35); login not recognized
Date: Mon, 14 Jul 2003 14:33:04 +0200
User-agent: Gnus/5.1003 (Gnus v5.10.3) Emacs/21.3.50 (gnu/linux)

Sven Utcke <address@hidden> writes:

> --- snip ---
> Last login: Mon Jul 14 12:10:22 2003 from kogs2.informatik
> Sun Microsystems Inc.   SunOS 5.8       Generic Patch   October 2001
> You have new mail.
> kogs1>/home/utcke% 
> --- snip ---

The prompt regexp used by Tramp is (stripped down to the relevant
parts):

    ^[^%>]*[%>] *

I further append a $ to the regexp, for reasons explained below.  As
you can see, your prompt does not match this regexp (with $ appended)
because of the ">" in the middle.

Why do I require the prompt to match at end of line?

Well, in addition to "%" and ">", the real value also has "#".  And
"#" often occurs in the motd of Linux systems:

/----[ motd ]
| Linux lucy 2.4.20-ls6 #1 Sun Jun 15 12:43:07 CEST 2003 i686 unknown
                        ^
                        here
| The programs included with the Debian GNU/Linux system are free software;
| the exact distribution terms for each program are described in the
| individual files in /usr/share/doc/*/copyright.
| 
| Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
| permitted by applicable law.
\----

So, if $ was not appended to the regexp, it would recognize the first
line of /etc/motd as a shell prompt, which leads to weird behavior.


What can you do about it?

When Tramp logs in to the remote host, it sets $TERM to dumb.  So you
could change your shell init files to use a simple prompt for this
case.

The other alternative is to frob shell-prompt-pattern or
tramp-shell-prompt-pattern such that your prompt is recognized.

-- 
~/.signature




reply via email to

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