— because if it was easy, everyone would do it

  • Credits : John S and John C

Coding is one of the highest art forms achieved by mankind; an idea - just an electrical impulse - is made real in an alternate electronic universe; the created idea however, does not have physical form, and yet can change the physical world; it cannot be touched, and yet may touch all mankind.

Perl - Accessing the programming environment.

If perl is not available for local use, remote use is possible; all you need is access to a server that supports your requirements. This document deals with remote access to perl on the server www.treebeard.ie

MAC users: Please note that this document refers to Unix/Linux and Microsoft Windows™. Many of the steps involved here, and also the programs are applicable to the Mac, especially OS X onwards; OS X is built with a form of BSD Unix and therefore has a lot in common with Unix/Linux. In most cases software used on this course either has a Mac version available or a Mac equivalent.

CLI to CLI using UNIX

Using UNIX you can start a terminal session and access the remote host www.treebeard.ie.

In the past the Telnet protocol on port 23 was used for this. Unfortunately, Telnet was created in a different era when security was less of an issue. It's now very easy to 'sniff' someone elses username and password from Telnet since it communicates en clair, that is, in plain-text or unencrypted.

It is advisable for this reason to use the Secure Shell Client (ssh) which encrypts your remote session. At the prompt one normally types ssh hostname.domainname.tld to connect. The command as given above implies the use of the standard ssh port number of 22. On a hardened server this port may be closed or moved as it is a common target of brute-force attacks.

Where an alternate port number is used the command ssh -p alternate_port hostname.domainname.tld should be used. Ask your tutor for the alternate port number.

When you access the remote system will be passed your current local login name. If this has had to be changed or you wish to use another login name on the remote system the command ssh -p alternate_port -l remote_username hostname.domainname.tld can be used to change your identity on the remote machine. Use -X to enable X11 forwarding.

See the UNIX man page for more information on the -p, -l and other parameters.

GUI to CLI using UNIX

If you have a graphical SSH client available you can use it to access the remote server. A common SSH client is PuTTY (do you know why the letters TTY are in capitals?) which is freely available. With this program - often already installed (or installable) amongst the Internet group of applications with Linux - you can make the same connections with the same options given above but using the interface shown below:

Once connected you will still be using a command line environment.

GUI to CLI using Windows™

The PuTTY application is available for Windows™ as well. Install and run it (it doesn't come with Windows™) and specify whichever connection options you require.

There is a link to the Windows™ version of the software in the software section of the Help section here.


There are a few GUI to GUI options available. Two will be dealt with here. The differences between GUI interaction with a system and CLI interaction remains: that the system is a remote one doesn't make using a CLI either harder or easier; assuming you're using a CLI on the remote end.

However, remote interaction using a GUI carries an inherent problem by definition. That the other system is remote implies that there will be a communications overhead. This overhead is much greater with GUI interaction than with CLI interactions, because image data is always larger than single keystrokes. This causes us to have to consider the issue of bandwidth. There is a slightly outdated document on this topic here.

The two connection programs dealt with here are differentiated (according to documentation) by their features, obviously, but also by the efficiency of their use of bandwidth. The two programs are:

  1. VNC: This exists in many variations for many platforms. It supports cross-platform interaction and is permanently free. It has a has good track record as it around for a while and is well known to many users/sysops.

  2. NoMachine NX - This product may become commercial but lists a "Free Forever" version for Linux and Solaris on its website. It also exists in many variations for many platforms and supports cross-platform interaction. It's new, uses X-Windowing for communication between server and client which theoretically means it should use bandwidth more efficiently than VNC.

NoMachine NX may signal the end of the popularity of VNC. Using the X11 protocol means less graphical data is transmitted. Strong attention has been paid overall to transmission optimisation, causing Linux Magazine (Issue #85) to state: "NX provides fast terminal services, even over slow connections". It also supports session encryption and interaction with server types other than it's own.

GUI to GUI using UNIX

Pick your GUI client, install it on your OS of choice and connect to www.treebeard.ie! Both clients are supported. VNC & NX download details are in the software section of the Help page here.

Above is the installation of NX using Redhat Package Manager Add/Remove Software program. VNC Viewer is often pre-installed in the Internet group of programs. To install software on the school computers you need the root password. At home you're probably an Administrator already so install the client appropriate to your OS and proceed.

Note that you have to start your own private server for VNC at the command prompt of the remote machine. When you do this for the first time you'll be asked to set up a VNC password: use your email password for this. To start the private server just type vncserver at the command prompt. You'll be given a session number which you'll need when you use the VNC client to connect.

Start your VNC Viewer client program and follow the directions:

With NX, start the client and specify your target machine (www.treebeard.ie) and follow any instructions given.

Specify options (above & below).

Accept the security certificate (above) as you would do with ssh. You can control existing sessions or start a new session before completing the connection to a session (shown below) and continue.

For both, RTFM & FGI.

GUI to GUI using Windows

Pick your GUI client, install it on your OS of choice and connect to www.treebeard.ie! Both clients are supported. To install software on the school computers you need the root password. At home you're probably an Administrator already so install the client appropriate to your OS and proceed.

Note that you have to have a VNC server program installed and running if your target is a Windows™ OS computer. Below you can see the icon in the Notification Area for a running Windows™ VNC Server:

With Windows™ once VNC is installed you should have access to a client. Be aware of the fact that there is more than one VNC package/system, as you can see in the programs section of the help page. In any case, start your client program and follow the directions.

NOTE: In the image shown here the Windows™ VNC client is behaving exactly as the Linux client did. However, for some versions of VNC under Windows™ the number entered below would be 5908. If you have trouble connecting from Windows™, try adding 5900 (the VNC base port number) to your session number.

With NX, install the client and/or server program according to your needs. For our use, you only need to install the client as the target machine has a server program installed. When ready to connect, start the client and specify your target computer (www.treebeard.ie) and follow any instructions given.

For both, RTFM & FGI.

Other Images

Shown below are the NX Client and VNC Viewer both installed in the Internet group of programs in Linux Gnome.

Below is a VNC session showing a 'traditional' X Windows task-bar-free session using twm (the name of the Window Manager). Though apparently primitive, you can carry out all the necessary tasks for your program - plus many other tasks in this envionment. The relative simplicity of the display also means that there is less of a transmission (bandwidth) over head due to the absence of complicated graphics.

Below is a remote KDE session running on a server accessed with NX. The client is Linux Fedora 7 with the Gnome desktop. The target (remote) OS is Fedora 8 running XFCE desktop at the the time of the snapshot. The user is root, programming the traditional first program, "Hello World".

When you are finished using the NX client you will be asked if you wish to Terminate, which will allow a new session when next you login, or more popularly, Disconnect which leaves your remote session active and running allowing you to continue where you left off on the next occasion you connect. NOTE: A server re-boot will probably remotely terminate the session, so that your next login would be to a fresh desktop; therefore never disconnect with unsaved files!

Last updated: 20150326-12:01