Wenguang Wang <[email protected]> writes: > Michael,
Hi, > I hope the error message is not "found remote shell prompt” when it > cannot find the shell prompt :) > > So I added the following line in the “~/.profile” of the Linux box: > > [[ $TERM == "dumb" ]] && PS1='$ ' && return That looks good. > This changed the shell prompt to “$ “. Then I ran the following > command: > > (setq tramp-shell-prompt-pattern "^[^>$][>$] *") This shouldn't be necessary. There's always a chance that some hidden escape sequences are transferred. Tramp tries to handle them. Btw, which shell do you run remotely? zsh? > Now my tramp session hang on a slightly different error message: Found > remote shell prompt on ‘homes.local’ > > And the full trace file is below: > 19:09:20.311865 tramp-send-command (6) # exec ssh -l local -o > ControlMaster=auto -o ControlPath='tramp.%C' -o ControlPersist=no -e none > homes.local > 19:09:21.224814 tramp-process-actions (6) # > Welcome to Ubuntu 18.04.4 LTS (GNU/Linux 4.15.0-76-generic x86_64) > > * Documentation: https://help.ubuntu.com > * Management: https://landscape.canonical.com > * Support: https://ubuntu.com/advantage > > * Kubernetes 1.18 GA is now available! See https://microk8s.io for > docs or > install it with: > > sudo snap install microk8s --channel=1.18 --classic > > * Multipass 1.1 adds proxy support for developers behind enterprise > firewalls. Rapid prototyping for cloud operations just got easier. > > https://multipass.run/ > > * Canonical Livepatch is available for installation. > - Reduce system reboots and improve kernel security. Activate at: > https://ubuntu.com/livepatch > > 5 packages can be updated. > 4 updates are security updates. > > *** System restart required *** > Last login: Tue Apr 7 19:08:40 2020 from > fe80::1c74:9720:e127:bea4%wlp2s0 > $ > 19:09:21.224922 tramp-get-connection-property (7) # process-buffer nil > 19:09:21.225137 tramp-process-actions (3) # Waiting for prompts from > remote shell...done > 19:09:21.225319 tramp-maybe-open-connection (3) # Found remote shell > prompt on ‘homes.local’ This is the message about "Found remote shell prompt". And this is true, indeed. > 19:09:21.227484 tramp-send-command (6) # echo \"`getconf PATH 2>/dev/null`\" > 2>/dev/null; echo tramp_exit_status $? > 19:09:24.258471 tramp-accept-process-output (10) # *tramp/ssh > [email protected]* run nil > "/bin:/usr/bin" > tramp_exit_status 0 > $ And here Tramp hangs. Hmm, it shouldn't. Could you pls repeat the test, w/o changing tramp-shell-prompt-pattern? Best would be to run emacs -Q --eval '(tramp-verbose 10)' and then open the remote file. Best regards, Michael.
