AW: Tramp on Windows connects to Linux but not to OSX

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

AW: Tramp on Windows connects to Linux but not to OSX

Schönes Wetter Schönes Gefühl

I've tried adding the recommended lines to ~/.profile but there's no change in situation. Anyway, that same problem happens in another Mac mini computer on which no iTerm2  installed, i.e. the problem must be  related to the core OSX.


Von Outlook gesendet.




Von: Michael Albinus <[hidden email]>
Gesendet: Mittwoch, 7. Februar 2018 12:24
An: Schönes Wetter Schönes Gefühl
Cc: [hidden email]
Betreff: Re: Tramp on Windows connects to Linux but not to OSX
 
Schönes Wetter Schönes Gefühl <[hidden email]> writes:

Hi Schönes Wetter Schönes Gefühl :-)

> Using Emacs-25.2.1 on Windows XP and 7, I try to connect to my Mac
> mini (OSX 10.7.4 Lion and 10.5.8 Leopard) using Tramp & plink method.
> After I enter the password, it hangs on with the "Found remote shell
> prompt..." message. The shell on OSX is plain old bash with no fancy
> decoration and the sshd is the default one at /usr/sbin. In both Macs,
> in addition to the default Terminal.app iTerm2 Terminal app is
> installed. If I try to connect to OSX using solely the plink on the
> CMD or MSYS shell, it connects flawlessly.

Well, reading the Tramp traces does not show too much,
unfortunately. But you made a point with iTerm2, see the Tramp manual,
chapter Frequently Asked Questions:

          A similar problem exist with the iTerm2 shell integration,
          which sends proprietary escape codes when starting a shell.
          This can be suppressed by changing the respective integration
          snippet in your ‘~/.profile’ like this:

               [ $TERM = "dumb" ] || \
               test -e "${HOME}/.iterm2_shell_integration.bash" && \
               source "${HOME}/.iterm2_shell_integration.bash"

Best regards, Michael.

_______________________________________________
Tramp-devel mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/tramp-devel
Reply | Threaded
Open this post in threaded view
|

Re: Tramp on Windows connects to Linux but not to OSX

Michael Albinus
Schönes Wetter Schönes Gefühl <[hidden email]> writes:

Hi,

> I've tried adding the recommended lines to ~/.profile but there's no
> change in situation. Anyway, that same problem happens in another Mac
> mini computer on which no iTerm2  installed, i.e. the problem must be
> related to the core OSX.

Finally, I've found the time to check your traces, again. In
<https://www.dropbox.com/s/egvz6f05ftgegje/TRAMP-fail-verbose-10.txt?dl=0>,
the last sent command is

12:10:09.591093 tramp-send-command (6) # set +o vi +o emacs

And it returns

12:10:09.645096 tramp-accept-process-output (10) # *tramp/plink [hidden email]* run *tramp/plink [hidden email]*
///38be31d77e4defe1824febc0ae885f7b#$///38be31d77e4defe1824febc0ae885f7b#$

which is the expected prompt twice. Well, this might be due to the
previous command

12:10:09.535090 tramp-send-command (6) # echo foo ; echo bar

Double-prompt problem, which I thought it wass solved for a long time. Hmm.

Could you try the following patch? It is created on the development
version of tramp-sh.el, line numbers might vary.

--8<---------------cut here---------------start------------->8---
diff --git a/lisp/tramp-sh.el b/lisp/tramp-sh.el
index f619ac30..0cdf42de 100644
--- a/lisp/tramp-sh.el
+++ b/lisp/tramp-sh.el
@@ -4175,7 +4175,7 @@ process to set up.  VEC specifies the connection."
       cs-encode
       (coding-system-change-eol-conversion
        cs-encode (if (string-match "^Darwin" uname) 'mac 'unix)))
- (tramp-send-command vec "echo foo ; echo bar" t)
+ (tramp-send-command vec "(echo foo ; echo bar)" t)
  (goto-char (point-min))
  (when (search-forward "\r" nil t)
   (setq cs-decode (coding-system-change-eol-conversion cs-decode 'dos)))
--8<---------------cut here---------------end--------------->8---

Best regards, Michael.

_______________________________________________
Tramp-devel mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/tramp-devel
Reply | Threaded
Open this post in threaded view
|

Re: Tramp on Windows connects to Linux but not to OSX

Michael Albinus
Michael Albinus <[hidden email]> writes:

Hi,

> Could you try the following patch? It is created on the development
> version of tramp-sh.el, line numbers might vary.

FTR, I've committed the patch to the Tramp repository. Will be available
with the next Tramp versions.

The upcoming Emacs 26.1 won't contain this patch, because it is frozen;
only fixing of regression errors is possible. So the patch will go into
Emacs 26.2, once development for this has started.

Best regards, Michael.

_______________________________________________
Tramp-devel mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/tramp-devel