How To Use XPRA

On May 8, 2017, we replaced NoMachine connectivity with XPRA.  If you previously used NoMachine to connect to Spear, you should now use xpra instead.

What is XPRA?

You can run graphical programs on the RCC Spear servers.  In order to display the windows from these programs on your desktop or laptop computer, you need some way to redirect the graphics from Spear to your computer.  XPRA provides a way to remotely display the graphical programs from Spear on your local computer.  Just download the XPRA client software and follow the rest of the directions in this document.

Getting Client Software

The XPRA client software is available for Windows, Mac, and Linux.  You can find it all here:

For Windows and Mac the installation is straightfoward; just download, install, and run.  For Linux, you may be able to install using your native package manager (like  yum or apt-get).  You may have to add the XPRA repository to your system.  This is dependant on which Linux distribution you are using.  Please see the Linux specific directions on the download link above.

Connecting to SPEAR with XPRA

Setting up an XPRA session on Spear is a 3 part process:
  1. Launch the XPRA server on Spear.
  2. Configure and run the XPRA client on your local computer.
  3. Run graphical programs on Spear, via a terminal and watch them display on your computer.

Let's go over each step in detail:

Launch XPRA Server on Spear

  • Log in to spear via SSH using a terminal program on your computer.  If you need help with this, please see Connecting and Using the HPC.
  • Run rccxpra at your command prompt on Spear.  You should see output similar to:

[joe@spear-1]$ rccxpra
XPRA started on Display  :2
Commands to attach to this display are:

xpra attach

Windows XPRA Client:
Mode:         [SSH]
[joe] @  []  22 : [2]

Mac OSX XPRA Client:
Mode:  [SSH]
[joe]  @  [] 22 :  [2]

See for more

Launch X programs from the terminal window that appears on your XPRA
client.  Or set your DISPLAY variable on this terminal to :2
For example:  export DISPLAY=:2

Configure and run your local XPRA Client

Use the output from rccxpra to configure your XPRA client.  For Linux, just cut and paste the command into a new terminal window on your computer (not on Spear). 

For Windows or Mac use the values provided in the output of rccxpra to set up your client.  Items in square brackets [Like This] show you where to fill in those values on the XPRA client.  See the images below showing the Windows and Mac clients and where to fill in values.

Windows XPRA Client

Windows XPRA Client Configuration

Mac XPRA Client

Mac XPRA Client

Here's what to fill in:

  1. Choose SSH here for the protocol.
  2. Fill in your username.  In the example this is joe .
  3. The hostname goes here.  In our example it's
  4. The display number goes here.  This is 2 in our example.

Notice that all of these values are provided for you in the terminal window where you ran rccxpra.

Once you have the values entered, press the connect button to start the XPRA client and attach to your XPRA session on spear.

Run graphical programs on Spear

Once you run the XPRA client on your computer, you should see a new terminal window appear with the spear prompt on it.  Use this terminal to launch graphical programs on Spear for display on your computer.  For example matlab or gedit.

Cleaning Up Your XPRA Session

After you're finished using programs on Spear and you don't need XPRA any more, you should clean up so it doesn't consume resources on Spear for no reason.  It's easy to do.  Just disconnect your XPRA client and XPRA on Spear will clean itself up.

  • On Linux, press control-C in the terminal window where you ran the xpra attach command.
  • On Windows or Mac click on the XPRA client icon and select disconnect or quit.

If you want to be extra sure, go to your Spear terminal window and type:

xpra stop

That will cleanly shut down your XPRA session.