GPS has a basic support for working with files on remote hosts. This includes a number of protocols, described below, which allow you to read a file from a remote host, edit it locally, and then save it transparently to the remote machine.
For now, the support for remote files is only available through the GPS shell window. You start editing a remote file by typing a line similar to
Editor.edit protocol://user@machine/full/path
where "protocol" should be replaced by the name of the protocol you want to use, "user" is the login name you wish to use on the remote "machine", and "/full/path" is the full path on the remote machine to access the file.
The user name is optional. If it is the same as on the local machine, you can omit the user name as well as the "@" sign.
Likewise, the machine name is optional, if you want to get a file from the local host. This can be used to access files belonging to another user. In this case, you need to specify the "@" sign, but do not insert a machine name right after it.
Remote files can also be used if you want to work with GPS, but the machine on which the files are found isn't supported by GPS.
The following protocols are supported:
Although ssh can be setup not to require a password, GPS will automatically detect if a password is asked and open a dialog to query it.
The remote system must be a Unix-like system with support for standard Unix
commands like test
, echo
, rm
and ls
.
In the sample shell command above, you would replace the word "protocol" with
"ssh" to use this protocol.
It has the same requirements that the ssh protocol. To use it, substitute the
word "rsh" to "protocol" in the example above.
To use it, substitute the word "telnet" to "protocol" in the example above.
It basically has the same behavior as the ssh protocol, although it might be slightly slower since a new connection has to be established every time a file is fetched from, or written to the remote host. However, it might work better than ssh if the file contains 8 bit characters.
To use it, substitute the word "scp" to "protocol" in the example above.
Rsync is specially optimized to transfer only the parts of a file that are different from the one already on the remote host. Therefore, it will generally provide the best performance when writing the file back to the remote host.
If you set up the environment variable RSYNC_RSH to ssh before starting gps, the connection will then be encrypted when transferring the files, and the connection will be performed using ssh instead of rsh.
To use this protocol, substitute the word "rsync" to "protocol" in the
example above.
To use this protocol, substitute the word "ftp" to "protocol" in the example
above.