Next: Remote shell setup, Previous: Predefined connection information, Up: Configuration [Contents][Index]

### 4.15 How TRAMP finds and uses programs on the remote host

TRAMP requires access to and rights to several commands on remote hosts: `ls`, `test`, `find` and `cat`.

Besides there are other required programs for Inline methods and External methods of connection.

To improve performance and accuracy of remote file access, TRAMP uses `perl` (or `perl5`) and `grep` when available.

User Option: tramp-remote-path

  `tramp-remote-path` specifies which remote directory paths TRAMP can search for Remote programs.

  TRAMP uses standard defaults, such as `/bin` and `/usr/bin`, which are reasonable for most hosts. To accommodate differences in hosts and paths, for example, `/bin:/usr/bin` on Debian GNU/Linux or `/usr/xpg4/bin:/usr/ccs/bin:/usr/bin:/opt/SUNWspro/bin` on Solaris, TRAMP queries the remote host with `getconf PATH` and updates the symbol `tramp-default-remote-path`.

  For instances where hosts keep obscure locations for paths for security reasons, manually add such paths to local `.emacs` as shown below for TRAMP to use when connecting.

      (add-to-list 'tramp-remote-path "/usr/local/perl/bin")

  Another way to find the remote path is to use the path assigned to the remote user by the remote host. TRAMP does not normally retain this remote path after logging. However, `tramp-own-remote-path` preserves the path value, which can be used to update `tramp-remote-path`.

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

When remote search paths are changed, local TRAMP caches must be recomputed. To force TRAMP to recompute afresh, exit Emacs, remove the persistent file (see Connection caching), and restart Emacs.