Remote Desktop (VNC) in a batch job

Creating a VNC server inside a batch job

Available queues: general_gpu_k40, general_gpu_k80

The preferred method is to start an interactive job on a GPU node and then once your job starts, you can start the VNC server.

On Mac, you will need the TurboVNC Viewer client (

On Windows, you will need the TurboVNC Viewer client ( and PuTTY (

Starting the VNC server

First, load the TurboVNC and VirtualGL modules:

module load turbovnc

module load virtualgl

Next, submit an interactive job to the cluster by using the salloc command and specifying one of the available GPU queues (general_gpu_k40 or general_gpu_k80):

salloc --partition=general_gpu_k80 srun --pty /bin/bash

Once you are granted the job allocation, start your VNC server:


On the first time that you run the vncserver command, you will be prompted to enter a VNC password to secure your VNC session. This password can be set to any strong password as desired.

The output of the vncserver command is important: it tells you where to point your client to access your desktop in format hostName:displayNumber

Desktop 'TurboVNC: ssrde-c-408:1 (sscf-silas)' started on display ssrde-c-408:1

In this above example, the hostName is ssrde-c-408 and the displayNumber is 1

Because the compute nodes of our cluster is not directly accessible, you must log in to the headnode (SSRDE) and allow your VNC client to "tunnel" through SSH to the compute node. We will use the obtained hostName and port number (5900 + displayNumber) to create the SSH tunnel.

Creating an SSH tunnel

On Mac, use Terminal to create the SSH tunnel by following this format:

ssh -L <port>:<hostName><port> <username>

Using the above example, the command would be:

ssh -L

On Windows, open PuTTY. For hostname, enter:

Navigate to Connection->SSH->Tunnels

Source port: <port>

Destination: <hostName><port>

Using the above example, the source port would be 5901 and the destination would be

Connecting to VNC desktop session

Open the TurboVNC Viewer client, and connect to localhost:<displayNumber>, which will tunnel to the correct node on the SSRDE cluster. The TurboVNC viewer client will prompt you for your VNC password.