From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: raphael.berbain@gmail.com (=?utf-8?Q?Rapha=C3=ABl?= Berbain) Newsgroups: gmane.emacs.help Subject: Re: remote tramp hangs Date: Thu, 03 Dec 2009 12:22:39 +0100 Organization: Guest of ProXad - France Message-ID: References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Trace: ger.gmane.org 1259840561 8128 80.91.229.12 (3 Dec 2009 11:42:41 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 3 Dec 2009 11:42:41 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Dec 03 12:42:32 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 1NGA4u-0005Mv-6Q for geh-help-gnu-emacs@m.gmane.org; Thu, 03 Dec 2009 12:42:32 +0100 Original-Received: from localhost ([127.0.0.1]:36897 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NGA4t-0008BA-Sm for geh-help-gnu-emacs@m.gmane.org; Thu, 03 Dec 2009 06:42:31 -0500 Original-Path: news.stanford.edu!usenet.stanford.edu!news.tele.dk!news.tele.dk!small.news.tele.dk!proxad.net!feeder1-2.proxad.net!cleanfeed3-a.proxad.net!nnrp7-2.free.fr!not-for-mail Original-Newsgroups: gnu.emacs.help User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux) Mail-Copies-To: never Cancel-Lock: sha1:1lvmWvdzscyr4kU+CKpRjuRcBzg= Original-Lines: 28 Original-NNTP-Posting-Date: 03 Dec 2009 12:34:00 MET Original-NNTP-Posting-Host: 82.231.40.223 Original-X-Trace: 1259840040 news-1.free.fr 13085 82.231.40.223:54917 Original-X-Complaints-To: abuse@proxad.net Original-Xref: news.stanford.edu gnu.emacs.help:175281 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:70354 Archived-At: * Raphaƫl Berbain: > * Michael Albinus: > >>> 11:52:54.727166 tramp-send-command (6) # exec env ENV='' PROMPT_COMMAND='' PS1=\$\ PS2='' PS3='' /bin/sh >>> 11:52:55.883214 tramp-accept-process-output (10) # >>> exec env ENV='' PROMPT_COMMAND='' PS1=\$\ PS2='' PS3='' /bin/sh >>> # >> >> Tramp starts /bin/sh on the remote host, and expects "$ " as prompt (see >> PS1). But the prompt is still "# ". That is NOT OK. >> >> Is there something in the .profile of root, which overrides the PS1 >> settings? > > Not that I know of, but then... More on that: Host is openbsd 4.5, where sh actually is ksh. http://www.openbsd.org/cgi-bin/man.cgi?query=ksh&apropos=0&sektion=0&manpath=OpenBSD+4.5&arch=i386&format=html says: """The default prompt is `$ ' for non-root users, `# ' for root. If ksh is invoked by root and PS1 does not contain a `#' character, the default value will be used even if PS1 already exists in the environment.""" Curiously, "sh" man page doesn't say that... but sh still does it. Changing the PS1 sent by tramp to include '#' (i.e. "#$ ") works around that shell behaviour.