Skip to main content

VNC

To run graphics-heavy applications that use sophisticated graphical user interfaces (GUI), you can use VNC. VNC is a way to connect the graphical output of Palmetto to your local machine. For this purpose, you will need to run VNC server on a Palmetto compute node, and to run VNC client on your local machine. The instructions for PC and Mac computers are below.

VNC with Open OnDemand

One option to run VNC is to use the Palmetto Desktop option through Open OnDemand. The Palmetto Desktop app provides a graphical desktop interface that will run directly on the compute nodes. We use XFCE 4 for our desktop environment because of its user-friendly interface and low resource usage.

An advantage of the Palmetto Desktop is it requires less of the configuration (the VNC server is automatically started for you) than the other options and the VNC client runs directly in your browser. Check out our dedicated page on Palmetto Desktop for more information and instructions on how to connect.

tip

For most users, we strongly recommend using Palmetto Desktop instead of setting up VNC manually.

VNC on Windows

We really recommend using MobaXTerm, because it comes with built-in VNC client, which makes the process much easier. Use MobaXTerm to log into Palmetto.

The first time running VNC, you may want to create a ~/.Xclients file to indicate what programs you want to execute when the VNC server starts. For example, if you use the following for your ~/.Xclients, it will start the IceWM desktop environment and launch xterm (a graphical terminal).

#!/bin/bash
/bin/icewm &
/usr/bin/xterm -geometry 80x50-50+150 &

Create this file using nano or your favorite command line text editor.

warning

Without an ~/.Xclients file, nothing will run in VNC (the display will be a blank screen).

Request a compute node with one GPU (GPU model does not matter, so we will specify gpu_model=any):

salloc \
--cpus-per-task 4 \
--mem 50gb \
--gpus 1 \
--constraint interconnect_fdr \
--time 08:00:00

Once you get on the compute node, start the VNC server:

LANG=C && /software/commercial/TurboVNC/bin/vncserver

If you have never ran it before, it will ask you to create a password. We recommend using the same password as your Palmetto account so it's less confusing. Also, it will give you the information about the node and the port which will be handy for the next step. For example, if it tells you

>>Desktop 'TurboVNC: node1871.palmetto.clemson.edu:1' started on display node1871.palmetto.clemson.edu:1

, this means that the node is node1871 and the port is 1. For the next step, we will add 5900 to port number. For our example, the new port number will be 5901.

Screenshot of a terminal that has an arrow/box pointing at the node name and the port number.

Don’t close this session! Leave it running.

Now, let’s start the VNC session. Click on Session in top left corner of MobaXTerm, and select VNC. In “Basic VNC settings”, specify the Remote Hostname as the node that you got at the previous step (in our example, it will be node1871.palmetto.clemson.edu), as well as the port number (in our case, 5901). Also, click on “Network settings”, select “Connect through SSH gateway” and specify login.palmetto.clemson.edu as the gateway SSH server. Specify your Palmetto username (mine is gyourga).

Screenshot of the VNC session settings page with example login credentials.

Click OK. It will start the VNC session; the first part is two-factor identification:

Screenshot of the VNC two-factor identification pop-up.

Don’t enter your password yet! Enter 1 (i.e. number one), which will send you the DUO push. The next step will be entering your password. This will open a graphical window which runs on Palmetto. If you used the .Xclients suggested above, there should be a terminal window running.

We are now ready to run a graphical application! In order to run it, load the appropriate module, and then type (within the xterm window in VNC):

vglrun  <program name>

(For example, type vglrun comsol to run COMSOL, or type vglrun vmd to run VMD, etc.)

You can try running it using four CPUs (or any number of CPUs which does no exceed the ncpus that you have specified in your original salloc):

vglrun -np 4 <program name>

VNC on Mac

Open a terminal (most likely, it’s in the Applications -> Utilities folder). Sign into Palmetto using ssh..

The first time running VNC, you may want to create a ~/.Xclients file to indicate what programs you want to execute when the VNC server starts. For example, if you use the following for your ~/.Xclients, it will start the IceWM desktop environment and launch xterm (a graphical terminal).

#!/bin/bash
/bin/icewm &
/usr/bin/xterm -geometry 80x50-50+150 &

Create this file using nano or your favorite command line text editor. Without such a file, nothing will run in VNC (the display will be a blank screen).

Connect to a compute node with one GPU (the GPU model doesn't matter, so we will request gpu_model=any):

salloc \
--cpus-per-task 4 \
--mem 50gb \
--gpus 1 \
--constraint interconnect_fdr \
--time 08:00:00

Once you get on the compute node, start the VNC server:

LANG=C && /software/commercial/TurboVNC/bin/vncserver

If you have never ran it before, it will ask you to create a password. I recommend using the same password as your Palmetto account so it's less confusing. Also, it will give you the information about the node and the port which will be handy for the next step. For example, if it tells you

>>Desktop 'TurboVNC: node1871.palmetto.clemson.edu:1' started on display node1871.palmetto.clemson.edu:1

, this means that the node is node1871 and the port is 1. For the next step, we will add 5900 to port number. For our example, the new port number will be 5901.

Screenshot of a terminal that has an arrow/box pointing at the node name and the port number.

Open another terminal (don't close the one from the previous step!), and type

ssh -L 10000:<node>.palmetto.clemson.edu:<port> <username>@login.palmetto.clemson.edu

For our example, I should type (my username is gyourga):

ssh -L 10000:node1871.palmetto.clemson.edu:5901 gyourga@login.palmetto.clemson.edu

Finally, open a third terminal, and type

open vnc://localhost:10000

Enter password when prompted; this is the password that you have set up earlier when you started the VNC server. This will open a graphical window which runs on Palmetto. If you used the .Xclients suggested above, there should be a terminal window running.

We are now ready to run a graphical application! In order to run it, load the appropriate module, and then (within the xterm window in VNC) type

vglrun  <program name>

(For example, type vglrun comsol to run COMSOL, or type vglrun vmd to run VMD, etc.)

You can try running it using four CPUs (or any number of CPUs which does no exceed the ncpus that you have specified in your original salloc):

vglrun -np 4 <program name>