Run a command on a remote computer using tramp?

I opened the file on the remote machine and typed C-u M-!and then typed the command tree. He showed in the buffer:

/bin/sh: tree: command not found

The command is treeinstalled in /home/RNAer/bin, and I made sure that it can work successfully when logging in with a bash terminal.

Then I added the path in the .emacsfollowing way and restart emacs,

(add-to-list 'tramp-remote-path "/home/RNAer/bin")

but he still has the same command error as not found. what is the problem?

+5
source share
1 answer

I had the same problem, I solved by adding the following lines to .emacs

(require 'tramp) 
(add-to-list 'tramp-remote-path "/home/RNAer/bin")

Please note: without the first line, the second line causes an error. You can double check your path-path-path at

(message (format "%s" tramp-remote-path))

, .

0

All Articles