• About: OpenGL interposer that allows applications to use remote display hardware
  • Category: Libraries
  • URL:
module (bold = default) build dependencies
virtualgl/2.3.3/b1 gcc 4.4.7 libjpeg-turbo/1.3.1/b1


X Servers and Clients

Normally applications (which are called X clients) send commands to X Servers which drive a display. Often the X client will be running on a remote machine, while the X Server (ie XQuartz on MacOS or MobaXterm/cygwin on Windows), will be running locally attached to a monitor, keyboard, and mouse. This X Server receives X11 instructions (draw this box here, place this button there, etc...), as well as commands that are part of the opengl X11 extension (GLX...).

openGL eXtentions to the X11 protocol

GLX commands can be sent to the GPU attached to the X Server and then rendered on the local display. However, if a 3D model contains millions of polygons, sending all of this data (using the GLX extension) for each frame update can use up the bandwidth and make manipulating complex models laborious. VirtualGL addresses this issue by intercepting GLX commands on the X client and routing them to a GPU-accelerated X Server. Then the resulting pixel buffer is read and then sent to the actual X Server as a simple 2D image.

Using VirtualGL from within a 2D remote desktop server

Another option is to use a remote virtual desktop environment that runs its own non-GPU accelerated X server on the remote machine and then streams the pixels in the desktop back to the local machine. This is what X2go and TurboVNC do. TurboVNC seems to have better default compression and gives a better frame rate, although X2go seems to support several compression methods as well. But using virtualgl from within TurboVNC gives the best of both worlds. All of the rendering and the X11 commands occur locally where the application is running - and the resulting display is streamed back to the client using common compression techniques.

Using X2go or TurboVNC

Before using virtualgl on a compute node with a GPU, you need to request a node in the graphics partition, and connect using either X2go or TurboVNC

To request a graphics node on the cluster you can use salloc.

  salloc -p graphics -t 60

Once you have your allocation, you can query which node you've been assigned by running



Connecting with X2go is fairly straightforward, although you will need to copy your bluehive ssh key to your local .ssh directory.

  • Mac or Linux users, just run
    scp ~/.ssh
  • Windows users can use WinSCP to transfer this file to their local machine. Just make sure the file is not shared.

Then you will need to create another X2go session. Here is an example configuration assuming that 'nodelist' returned bhx0101. Please note that you will need to enter the path to your bluehive key that you copied as well as replacing YourNetIDHere with your actual netid.

You can then reuse this same session file - just replace the host with the output from the nodelist command.


Before you can connect you will need to startup a turbovnc server. You can connect to the node using

  srun --pty $SHELL

and then start the vncserver on display 1 using

  /opt/Turbovnc/bin/vncserver :1

This will prompt you for a password - as well as a view-only password. This choices will be stored in your ~/.vnc subdirectory and will be used for future vncservers. You can remove this directory if you want to change your default vnc password.

You then need to download the TurboVNC client at

The GUI does not support configuring a proxy, but you can pass options to the vncviewer. On the MacOS this looks like

java -jar /Applications/TurboVNC/TurboVNC\ Server=bhx0101:1

It should then prompt you for the password you entered when you started the server and then you should see a remote desktop appear - just like X2go.

Using VirtualGL

Assuming you've connected to your remote desktop on a graphics node, you should be able to startup the 3D X Server by opening a terminal and typing

    Xorg :0

Then if you open a second terminal, you can load the virtualgl module and use vglrun to launch your application. Here we also load the visit module and run the visit application using vglrun.

    module load virtualgl
    module load visit
    vglrun visit

also see Using Software.