unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Erik Hetzner <egh@e6h.org>
To: Michael Albinus <michael.albinus@gmx.de>
Cc: 46466@debbugs.gnu.org
Subject: bug#46466: 28.0.50; Tramp hangs with bad prompt even when using /bin/sh
Date: Wed, 16 Jun 2021 07:38:03 -0700	[thread overview]
Message-ID: <60ca0cd5.1c69fb81.c882a.6ae1@mx.google.com> (raw)
In-Reply-To: <87pmwok5p5.fsf@gmx.de>

[-- Attachment #1: Type: text/plain, Size: 1558 bytes --]

Hi Michael,

On Mon, 14 Jun 2021 05:10:14 -0700,
Michael Albinus <michael.albinus@gmx.de> wrote:
> 
> Erik Hetzner <egh@e6h.org> writes:
> 
> > Hi Michael,
> 
> Hi Erik,
> 
> > 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’ll keep exploring possible
> > solutions for this. In the end, it might just be a suggestion in the
> > manual or improvements to error reporting.
> 
> This bug is still open. Is there something else I could do? Otherwise,
> I'd like to close it.

Thank you for the reminder. While revisiting this issue I came across
an alternate fix: adding %l to the tramp-login-args for ssh. I suspect
there is a reason this is not a viable fix, but I’m not sure what it
is. I’ve been using it locally for a while. There is a patch below, or
here is a snippet to try locally:

(setq tramp-methods (assoc-delete-all "ssh" tramp-methods #'string=))
(add-to-list 'tramp-methods
             `("ssh"
               (tramp-login-program        "ssh")
               (tramp-login-args           (("-l" "%u") ("-p" "%p") ("%c")
        			            ("-e" "none") ("%h") ("%l")))
               (tramp-async-args           (("-q")))
               (tramp-direct-async         t)
               (tramp-remote-shell         ,tramp-default-remote-shell)
               (tramp-remote-shell-login   ("-l"))
               (tramp-remote-shell-args    ("-c")))))

best, Erik


[-- Attachment #2: 0001-Use-remote-shell-from-the-start-in-Tramp-ssh-method-.patch --]
[-- Type: text/plain, Size: 1041 bytes --]

From b20a16ae9001bf1f89ffb6767095dedef04f56b3 Mon Sep 17 00:00:00 2001
From: Erik Hetzner <egh@e6h.org>
Date: Wed, 16 Jun 2021 07:23:08 -0700
Subject: [PATCH] Use remote shell from the start in Tramp ssh method
 (bug#46466)

    * lisp/net/tramp-sh.el (tramp--with-startup): Add %l to
    tramp-login-args for ssh tramp-method.
---
 lisp/net/tramp-sh.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lisp/net/tramp-sh.el b/lisp/net/tramp-sh.el
index b613ad3f8e..921af6e7c3 100644
--- a/lisp/net/tramp-sh.el
+++ b/lisp/net/tramp-sh.el
@@ -224,7 +224,7 @@ tramp-scp-strict-file-name-checking
               `("ssh"
                 (tramp-login-program        "ssh")
                 (tramp-login-args           (("-l" "%u") ("-p" "%p") ("%c")
-				             ("-e" "none") ("%h")))
+				             ("-e" "none") ("%h") ("%l")))
                 (tramp-async-args           (("-q")))
                 (tramp-direct-async         t)
                 (tramp-remote-shell         ,tramp-default-remote-shell)
-- 
2.30.2

  reply	other threads:[~2021-06-16 14:38 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-12 18:14 bug#46466: 28.0.50; Tramp hangs with bad prompt even when using /bin/sh Erik Hetzner
2021-02-13  8:53 ` Michael Albinus
2021-02-13 17:07   ` Erik Hetzner
2021-02-14 14:37     ` Michael Albinus
2021-02-14 17:28       ` Erik Hetzner
2021-06-14 12:10         ` Michael Albinus
2021-06-16 14:38           ` Erik Hetzner [this message]
2021-06-19  8:48             ` Michael Albinus
2021-06-24  4:40               ` Erik Hetzner
2021-06-24 15:19                 ` Michael Albinus

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=60ca0cd5.1c69fb81.c882a.6ae1@mx.google.com \
    --to=egh@e6h.org \
    --cc=46466@debbugs.gnu.org \
    --cc=michael.albinus@gmx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).