Skip to main content

Using a Visual Node on Windows

Description:
  • You will learn about the installation and use of the program Xming (basic level)
  • You will learn how to set up PuTTY and connect to a visual node using Xming (intermediate level)
  • You will see an example of how to run a sample GUI application (intermediate level)

Introduction & Prerequirements

While the command-line interface is a powerful tool to remotely access the Phoenix Cluster to manage jobs and access files on the server, some applications require a graphical user interface (GUI) in order to be used fully. In this tutorial, you will therefore learn how to connect to one of Phoenix' visual nodes in order to run such a GUI application.

Please note: This tutorial is for Windows machines only. For a short description of how to use visual nodes on a Linux machine, please visit this link.

In order to perform the steps required here, you will need to have access to the remote network of the TU Braunschweig and have the application PuTTY installed. For a detailled tutorial about the basic usage of the Phoenix Cluster, please visit this link (for Windows users only). Once you have set up the VPN and have PuTTY (and preferably WinSCP) installed, you can continue following this toturial.

Installing and using Xming

Description

Official description: „Xming is the leading X Window System Server for Microsoft Windows®. It is fully featured, lean, fast, simple to install and because it is standalone native Windows, easily made portable (not needing a machine-specific installation or access to the Windows registry).“ Source

This means, that it provides the tools necessary to allow for a display of graphical user interfaces on your local machine, a feature that does not come natively with Windows.

Xming itself does not have a real GUI and generally needs no configuration to run. Once started, it should enable PuTTY to display graphical applications on your machine.

Download and installation

In order to download the installation file, please visit: https://sourceforge.net/projects/xming/ 

Start the installation file and click through the steps to finish the setup. Then, start the program. You should now see the Xming icon among the active programs on the task bar.

This concludes the setup of Xming, as you do not need to interact with the program itself.

Setup of PuTTY for the use with Xming

Changing the PuTTY Settings

As a first step, you need to enable X11 forwarding. This tells PuTTY that it should allow information regarding graphical user interfaces to be transmitted to your computer. In oder to do so, you need to start PuTTY and take a look at the category table on the left. You need to open the following entries: ConnectionSSHX11 (as seen in the screenshot below)

PuTTY Setup - Xming

In this windows with the title Options controlling SSH X11 forwarding, you need to do two things:

  1. Check the box titled Enable X11 forwarding
  2. In the textfield labelled X display location, type the following: localhost:0.0

Now you can go back to the category entry Sessions, save the settings under the profile of the Phoenix cluster connect to it as always.

Starting an interactive job and the graphical application

Now that the setup is complete, we can start an interactive job on a visual node and use it to start a graphical application. To do so, we need to reserve the node for a specified amount of time. The following is an example jobfile (for details of how to submit jobfiles, please click here.

#!/bin/bash -l

#SBATCH --partition=vis
#SBATCH --nodes=1
#SBATCH --time=6:00:00
#SBATCH --job-name=VisExample
#SBATCH --ntasks-per-node=1


sleep 6h

Once the job is submitted, you can check its status via the command squeue -u $USER. Once it has been started, you should see which node you have been assigned on the right side in the column NODELIST (REASON). You need to know the number you have been assigned, which vis0X, where X is variable. In the following screenshot, you can see that we were assigned node vis01.

VIS0X

Knowing this number, you are now able to log into your node with the following command (after replacing the X with the real number):

ssh -Y vis0X

Please note that it is important that you do not forget the -Y argument, as this will enable trusted X11 forwarding. This should automatically set the set the DISPLAY variable. You can test this by typing

echo $DISPLAY

This should show something like localhost:10.0 as an output. (If the variable is not set, you can alternatively do so manually with the command export DISPLAY=localhost:10.0, even though this will unlikely be necessary)

In order to test if the setup has worked, we can run a first sample application via the following command:

xeyes

This should open a Xming window that shows a little image of eyes that follow your mouse cursor which looks as followed:

xeyes
With all of this done, we are now finally able to run our first real graphial application on the visual node. For this test case, we prepared a python GUI appliaction, which we placed in our home folder. We then executed the program with the following command:

python3 main.py

As you can see in the following, our little game of snake running on the visual node is now being displayed on our local Windows machine (this specific example can be found here).

Vis node snake example
Important note: To run our specific sample program, we previously installed python via Anaconda in our home directory and are using this as our standard python. This step is not part of this tutorial, as only few graphical applications are based on python. Please make sure that your specific application is installed correctly with all prerequisites being fulfilled.

If you need information how to load modules, please click here. For information how to install any application not available in the module list, please use your favourite search engine to get help on how to install it on a remote CentOS Linux server. You should be able to do so using PuTTY and WinSCP as detailled here.

Conclusion

This tutorial should give you all the information needed to run a graphical application on a visual node of the Phoenix cluster and display the GUI on your local Windows machine.

This however is only meant to show you the general setup of your PC, it does not include the setup of your specific application. Please find solutions on how to run them on the internet.

Enjoy using the Phoenix clusters visual nodes!