Defining the target front-end

In graphical mode, when the first interactive instruction like MENU or INPUT is executed, the runtime system establishes a TCP connection to the front end. The front end acts as a graphical server for the runtime system.

On the runtime system side, the front end is identified by the FGLSERVER environment variable. This variable defines the host name of the machine where the front end resides, and the number of the front end instance to be used.

The syntax for FGLSERVER is:

{hostname|ip-address}[:servernum]
For example:
$ FGLSERVER=fox:1
$ fglrun myprog  

The servernum parameter is a whole number that defines the instance of the front-end. It is actually defining a TCP port number, starting from 6400. For example, if servernum equals 2, the TCP port number used is 6402 (6400+2).

This is the standard/basic connection technique, but you can set up different types of configurations. For example, you can have the front end connect to an application server via ssh, to pass through firewalls over the internet. Refer to the front end documentation for more details.