From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Michael Albinus Newsgroups: gmane.emacs.help Subject: Re: Tramp and BusyBox problem? Date: Thu, 19 Mar 2009 17:39:33 +0100 Message-ID: <87wsal79h6.fsf@gmx.de> References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Trace: ger.gmane.org 1237484509 2356 80.91.229.12 (19 Mar 2009 17:41:49 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 19 Mar 2009 17:41:49 +0000 (UTC) Cc: help-gnu-emacs@gnu.org To: Mats =?iso-8859-1?Q?L=F6fdahl?= Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Mar 19 18:43:05 2009 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1LkMGa-0002B2-I8 for geh-help-gnu-emacs@m.gmane.org; Thu, 19 Mar 2009 18:42:52 +0100 Original-Received: from localhost ([127.0.0.1]:48243 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LkMFD-0003rv-TS for geh-help-gnu-emacs@m.gmane.org; Thu, 19 Mar 2009 13:41:27 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LkLHb-00019G-Ce for help-gnu-emacs@gnu.org; Thu, 19 Mar 2009 12:39:51 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LkLHV-00015V-Vr for help-gnu-emacs@gnu.org; Thu, 19 Mar 2009 12:39:50 -0400 Original-Received: from [199.232.76.173] (port=59438 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LkLHV-00015B-MO for help-gnu-emacs@gnu.org; Thu, 19 Mar 2009 12:39:45 -0400 Original-Received: from mail.gmx.net ([213.165.64.20]:36663) by monty-python.gnu.org with smtp (Exim 4.60) (envelope-from ) id 1LkLHV-0003b6-0M for help-gnu-emacs@gnu.org; Thu, 19 Mar 2009 12:39:45 -0400 Original-Received: (qmail invoked by alias); 19 Mar 2009 16:39:36 -0000 Original-Received: from brln-4db92a18.pool.einsundeins.de (EHLO LKG29808F.local) [77.185.42.24] by mail.gmx.net (mp051) with SMTP; 19 Mar 2009 17:39:36 +0100 X-Authenticated: #3708877 X-Provags-ID: V01U2FsdGVkX1/J74pTx/PJ32wUmuoS64EdiQhSPND/BAe6jEZUpH NK9R6uWqgo/Rif In-Reply-To: ("Mats =?iso-8859-1?Q?L=F6fd?= =?iso-8859-1?Q?ahl=22's?= message of "Tue\, 17 Mar 2009 23\:30\:27 +0100") User-Agent: Gnus/5.110006 (No Gnus v0.6) Emacs/21.4 (gnu/linux) X-Y-GMX-Trusted: 0 X-FuHaFi: 0.7 X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 3) X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:63101 Archived-At: --=-=-= Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable Mats L=F6fdahl writes: > I then started a fresh emacs and did the double attempt to connect as > root. To me it looked just like last time but I've uploaded the debug > buffer anyway: http://www.solarphysics.kva.se/~mats/debug3.txt Things progress. Still an error, but at another place. Tramp has two problems with your Busybox: it echoes the commands, and it is slow. This case, when Tramp has send "PS1=3D'$ '", only the "PS1=3D'$" substring was visible in the output buffer, and Tramp thought it is a shell prompt. Then it has sent the next command, and it began to be confused by the not read characters. So we must convince Tramp there isn't a shell prompt, even if the command itself is echoed, and even if only a substring of the whole command is visible. The appended patch tries to catch this situation. Could you, please, test? Thanks, and best regards, Michael. --=-=-= Content-Type: text/x-patch Content-Disposition: attachment *** /tmp/tramp.el.~2.678.~ Thu Mar 19 17:35:00 2009 --- /tmp/tramp.el Thu Mar 19 17:35:00 2009 *************** *** 5669,5675 **** (let ((tramp-end-of-output "$ ")) (tramp-send-command vec ! (format "PROMPT_COMMAND='' PS1='$ ' PS2='' PS3='' exec %s" shell) t)) ;; Setting prompts. (tramp-message vec 5 "Setting remote shell prompt...") --- 5669,5675 ---- (let ((tramp-end-of-output "$ ")) (tramp-send-command vec ! (format "PROMPT_COMMAND='' PS1=\\$\\ PS2='' PS3='' exec %s" shell) t)) ;; Setting prompts. (tramp-message vec 5 "Setting remote shell prompt...") *************** *** 5951,5957 **** (tramp-send-command vec (format ! "exec env ENV='' PROMPT_COMMAND='' PS1='$ ' PS2='' PS3='' %s" (tramp-get-method-parameter (tramp-file-name-method vec) 'tramp-remote-sh)) t) --- 5951,5957 ---- (tramp-send-command vec (format ! "exec env ENV='' PROMPT_COMMAND='' PS1=\\$\\ PS2='' PS3='' %s" (tramp-get-method-parameter (tramp-file-name-method vec) 'tramp-remote-sh)) t) --=-=-=--