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?

1 Answer 1

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 and acknowledge that you have read and understand our privacy policy and code of conduct.

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