User Tools

Site Tools


x2go_remote_desktop

Back To Main Page

Remote Desktop with x2go

Remote Desktop tools let you connect to another computer and have a graphical environment (desktop) instead of just a command line interface (i.e. terminal). Some common examples include VNC, Microsoft Remote Desktop, Citrix, and LogMeIn.

To connect to the CfN cluster and run graphical/GUI applications (e.g. the Matlab GUI with its text editor, command line window and other tools), you can use a dedicated CfN server called cx2go - think of 'CfN x2go'. This server implements the x2go remote desktop technology.

Why Use x2go?

Are you connecting over VPN from home?

Is your on-campus connection slow for X11 applications?

Are you on your laptop with a cellular connection, commuting to work on the train, and you need to check some images on the cluster using ITK-SNAP?

x2go is optimized to provide fast graphical performance even over slow network connections, and should work well even with VPN connections to the cluster from off-campus, and also for slow campus connections.

How does it work? It's just a way to get to chead

The cx2go server is just a way to have a graphical desktop interface to login to chead. You can't do anything on the cx2go server itself. The steps look like this:

  • Use your x2go client to connect to cx2go
  • Login with your usual CfN login
  • Once connected to cx2go, run a terminal
  • ssh (with the -Y option) to chead-local (chead-local is a direct connection to the CfN cluster internal network)
  • Run whatever you like on chead

Once you run an X11/GUI application on chead, it goes through x2go in a more efficient way than just an X11 connection from chead.

There are no applications to run on the cx2go server, and the cluster /data drives are not available. Your cluster home directory is available when you login to cx2go, but that's it.

It would be a little easier to connect to chead if the x2go server were running direclty on chead. However we decided that the risk of causing complications on chead and having to interrupt cluster operations to fix issues with the x2go server is not worth it.

x2go Sessions are Persistent

An x2go sessions persists when you lose your internet connection (e.g. you close your laptop) or when you quit your x2go client (that is, when you quit the x2goclient app without exiting/logging-out-of your x2go session). You don't have to quit/exit your x2go session when you're done for the day, and it can be very helpful not to, allowing you to easily pick up from where you left off later.

Setup for X11

x2go works with X11 under the hood, so if you're unsure if X11 is working on your computer, first follow these instructions to make sure X11 is setup on your local computer.

Installing the x2go client

You'll need to install the x2go client on your local machine.

NOTES FOR OS X USERS

Dec 2015

The new version of x2goclient is giving some OS X users trouble.
This is a configuration that's known to work. Even if you're not on OS X 10.10 or 10.11,
you might try this earlier version of x2goclient:

OS X 10.10.5 Yosemite (as well as 10.11.1 El Capitan)
XQuartz 2.7.8 
x2goclient 4.0.3.2 (Qt - 4.8.6).

Try installing 4.0.3.2 from here:

http://code.x2go.org/releases/binary-macosx/x2goclient/releases/4.0.3.2/
(grab the .dmg installer file)

x2go session types

There are three x2go session types available on the cx2go server. More detailed instructions regarding each session type are given below.

NOTE January 2018 The Published Applications session type is currently broken. Please use a MATE session.

  • Published Applications session (Recommended) - this allows you to simply run an xterm graphical terminal window from cx2go - you won't see a desktop. Then after you login to chead and run a GUI application, it'll show up in its own window on your machine. It uses less resources on the x2go server so is the recommended choice. This might be a nicer way to do things than to have a single remote desktop window with multiple applications running in it. It also *might* be slightly faster than running MATE or XFCE sessions.
  • MATE session - a clone of the GNOME 2 desktop environment.
  • XFCE session - a very lightweight desktop environment. It *might* be a little faster than MATE.

If for some reason you need a different session type, contact the CfN admin: admin@cfn.med.upenn.edu

Using the x2go client

Detailed instructions from the developers are here.

For basic setup and use, follow the steps here:

1a) Run and setup the x2goclient application

The first time you run it you should see this “New Session” preferences window. You need only change settings for the items circled in red below:

1b) Choose Compression Method

In the Connection tab of the Session preferences window, choose your connection speed and Compression method.

Compression Method notes

  • For detailed imaging: If you're looking closely at images or other detailed visual data, you'll want a high-quality lossless compression method like 2m-png or 16m-png. But this will slow you down a little
  • For faster performance: If you don't need perfect-quality visuals, then choose a fast compression method like 32k-jpeg. This will still look good

2) Start your session

After you click OK to save the session preferences, you'll see a new window. In the upper right you'll see your session profile in a box like shown below. Click on the session name to start a new session

NOTE: if you have previously run a session and exited your x2go client without logging out of that session, you'll see a window like this:

This is NOT an error. It's just showing you that you have a session that's suspended in the background. You can terminate it and start a new session, or click Resume to keep going with whatever programs you were running before (this is very useful, actually).

3) Open a terminal

This step depends on your session type:

  • Published Application session type (recommended), you have to click the small circular button that shows up in the window showing your session status:

  • Then you select the Terminal application option and click Start or double-click it.

  • MATE of XFCE session type, you'll get a new window that opens to a graphical desktop. From here, you want to run a terminal.
    • In the MATE session type, click here:

  • In the XFCE session type, click here:

4) Login to chead

At this point you should have a terminal open on the cx2go server, and you want to get to chead to work as you usually do:

  • ssh -Y chead-local (chead-local is a direct connection to the CfN cluster internal network)

Remember that the cx2go server is just a stepping stone to get to chead.

5) Logout

As described above, an x2go sessions persists when you lose your internet connection (e.g. you close your laptop) or when you quit x2go (that is, when you quit the x2goclient app without exiting your x2go session). So you don't have to quit/exit your x2go session when you're done for the day, and it can be very helpful not to, allowing you to easily pick up from where you left off later.

However, sessions that are inactive for 12 days will be automatically terminated. If you start a session and get back to it every 11 days, it will last indefinitely.

WARNING the x2go system sometimes fails to properly restore an existing x2go session, requiring the session be terminated before starting a new one. So you should still always save your work before leaving or stepping away from an x2go session.

To logout of an x2go session:

  • From a desktop session (MATE or XFCE):
    • Logout of the desktop environment. Look for a “System” menu or “Applications” menu, then a logout option.
  • From a Published Applications session:
    • It's safest to first close any GUI applications you started to make sure any usaved changes can get saved. Then simple run 'exit' in the terminal window to logout of chead, then 'exit' again to end the terminal session to cx2go.

Multiple Sessions

If you need to run multiple x2go sessions on (e.g. if you are connecting to the CfN cluster and to another computer), then you need to run multiple instances of the x2go client on your computer, by launching the application from the command line instead of the usual GUI method. This works on OS X, and presumably on Windows too. So e.g. on OSX, open a terminal window and run /Applications/x2goclient.app/Contents/MacOS/x2goclient &

Troubleshooting

If you can't resume an x2go session or you can't start a new one, you may have an old session stuck on the server.

First try terminating any running sessions that show up in the x2go client when you login to a session from the client. They're listed in the dialog box that comes up, and there's a button to terminate them.

If that doesn't work, do the following:

ssh <your-username>@cx2go
x2goterminate

The above command should find and terminate any sessions you have running. It may take a couple minutes to take effect, or may need to be run again.

If this fails, contact the admins.

x2go_remote_desktop.txt · Last modified: 2018/01/17 18:06 by mgstauff