From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Duncan Greatwood Newsgroups: gmane.emacs.bugs Subject: bug#72450: 29.1; Tramp Failed to Parse OS Name and Version for Windows 11 Date: Wed, 7 Aug 2024 14:46:29 -0700 Message-ID: References: <86y15cucg3.fsf@gnu.org> <87frrkk7ze.fsf@gmx.de> <867ccwsl77.fsf@gnu.org> <87bk28k1yy.fsf@gmx.de> <8634nksh16.fsf@gnu.org> <877ccwk142.fsf@gmx.de> <861q34sgb3.fsf@gnu.org> <874j7zpe62.fsf@gmx.de> <87zfpqm73s.fsf@gmx.de> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="00000000000072c3c0061f1ed8af" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="8883"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Eli Zaretskii , dgbulk@gmail.com, 72450@debbugs.gnu.org To: Michael Albinus Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Aug 07 23:48:59 2024 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 1sboWg-00023v-Hw for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 07 Aug 2024 23:48:58 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sboWM-0007Rw-F2; Wed, 07 Aug 2024 17:48:38 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sboWK-0007RT-NA for bug-gnu-emacs@gnu.org; Wed, 07 Aug 2024 17:48:36 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sboWK-00013S-D7 for bug-gnu-emacs@gnu.org; Wed, 07 Aug 2024 17:48:36 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=Date:From:In-Reply-To:References:MIME-Version:To:Subject; bh=VR0MvJQRI+lQm3BOrbaM6z2Yaeox2VokXjkQW6e1XTs=; b=dfgJfL+1EVU+3GSnAPntamByNa+rU8eqS29IQqpJVHZCpb2BKs6Nu0eKO6f6FLAzdoyozIk3zkcdtfS0JrKV08Vcsn0DdPjRHalzmtu8xCSdqcY3U+aeQykhbCpwBkgn3jKYI2/URO8xgkfeFQM+w287L0Is93q7P++xA3jZ4Af/K6ItbbZ5a1QxzJiVrYaXmuKlDdo4EJDrNxoHgPxxzzzAP57gQNF7TYc3zeO0P9HsEiKPCLJUwCiFRdt5cpXK/Bf/DBunm1Wwjhnn7jIPlBMH6FZ4ytvpMuG3dBHK1Pbm7FLKSrZbX7rcJFpo1UlCrjfNR11eqCFyhaBrN7SrYA==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1sboWk-0003iI-0q for bug-gnu-emacs@gnu.org; Wed, 07 Aug 2024 17:49:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Duncan Greatwood Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 07 Aug 2024 21:49:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 72450 X-GNU-PR-Package: emacs Original-Received: via spool by 72450-submit@debbugs.gnu.org id=B72450.172306730014216 (code B ref 72450); Wed, 07 Aug 2024 21:49:01 +0000 Original-Received: (at 72450) by debbugs.gnu.org; 7 Aug 2024 21:48:20 +0000 Original-Received: from localhost ([127.0.0.1]:35184 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sboW3-0003hE-5Q for submit@debbugs.gnu.org; Wed, 07 Aug 2024 17:48:19 -0400 Original-Received: from mail-lj1-f180.google.com ([209.85.208.180]:52609) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sboW0-0003gz-Od for 72450@debbugs.gnu.org; Wed, 07 Aug 2024 17:48:18 -0400 Original-Received: by mail-lj1-f180.google.com with SMTP id 38308e7fff4ca-2f01e9f53e3so3841411fa.1 for <72450@debbugs.gnu.org>; Wed, 07 Aug 2024 14:47:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1723067204; x=1723672004; darn=debbugs.gnu.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=VR0MvJQRI+lQm3BOrbaM6z2Yaeox2VokXjkQW6e1XTs=; b=YqM0ckQJvBxfN3RISf0V1PCHylXfMn2O/kFHKuaGFd/AGzwBwBc83NBgEQbbRnZ5jI +1BCsggCEYul59oAeSzScf/uj8rW9MKLZMMRzWf8VDgeSVA8w1u1xirxqKy66CfmZv0h rJCeDg6NApxKCArU+4pEl2scCgv7rfVdbJEzRIVypAQbroQqhUMrd6sLOwgVcjstimiU LlDm/WdmjbkSwDWKzOo4KBdvXS91CzxvmUpUGyXRsdanzSAhybUC4FIM0ur06PcGX2pQ jAweCqbHg3xtTakfpK9rp6V1WbrOKuSBFGPpz8sgo3OlMVMYDc90ueDxew+zgvlM5Lg0 UYOg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1723067204; x=1723672004; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=VR0MvJQRI+lQm3BOrbaM6z2Yaeox2VokXjkQW6e1XTs=; b=qHS8OPeUDOjvsb2hZ9AihPlXRmCx9Djj/MYgKmhYabdfz5C3gq5khkz+1ZPrTB0yLI qf5fEqPzp2N+BSyfyDss3ogRD0E75pJhF8dKhjcEhBLMFeoKd6r7+PjPRp5mPQFUe835 niLoxGX20Em0UHVlUdgu3hwDy12goH85AVr8UbO5q0rZhGlVBuAu+CFfjUuV+CW92elu A3XMzg8h/basT27lkFgHwlHo/L0m75WIKUykzlQRW6/6gAmYbgflwjcwizUL01pYr6TR IMhC3Epeb4R1qJ2VuzZegJMmctu6qzbVN5gZwlp2ofg+KWzhjP80/lMHPVKWlbmMfGHM DOdw== X-Forwarded-Encrypted: i=1; AJvYcCX//M87FLgzPqaw8CmO4BVwhmVO+A1v4jG0tacNbOzPClNlrDiUFL8N1gSnu4JZ8XuJfBKx0Vo9FK/Mn1s5WeBoq++6OIM= X-Gm-Message-State: AOJu0YwSgKTuOdpM32/WgijCelP3O+QskVluvJy6T8f+IYgHaRvhcPp4 Qb7Dqg6Qo99KSvJ/53QU8qFpN3vQ7erPqMuu9ujh35ouRFITVcH7s3jOg4Ld X-Google-Smtp-Source: AGHT+IE8ib0wns3At25ZG1ymEqvfFj+rjZYWjOTHoi/pD8PF3EZJmhsJs0CuV0F1EADYegNo0azOng== X-Received: by 2002:a05:6512:104b:b0:52e:932d:88ab with SMTP id 2adb3069b0e04-530bb38c968mr17256855e87.23.1723067203256; Wed, 07 Aug 2024 14:46:43 -0700 (PDT) Original-Received: from mail-lj1-f178.google.com (mail-lj1-f178.google.com. [209.85.208.178]) by smtp.gmail.com with ESMTPSA id 2adb3069b0e04-530de4578cdsm385976e87.122.2024.08.07.14.46.41 for <72450@debbugs.gnu.org> (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 07 Aug 2024 14:46:41 -0700 (PDT) Original-Received: by mail-lj1-f178.google.com with SMTP id 38308e7fff4ca-2ef248ab2aeso3795421fa.0 for <72450@debbugs.gnu.org>; Wed, 07 Aug 2024 14:46:41 -0700 (PDT) X-Forwarded-Encrypted: i=1; AJvYcCXAfh9UrCHdJnf63tFHZmjqz4U3fUdJDwu7ZFwlqPMVRtkQBbPkePigulGbHyg0rkPfiENdTB+j4PObpL2Fet01FsigTgg= X-Received: by 2002:a05:6512:685:b0:52c:dd94:bda9 with SMTP id 2adb3069b0e04-530bb3bc331mr15599478e87.56.1723067201126; Wed, 07 Aug 2024 14:46:41 -0700 (PDT) In-Reply-To: <87zfpqm73s.fsf@gmx.de> X-Gmail-Original-Message-ID: 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-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:289905 Archived-At: --00000000000072c3c0061f1ed8af Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Thank you for reviewing the file. Re: > [?25l[2J[m[Hsh-5.2$[1C]0;C:\Windows\system32\conhost.exe [?25h The actual prompt that appears on the screen is: sh-5.2$ Please note that "C:\Windows\system32\conhost.exe" is not a prompt, it is not output as text on the terminal, it is the "job name" that Windows provides. (FYI, conhost.exe is the core Windows process that provides any prompt, whether PowerShell, command prompt, or bash/sh). As a point of comparison, when I ssh to a Linux machine the "job name" is simply ssh. I don't know why the string emacs-tramp is seeing as the prompt appears to include the job name and those control characters. I have looked on client side and server side, and don't see a way of suppressing/changing the job name in Window's OpenSSH, nor the control characters either. I tried it in iTerm and in Terminal. I tried it from macOS (with ssh proxy) and from Linux (no proxy). All the same failure. Unless there can be different handling in respect of the job name, I don't see an approach to use ssh to access the windows box with tramp. Unless you have any other suggestions :-) Thanks again. On Tue, Aug 6, 2024 at 12:41=E2=80=AFAM Michael Albinus wrote: > Duncan Greatwood writes: > > Hi Duncan, > > > Then I used the normal tramp /ssh:... form to open LINUX-MOUNT-DIR and > > then open a file contained on the mount. I.e. With emacs running on > > macOS, this is going macOS -> (ssh) -> Linux -> (smb) -> Windows. And > > it seems to work just as you'd hope. > > Good to know that you have a working solution. > > > Set tramp-verbose to 6 in a new Emacs session, prior the ssh > > connection. When it has failed, there is a *debug tramp/ssh ...* > > buffer; please send it as attachment. > > > > [DG] Firstly, my apologies - I can't recreate the "uname parsing > > issue" directly now. Instead, emacs will go to a time out trying to > > access the Windows machine via the ssh proxy. I don't know what's > > changed. > > > > In any case, I am enclosing the debug output file. It is 86MB, so I am > > sharing via Google Drive, hopefully that's OK. > > > https://drive.google.com/file/d/1aH1c-58rfOmjKVBqqfJ9QpzY5m-ltmDQ/view?us= p=3Dsharing > > > > This is with the Windows machine using /usr/bin/sh as the default > > shell for ssh login. Confirmed at the client command prompt - if I do > > "ssh WINDOWS", I log in and get the "sh" prompt. > > According to the debug file, Tramp is blocked now at an earlier > stage. From your proxy host, it sends > > --8<---------------cut here---------------start------------->8--- > 14:52:19.860849 tramp-send-command (6) # exec ssh -l dgrea -o > ControlMaster=3Dauto -o ControlPath=3Dtramp.%C -o ControlPersist=3Dno -e = none > WIN11_1HM > --8<---------------cut here---------------end--------------->8--- > > In its working buffer, it sees then after a timeout of one minute > > --8<---------------cut here---------------start------------->8--- > 14:53:19.871637 tramp-process-actions (1) # File error: Timeout reached, > see buffer =E2=80=98*tramp/ssh dgrea@WIN11_1HM*=E2=80=99 for details > tput: No value for $TERM and no -T specified > tput: No value for $TERM and no -T specified > [?25l[2J[m[Hsh-5.2$[1C]0;C:\Windows\system32\conhost.exe [?25h > --8<---------------cut here---------------end--------------->8--- > > The tput warnings can be ignored. But the last line is the shell prompt > offered to Tramp. It doesn't understand it. > > Please read the Tramp manual, how to simplify the prompt in order to let > Tramp understand it. Escape sequences and a (Windows-syntax) path are > good to confuse Tramp. > > Best regards, Michael. > --=20 NOTICE: This email and its attachments may contain privileged and=20 confidential information, only for the viewing and use of the intended=20 recipient. If you are not the intended recipient, you are hereby notified= =20 that any disclosure, copying, distribution, acting upon, or use of the=20 information contained in this email and its attachments is strictly=20 prohibited and that this email and its attachments must be immediately=20 returned to the sender and deleted from your system. If you received this= =20 email erroneously, please notify the sender immediately.=C2=A0 Xage Securit= y,=20 Inc. and its affiliates will never request personal information (e.g.,=20 passwords, Social Security numbers) via email.=C2=A0 Report suspicious emai= ls to=20 security-alerts@xage.com --00000000000072c3c0061f1ed8af Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Thank you for reviewing the file.

Re:= =C2=A0
[?25l[2J[= m[Hsh-5.2$[1C]0;C:\Windows\system32\conhost.exe [?25h

=
The actual prompt that appears on the screen is:
sh-5.= 2$=C2=A0

Please note that "C:\Windows\sy= stem32\conhost.exe" is not a prompt, it is not output=C2=A0as text on = the terminal, it is the "job name" that Windows provides. (FYI, c= onhost.exe is the core Windows process=C2=A0that provides=C2=A0any prompt, = whether PowerShell, command prompt, or bash/sh).

=
As a point of comparison, when I ssh to a Linux machine the "= ;job name" is simply ssh.

I don't k= now why the string emacs-tramp is seeing as the prompt appears to include t= he job name and those control characters. I have looked on client side and = server side, and don't see a way of suppressing/changing the job name i= n Window's=C2=A0OpenSSH, nor the=C2=A0control characters either.
<= div>
I tried it in iTerm and in Terminal. I tried it from mac= OS (with ssh proxy) and from Linux (no proxy). All the same failure.
<= div>
Unless there can be different handling in respect of the= job name, I don't see an approach to use ssh to access the windows box= with tramp.

Unless you have any other suggestions= :-)
Thanks again.


<= br>

On Tue, Aug 6, 2024 at 12:41=E2=80=AFAM Michael Albinus <= ;michael.albinu= s@gmx.de> wrote:
Duncan Greatwood <dgreatwood@gmail.com> writes:

Hi Duncan,

> Then I used the normal tramp /ssh:... form to open LINUX-MOUNT-DIR and=
> then open a file contained on the mount. I.e. With emacs running on > macOS, this is going macOS -> (ssh) -> Linux -> (smb) -> W= indows. And
> it seems to work just as you'd hope.

Good to know that you have a working solution.

>=C2=A0 =C2=A0 =C2=A0Set tramp-verbose to 6 in a new Emacs session, prio= r the ssh
>=C2=A0 =C2=A0 =C2=A0connection. When it has failed, there is a *debug t= ramp/ssh ...*
>=C2=A0 =C2=A0 =C2=A0buffer; please send it as attachment.
>
> [DG] Firstly, my apologies - I can't recreate the "uname pars= ing
> issue" directly now. Instead, emacs will go to a time out trying = to
> access the Windows machine via the ssh proxy. I don't know what= 9;s
> changed.
>
> In any case, I am enclosing the debug output file. It is 86MB, so I am=
> sharing via Google Drive, hopefully that's OK.
> https://dri= ve.google.com/file/d/1aH1c-58rfOmjKVBqqfJ9QpzY5m-ltmDQ/view?usp=3Dsharing
>
> This is with the Windows machine using /usr/bin/sh as the default
> shell for ssh login. Confirmed at the client command prompt - if I do<= br> > "ssh WINDOWS", I log in and get the "sh" prompt.
According to the debug file, Tramp is blocked now at an earlier
stage. From your proxy host, it sends

--8<---------------cut here---------------start------------->8---
14:52:19.860849 tramp-send-command (6) # exec ssh -l dgrea -o ControlMaster= =3Dauto -o ControlPath=3Dtramp.%C -o ControlPersist=3Dno -e none WIN11_1HM<= br> --8<---------------cut here---------------end--------------->8---

In its working buffer, it sees then after a timeout of one minute

--8<---------------cut here---------------start------------->8---
14:53:19.871637 tramp-process-actions (1) # File error: Timeout reached, se= e buffer =E2=80=98*tramp/ssh dgrea@WIN11_1HM*=E2=80=99 for details
tput: No value for $TERM and no -T specified
tput: No value for $TERM and no -T specified
[?25l[2J[m[Hsh-5.2$[1C]0;C:\Windows\system32\conhost.exe [?25h
--8<---------------cut here---------------end--------------->8---

The tput warnings can be ignored. But the last line is the shell prompt
offered to Tramp. It doesn't understand it.

Please read the Tramp manual, how to simplify the prompt in order to let Tramp understand it. Escape sequences and a (Windows-syntax) path are
good to confuse Tramp.

Best regards, Michael.

NOTICE: This email and its attachmen= ts may contain privileged and confidential information, only for the viewin= g and use of the intended recipient. If you are not the intended recipient,= you are hereby notified that any disclosure, copying, distribution, acting= upon, or use of the information contained in this email and its attachment= s is strictly prohibited and that this email and its attachments must be im= mediately returned to the sender and deleted from your system. If you recei= ved this email erroneously, please notify the sender immediately.=C2=A0 Xag= e Security, Inc. and its affiliates will never request personal information= (e.g., passwords, Social Security numbers) via email.=C2=A0 Report suspici= ous emails to
security= -alerts@xage.com
--00000000000072c3c0061f1ed8af--