help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: cannot ssh edit a file


From: Tim Visher
Subject: Re: cannot ssh edit a file
Date: Tue, 23 Feb 2021 10:44:47 -0500

On Tue, Feb 23, 2021 at 3:20 AM Luca Ferrari <fluca1978@gmail.com> wrote:

> On Mon, Feb 22, 2021 at 7:54 PM Tim Visher <tim.visher@gmail.com> wrote:
> > Indeed. Right there in the FAQ.
> https://www.gnu.org/software/tramp/#Frequently-Asked-Questions
>
> Apparently I'm too dumb to set the dumb terminal:
> % ssh luca@miguel 'tail -n 1 .zshrc'
> [[ $TERM == "dumb" ]] && unsetopt zle && PS1='$ ' && return
>
> While I confirm I have zsh on the remote host, with the adam prompt
> that uses colors, I've also tried to change the shell to bash without
> any fancy prompt and nothing has changed.
> As well as wth the dumb terminal Emacs still freezes.
> And again, I've tried another user on the remote side that has a sh,
> so no fancy prompts at all!
>
> I'm able to connect with the tramp ssh command:
>
> % ssh -l luca  -o ControlMaster=auto -o ControlPath='tramp.%C' -o
> ControlPersist=no -e none miguel
> Last login: Tue Feb 23 08:58:09 2021 from n261732
> luca@miguel ~ %
>

So right here I think you're still showing evidence that whatever you're
doing to attempt to change the PS1 isn't taking.  The prompt (if your
customizations were working) should be `$ ` exactly, not `luca@miguel ~ %`.

Until you can use that ssh command and get a prompt that's exactly `$ ` I
don't think there's much else (I at least) can do to help you. I don't know
zsh at all so I can't help you figure out why your prompt customization
isn't helping. Perhaps zsh has a mailing list or other forum you can use?

I've also tried to unset PS2 and PS3 when using dumb terminal, without
> any succcess:
> % ssh luca@miguel 'tail -n 1 .zshrc'
> [[ $TERM == "dumb" ]] && unsetopt zle && PS1='$ ' && unset PS2 &&
> unset PS3 && return
>
> Then I tried to ssh to localhost, I mean I logged into the remote
> host, started emacs locally, and C-x C-x /ssh:luca@localhost: and it
> worked, therefore it does not seem a problem with the zsh prompt,
> rather a problem with tramp on my local machine.
>

This is interesting but there's too much that could be different between
the emacs versions and configurations and the ssh setup for this to be
particularly useful. I guess you could do the tramp verbosity level thing
on the remote machine and verify that you're not getting the bad prompt as
you've shown you still are when connecting from your local machine using
the tramp command.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]