3

I'm trying to open a remote shell after connecting to a machine using Tramp with the plink method on MS Windows.

However every time I call shell it prompts me for 'Remote shell path' and suggests a local directory. I think I have to type /plink:Server:/bin/bash to be able to run the shell.

Is there any way to avoid having to do this every time I want to run shell on a remote machine?

3

You can use explicit-shell-file-name for this:

(setq explicit-shell-file-name "/bin/bash")

The disadvantage is, that this setting is valid for all shell buffers you open, local and remote ones. In the upcoming Emacs 26, there is support for connection-local variables. This will give you the ability to set explicit-shell-file-name for different remote machines with a different value.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.