How to specify for emacs tramp which remote shell to open?

6

5

Besides opening remote files, tramp can be used to run a remote shell. Unfortunately, there is a problem. On a local machine i have zsh and on remote server only bash is installed. Issuing M-x shell results in exec: 24: /bin/zsh: not found message.

Can I somehow tweak tramp to run bash?

Dmitry Vyal

Posted 2012-07-27T09:00:33.780

Reputation: 205

Answers

3

Try M-x set-variable RET explicit-shell-file-name RET "/bin/bash"RET - that should make M-x shell use bash from now on. Not sure if there's an easy way to switch depending on which machine you're on...

legoscia

Posted 2012-07-27T09:00:33.780

Reputation: 2 197

Thanks! Couldn't find that variable. For permanent effect one can put (setq explicit-shell-file-name "/bin/bash") in .emacs – Dmitry Vyal – 2012-08-01T08:58:03.323