I am trying to run an OpenGL 2.1+ application over SSH.

[my computer] --- ssh connection --- [remote machine] (application)

I use X forwarding to run this application and with that in mind I think there are a couple of ways for this application to do 3D graphics:

  1. Using LIBGL_ALWAYS_INDIRECT, the graphics hardware on my computer can be used. According to this post this is generally limited to OpenGL version 1.4.
  2. Using Mesa software rendering on the remote machine. This supports higher versions of OpenGL, but uses the CPU.

However, in my case the remote machine has a decent graphics card. So rather than software rendering, I was wondering if it could do hardware rendering remotely instead.

Also, if there is another way to use my machine's graphics card that would be great too.

2 Answers 2


The choice is not necessarily between indirect rendering and software rendering, but more precisely between direct and indirect rendering. Direct rendering will be done on the X client (the remote machine), then rendering results will be transferred to X server for display. Indirect rendering will transmit GL commands to the X server, where those commands will be rendered using server's hardware. Since you want to use the 3D hardware on the remote machine, you should go with direct rendering (and accept overhead of transmitting rendered raster image over the network).

If you application cannot live with OpenGL 1.4, direct rendering is your only option.


I used to have ssh remote setup to run patched opengl driver. But that involved some hacks like hijacking a remote X server for rendering (login in remote machine, ssh in and set DISPLAY to :0). For you case it makes more sense to separate offscreen xserver. I don't remember if it is possible to start xserver remotely in offscreen mode but with GPU drivers loaded. VirtualGL project seems to promise it supports exactly what you are looking for. I haven't ever tried it but website looks promising.


Other alternative are vnc and xdmcp. They allow access to complete remote desktop environment.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .