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

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

Re: User not detected when calling shell in remote dired


From: Michael Albinus
Subject: Re: User not detected when calling shell in remote dired
Date: Wed, 17 Apr 2024 09:16:56 +0200
User-agent: Gnus/5.13 (Gnus v5.13)

reza <reza@housseini.me> writes:

> Hi all

Hi Reza,

> When I open a remote folder with dired C-x d /ssh:myuser@myremote and
> call M-x shell there, emacs displays in the minibuffer

I guess you mean "/ssh:myuser@myremote:", with the trailing colon.

> Remote shell path: /ssh:nil@myremote:/bin/sh
>
> and I have to manually override my user.

I cannot reproduce it. I've opened "/ssh:albinus@ubuntu-2204:". When I
call 'M-x shell', Emacs offers me in the minibuffer

--8<---------------cut here---------------start------------->8---
/ssh:albinus@ubuntu-2204:~//bin/sh
--8<---------------cut here---------------end--------------->8---

which is fine. What Emacs and Tramp versions are you using? I've
performed my tests with Emacs 30.0.50 and Tramp 2.1.7-pre.

Could you try to reproduce the problem after starting "emacs -Q"?

> How can I instruct emacs to pick the correct user or even pick up the
> user from my ~/.ssh/config file?

When the user is given in ~/.ssh/config, you don't need to specify
it. Just open "/ssh:myremote:".

> And is there also a possibility to change the default remote shell?

Set explicit-shell-file-name to a proper value.

> Thanks for any help!
>
> Best,
> Reza

Best regards, Michael.



reply via email to

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