From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Erik Hetzner Newsgroups: gmane.emacs.bugs Subject: bug#46466: 28.0.50; Tramp hangs with bad prompt even when using /bin/sh Date: Sun, 14 Feb 2021 09:28:20 -0800 Message-ID: <60295db5.1c69fb81.b419a.01e7@mx.google.com> References: <6026c5a7.1c69fb81.20d04.54d1@mx.google.com> <87eehkbb74.fsf@gmx.de> <60280767.1c69fb81.2aa53.b38c@mx.google.com> <874kiebtqu.fsf@gmx.de> Reply-To: Erik Hetzner Mime-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="27350"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI-EPG/1.14.7 (Harue) FLIM-LB/1.14.9 (=?UTF-8?Q?Goj=C5=8D?=) APEL-LB/10.8 EasyPG/1.0.0 Emacs/28.0.50 (x86_64-pc-linux-gnu) MULE/6.0 (HANACHIRUSATO) Cc: 46466@debbugs.gnu.org To: Michael Albinus Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Feb 14 18:29:24 2021 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lBLD1-00071W-LU for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 14 Feb 2021 18:29:23 +0100 Original-Received: from localhost ([::1]:41610 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lBLD0-0002ZJ-LP for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 14 Feb 2021 12:29:22 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:56510) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lBLCg-0002Z6-Sl for bug-gnu-emacs@gnu.org; Sun, 14 Feb 2021 12:29:02 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:53325) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lBLCg-0000Ec-Lw for bug-gnu-emacs@gnu.org; Sun, 14 Feb 2021 12:29:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lBLCg-00084Y-Hp for bug-gnu-emacs@gnu.org; Sun, 14 Feb 2021 12:29:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Erik Hetzner Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 14 Feb 2021 17:29:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 46466 X-GNU-PR-Package: emacs Original-Received: via spool by 46466-submit@debbugs.gnu.org id=B46466.161332371030992 (code B ref 46466); Sun, 14 Feb 2021 17:29:02 +0000 Original-Received: (at 46466) by debbugs.gnu.org; 14 Feb 2021 17:28:30 +0000 Original-Received: from localhost ([127.0.0.1]:36638 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lBLC9-00083o-QO for submit@debbugs.gnu.org; Sun, 14 Feb 2021 12:28:30 -0500 Original-Received: from mail-pl1-f171.google.com ([209.85.214.171]:34699) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lBLC8-00083b-51 for 46466@debbugs.gnu.org; Sun, 14 Feb 2021 12:28:28 -0500 Original-Received: by mail-pl1-f171.google.com with SMTP id ba1so2458618plb.1 for <46466@debbugs.gnu.org>; Sun, 14 Feb 2021 09:28:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=message-id:sender:date:from:to:cc:subject:in-reply-to:references :user-agent:reply-to:mime-version:content-transfer-encoding; bh=nn+yMcBRmpfQ+JQFBbSwCYqPqaAQGlWdYDOU/rw1RyY=; b=aHStBfbX3uu3HGJSJ7I46fQMQKVeVyMGr6HjyiGao4Zn4BWEeCqZkNywnwDKeVdCFx 5MJiDL28cAG+sq9tmT8OGkAplG0pcvmzh/I1feTQIyx9Swi9C1PUF7E1xipl+Myv1q9u LriGDaW+CPR/nCOfaBaMJBuXELckLxeBq/Mu9CcFQYiAIcNIkwDoJw+7iqAz0o8tjE0z GSc/byy3Ezx4Tiphchlia2PLPCxutmvZbjFEZMDcWff6Fc4jGYqgUbrxiVAwMDFjJJ9C YDUHj/MBMnMMacTSqjWsPBWByx/KQgsqI9NuvQAD4GdqZW/H50DbrHNERT6hb+IgaKmw atvg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:message-id:sender:date:from:to:cc:subject :in-reply-to:references:user-agent:reply-to:mime-version :content-transfer-encoding; bh=nn+yMcBRmpfQ+JQFBbSwCYqPqaAQGlWdYDOU/rw1RyY=; b=aqQ0wacWT6x6vY3lLR73Hfl8TgwFAejTnDZGnTL54LNjWaAyEE3Jf/XTBf1R7k9KQn z/cqlVGdFpWlax4y4o/IEUBoXqbYUm9DflwOC18SPc21UYXOUMia6x0yISILypnSLZij kKSmj5mR0v6khwQ0QYf7lHvtqyTWgh4r5qgpSO53OeDO9DxmC2pbErPCeBYkLBZu9mHl QmL6yGuphHQKUl+Md1y/8iDp1ZYF4dC7nXMGk1qFIzBoGDhB8X5gwe6zWYmfnl0imSN7 uAMoww3TwejvwlQCMEiEtYPiP9T2569n2AK9SCVifqCtR1v8WchwnWW45FoersRqt9kZ nXbA== X-Gm-Message-State: AOAM5301cw2fJVqhvUiaGalvt80iJTgxQo0PBWJy2C6qtXTd8DLqhS30 bQvNJD9zA5E8DFf/iuFY5fg= X-Google-Smtp-Source: ABdhPJxphyXMpbL8b/p0QmQKnnw0IujYkA5dcjsTa9/0Nlo+/1ODizjCYj/Go7pn0Tgz7qEEgYSOjw== X-Received: by 2002:a17:90a:e17:: with SMTP id v23mr12442306pje.193.1613323702040; Sun, 14 Feb 2021 09:28:22 -0800 (PST) Original-Received: from michel.e6h.org ([76.126.215.191]) by smtp.gmail.com with ESMTPSA id c23sm15048299pfi.47.2021.02.14.09.28.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 14 Feb 2021 09:28:21 -0800 (PST) In-Reply-To: <874kiebtqu.fsf@gmx.de> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:200019 Archived-At: Hi Michael, On Sun, 14 Feb 2021 06:37:29 -0800, Michael Albinus wrote: >=20 > [=E2=80=A6] >=20 > Hmm, this doesn't count then. You have reported, that .bash_profile was > used for user "test". What is the default shell for that user? Sorry, I also should have mentioned that! The default shell is bash, which seems to be the underlying issue. tramp starts a bash shell before execing /bin/sh. > [=E2=80=A6] >=20 > We cannot hijack the argument "RemoteCommand" by default. There are > several reasons. >=20 > - People might have own values for that argument. For example, on my > QNAP NAS devices it isn't possible to use ssh out-of-the-box for > scripting, because QNAP starts the "Console Management" program, which > is in the way. In order to fix this, I have added for all my QNAP NAS > devices the following line in the respective .ssh/config entries: >=20 > RemoteCommand /bin/sh -noprofile -noediting -norc -i >=20 > - If the RemoteCommand argument is set, it isn't possible any longer to > use direct async processes in Tramp. See (info "(tramp) Remote processe= s") I see, thanks! > > It is also possible to set the PS1 value directly with this remote > > command, e.g. `("-o" "RemoteCommand=3D'PS1=3D\"$ \" %l'")`, which might > > provide even more safety against unusual prompts. >=20 > Maybe, but this should be better done with the SetEnv argument. >=20 > > Is this a patch that would be welcome? It would fix cases where users > > had more elaborate prompts in their default shell and where /bin/sh > > was a simpler shell (debian and ubuntu, at least). Unusual prompts are > > more and more popular, but users to do not usually enable them for > > /bin/sh. However, it might have effects that I am not aware of. >=20 > As said, the patch cannot be applied as-is. However, I'm open for all > proposals, because this is indeed a common problem users blame Tramp abou= t. Thank you so much for these explanations. Tramp is a great product and I know that it has made a lot of accommodations to a heterogeneous environment to make it work so well! I=E2=80=99ll keep exploring possible solutions for this. In the end, it might just be a suggestion in the manual or improvements to error reporting. Thanks again for your help. best, Erik