I am working through the Opengl Bible 5th edition. Due to a recent hardware failure my primary machine is now an old laptop that does not support the opengl standard for my tutorial book. I have a headless server running Ubuntu 11.10 which has a capable graphics card. I would like to code though SSH and have my compiled program display on a monitor attached to the server. How would I go about doing this?
You did not specify too much about your environment, so let's go one by one. First, if you were running Ubuntu (or any GNU/Linux for that matter) on your previous machine, you are most likely using X Windows for display in your OpenGL applications. Given that assumption, all you need is a working X Windows server on your "headless" server (note that when you attach a monitor, it's not headless anymore). If you don't have it installed (which would be the case if you installed Ubuntu Server edition, for example), you need to install it first, check this:
Note that it's not advisable to install X (or anything not necessary) on pure-servers for various reasons, see Arguments Against a GUI section in the above link to see some of them and decide whether it's something you want to do or not.
When you have that installed (which you can check e.g. by running
you can see that this variable has the following format:
If you don't have a SSH server installed, you need to install it - it's fairly simple, here's one of many tutorials:
Check that your ssh is working by running
if your server's IP is 10.0.0.5. If that succeeds, you are all set.
Now that you can SSH to the server, all you need to do is just run
provided you use
If, on the other hand, you want to run the app itself on the laptop and just display on the server, all you have to do is change the
providing that IP of your server is 10.0.0.5. You can try the above in terminal following by
Hope this helps.
I had similar problem. Good solution for that is VirtualGL http://www.virtualgl.org/
It's pretty easy to set up. Here's the manual.
It runs the application on the server and redirects OpenGL output to the client as raw frames (afair compressed for better performance).