I opened a file on the remote machine, and typed C-u M-!
and then typed tree
command. It showed in the buffer:
/bin/sh: tree: command not found
The tree
command is installed into /home/RNAer/bin
, and I verified it can run successfully when login with bash terminal.
Then I added the path in the .emacs
like the following and restart emacs,
(add-to-list 'tramp-remote-path "/home/RNAer/bin")
but it still has the same error of command not found. what's the problem?
/home/RNAer/bin
to$PATH
on the remote machine? In other words, is this directory also added to$PATH
in non-interactive shell sessions? – Shane~/.bashrc
(which is sourced by~/.bash_profile
), in the interactive shell. But I tested it - even if I add to the $PATH in non-interactive shell session, it still failed. – Jodyjoe~/.emacs.d/tramp
) – Faller