# Launching

## Configure Console

Before being able to use an R Remote Console, it is necessary to configure one.

To configure a console, navigate to Run > Run Configurations... and created a new configuration of type R Remote Console if not yet done.

The user is invited to assign a name to the particular configuration and adjust the relevant settings in the tabs of the configuration window. The most important tabs are dealt with in detail in separate paragraphs below.

### Main

#### Overview / Launch Type

The Launch Type allows to specify how the connection to R will be established. StatET offers three methods to connect to an R engine started using the RJServer library. To initialize a new R engine, you need at least one configuration of the type:

- RJ - Manual: This connection type allows to connect to an R engine started manually; or
- RJ - Start over SSH: This connection type allows to start the R engine over a SSH connection automatically.

The third connection type RJ - Quick Reconnect: doesn´t allow to initialize an new R engine but allows to reconnect quickly to a running R engine in the network. In contrast to the other connection types, which can used for reconnection too, you don´t need to specify the address in the launch configuration explicitly. It shows a dialog to browse the running R engines on the entered servers. A launch configuration of this type can be used optionally if one use often several R sessions.

#### Connection settings

The Address for an R engine has the form: `//host[:port]//rsessionname` The host system is specified by its name or IP address. The port is the TCP/UDP port of the RMI registry and can be omitted if the default port 1099 is used. The `rsessionname` can be chosen freely but must be a unique name in the registry.

The Browse... button opens a dialog showing all R engines available on the specified servers in your network similar to the reconnect dialog.

The Username is used when connecting requires authentication. This depends on the configuration of the server. See the startup script of the server for detail about the available methods.

For SSH connection: The SSH Port is the TCP/UDP port of SSH server on the remote system (default is 22). The host of the address, the username and the SSH port defines the SSH address used to connect to the SSH server.

The option Tunnel connections to R engine through SSH allows to secure the connections to the server.

The Remote Command is run through the SSH connection to start the R server on the remote system. It must point to a startup script like `startup.sh` provided by the server bundle. Adjust the path, if required.

#### R Options

The R options let you configure the initial R working directory and the R start-up options. The working directory must be specified as local folder which is mapped to an remote folder.

### R Config

The R Config tab allows to specify which R environment to use. This is optional for remote consoles; but if no environment is specified, several features like the integrated package manager and R help are not available.

## Console Page

The console page for the remote R engine has additional commands to:

- Disconnect from the active R session. The current evaluation in R is not interrupted.
- Reconnect directly to the disconnected R session.

The commands are all accessible in the view menu of the remote console too.