Configuring and using x2go
- x2go is a remote desktop client-server application very similar to Windows Remote Desktop, allowing full access to a desktop environment (DE) on a remote Linux, UNIX or MacOS computer. Using ssh as the network transport, it does not use any special or additional ports that might be blocked by firewalls or by a broadband ISP's security policies - it just uses the single ssh port which can be either the standard port 22 or some other port that the remote system is using instead, perhaps for security reasons.
- Users who are not really very comfortable with using Linux on the command line via a terminal session will welcome x2go since it brings the remote system's familiar Linux desktop environment to the user's local machine, whether that be KDE, gnome, Unity, cinnamon, mate, xfce, lxde or whatever is installed on the remote system. At the same time, experienced users and die-hard command line junkies will find the ability to use a remote browser useful to access graphical items on internal networks or pages whose access is restricted to College network connections only, or to run software that is either not network-aware, or can only interact with 'localhost' via a UNIX socket, for example.
- The x2go client is freely available as an installable package for most modern Linuxes and also for Windows, Macs and UNIX systems. Similarly, the x2go server software can be installed by adding the x2go repository for your chosen Linux distribution or you can build it from source and install it yourself.
- In the configuration example below, we configure and use the popular Ubuntu Linux desktop edition on a desktop PC or laptop to connect to the lovelace compute server in Maths. Although servers don't normally have a desktop enviroment installed - or even any X Window System or Wayland graphical capability - lovelace has had the LXDE desktop environment added along with X applications, GUI login support and the x2go server software. LXDE was chosen as the desktop environment for this server since its resource usage is low compared with Unity, gnome or KDE; lovelace's primary role is as a compute server and if many users started using resource intensive DE's like gnome and KDE, it would soon get bogged down just dishing up a lot of 'eye candy' to these users at the expense of traditional compute users.
- If you have a desktop PC in College with external ssh access and want to use a rich desktop environment, you can always install the x2go server on your own system - if there is demand, this will be documented separately.
Installing and configuring x2go
- Using the package management system appropriate for your Linux or UNIX distribution, or for for your Windows or Mac computer, install the x2go client as described here. For Ubuntu users this is as simple as typing:
- sudo apt-get install x2goclient
and, depending on which desktop environment you are using on your system, this will add a shortcut to the 'Internet' applications group or to your panel (if any). If not, typing x2goclient in a terminal will always start it and you should see the main x2go screen below, ready for you to create your first connection:
- Click on the Session tab and then select New Session ... to bring up the 'New Session' dialog screen shown below.
- You can use any name you like for the Session name but for this example, lovelace might be a good choice. Leave the Path at the default / setting (this option in conjunction with whatever is put into the Command box is used for starting a specific application when you connect to your remote system, instead of launching the default desktop screen). Now put lovelace.ma.ic.ac.uk into the Host box followed by your college username in the Login box and leave the SSH port at its default setting, port 22. Finally, for the Session type at the bottom left corner of this screesn, select LXDE from the dropdown list. The screen should now look similar to the one below except for the username:
- Completing the Session screen as described above will finalise the basic configuration and allow you to connect to lovelace right away but it is worth taking the time to configure at least the Connection, Input-Output and Media screens before you connect for the first time. The network speed in the Connection screen defaults to ADSL but most users might want to move the slider to the faster WAN (wide area network) setting if you are using a 'fibre' or cable broadband connection; the LAN setting is useful if you are connecting to another system on a wired network at home or in college.
- There is a vast range of Compression algorithms to choose from but the default 16m-jpeg setting appears to work well.
- Moving on to the Input/Output tab you will see a number of display-related items. Probably the most important thing here is not to choose a screen resolution greater than the resolution you are currently using on your local machine otherwise panels, etc typically at the bottom of the remote screen will be out of sight off the edge of your screen and inaccessible! If this happens, you can disconnect from the remote system and regain control of your local desktop by pressing the Ctrl+Alt+T keys. For this reason the x2go client defaults to 800x600 which is fairly low by today's standards and therefore results in a smaller remote screen but once you have got the system up & running you can then play arround with the resolution and choose what's best for your own setup. Support for dual screens and even 3 or 4 screen setups is good.
- The Media tab allows you to configure forwarding for sound and printing on the remote system to be redirected to your own sound and printing systems. These features have not been tested yet on Maths servers since they lack audio hardware and are not configured for printing (but they will be tested on non-Maths desktop systems soon and reported on here).
- Now click on OK to save all your settings and the completed configuration screen should appear as shown in this example:
- Now you are ready to connect - just click on Hoca (the little furry seal mascot) and the login screen should appear where you can type in your college password:
- Now click on Ok and x2go will initiate the connection; if this is the first time you have connected to lovelace using x2go, you will be greeted by the standard ssh 'unknown host key' warning so just click on Yes to trust the key presented and proceed:
- All being well and having typed your username and password correctly, you will be connected with a screen like the one shown below. Don't panic! The error dialog 'No session for pid 58891'is appearing since you are connecting to a system (lovelace) that started life as a server not set up as a desktop system, with desktop-style GUI login components retro-fitted at a later date. Clicking on OK will make this error message go away.
- Note: if you decide to install x2go server on your own desktop system you will not see this message since it will have been set up from the beginning as a desktop system.
- The screenshot below shows a remote LXDE desktop on lovelace being accessed from a Debian system at home that is running the XFCE desktop environment that is popular in the Physics department.
- Finally, to illustrate just how agnostic x2go is regarding the operating systems, desktop environments and monitor resolutions of the systems at each end of a x2go session, the screenshot below is from a FreeBSD desktop system using the fvwm2 window manager with dual monitors side-by-side, using x2go to connect to an OpenSUSE Linux system in college for a Gimp graphical editing session. The very wide (7680 pixel) image is heavily compressed to fit into a reasonably-sized web page, hence the lack of fine detail, but this screenshot serves to emphasise the flexibility of x2go; the DE on the remote OpenSUSE system is IceWM.
- Hopefully these introductory notes will be of use to those who need or prefer to use a complete Linux desktop environment instead of using X forwarding to run a single GUI application remotely; you can add additional configurations for other systems and there are many other options available in the x2go client that are not covered here.
Research Computing Manager,
Department of Mathematics
last updated: 3.7.20