Next: Remote shell setup, Previous: Connection caching, Up: Configuration

### 4.14 How tramp finds and uses programs on the remote machine.

tramp depends on a number of programs on the remote host in order to function, including `ls`, `test`, `find` and `cat`.

In addition to these required tools, there are various tools that may be required based on the connection method. See Inline methods and External methods for details on these.

Certain other tools, such as `perl` (or `perl5`) and `grep` will be used if they can be found. When they are available, they are used to improve the performance and accuracy of remote file access.

— User Option: tramp-remote-path

> When tramp connects to the remote machine, it searches for the programs that it can use. The variable `tramp-remote-path` controls the directories searched on the remote machine.

> By default, this is set to a reasonable set of defaults for most machines. The symbol `tramp-default-remote-path` is a place holder, it is replaced by the list of directories received via the command `getconf PATH` on your remote machine. For example, on GNU Debian this is `/bin:/usr/bin`, whereas on Solaris this is `/usr/xpg4/bin:/usr/ccs/bin:/usr/bin:/opt/SUNWspro/bin`. It is recommended to apply this symbol on top of `tramp-remote-path`.

> It is possible, however, that your local (or remote ;) system administrator has put the tools you want in some obscure local directory.

> In this case, you can still use them with tramp. You simply need to add code to your `.emacs` to add the directory to the remote path. This will then be searched by tramp when you connect and the software found.

> To add a directory to the remote search path, you could use code such as:

>               ;; We load tramp to define the variable.
>               (require 'tramp)
>               ;; We have perl in "/usr/local/perl/bin"
>               (add-to-list 'tramp-remote-path "/usr/local/perl/bin")

> Another possibility is to reuse the path settings of your remote account, when you log in. Usually, these settings are overwritten, because they might not be useful for tramp. The place holder `tramp-own-remote-path` preserves these settings. You can activate it via

>               (add-to-list 'tramp-remote-path 'tramp-own-remote-path)

tramp caches several information, like the Perl binary location. The changed remote search path wouldn't affect these settings. In order to force tramp to recompute these values, you must exit GNU Emacs, remove your persistency file (see Connection caching), and restart GNU Emacs.