Remote Files

tpp supports opening of files using local viewers from within the terminal via the ropen command.

Opening remote files works by sending the contents of the opened file through the existing terminal connection to the local machine (where tpp runs). tpp then saves the file in a temporary folder and opens it using the local defaults. The data transfer uses only terminal escape sequences and as such is compatible with most terminal tools, including terminal multiplexers, such as tmux.

To open a file, just type ropen FILENAME in the terminal, where FILENAME is the path to the file you want to open:

Depending on the features of the local opener, if the same file is changed remotely and then opened again, the view will either be refreshed, or a new viewer will pop up in cases when the viewer.

Installation

Before the feature can be used, the ropen program must be installed on the target machine (so that it can be executed from the terminal itself). Note that if you want to open remote files from multiple machines you ssh to, this step must be repeated for each of them.

ropen can either be installed using the prebuild packages for Ubuntu (Debian) and SUSE, or by installing the `ropen` package from source. To install on Ubuntu, run the following commands:


                wget https://github.com/terminalpp/ropen/releases/download/v0.5.1/tpp-ropen.deb
                sudo dpkg -i tpp-ropen.deb
            

Settings

Remote files are by default stored in a temporary directory, but the settings.json file may overwrite their location to any existing directory in the session,remoteFiles,dir option.

This has the advantage of having all the remotely opened files easily accessible from the local machine by other programs as well.