Phil Hassey - game dev blog
Phil Hassey as Rambo
".. I've been there,
I know what it's like,
and I'll do it again if I have to."

Running OpenGL Apps on a Linux guest in VMWare Fusion

Here’s my “tip of the day” for running OpenGL Apps on a Linux / Ubuntu guest in VMWare Fusion.  The problem is that while running VMWare Fusion on OSX, your guest Ubuntu system doesn’t have 3D acceleration.  Bummer!  I really like doing my game-dev under linux .. so after a bit of searching I found this neat trick:

1. Open a Terminal in OSX (host OS)

2. ssh -Y ip.address.of.guest.OS
(You can find out the IP address of your guest OS via ifconfig.)

3. run the game you are working on 

4. OSX pops up a window with your game running at full speed!

Via that SSH session I can run my games under linux, but the OpenGL stuff is forwarded to my OSX host, which renders it at full speed.  This is called X11 forwarding, which I had heard of before, but I didn’t know it included OpenGL 🙂

I’d love it if Fusion included 3D acceleration of linux-based Guest OSs, but in the meantime, this will get me by.  One thing to note, this isn’t perfect.  I tried running tux racer, and although it seemed to run at full speed, the view wasn’t centered and so I only saw the top left 25% of the game.

-Phil

4 Responses to “Running OpenGL Apps on a Linux guest in VMWare Fusion”

  1. philhassey Says:

    Here’s another article that covers a handful of variations on this:

    http://www.vanemery.com/Linux/XoverSSH/X-over-SSH2.html

  2. philhassey Says:

    interestingly, I tried getting gnome to start up, which it did .. but after that the keyboard codes were all mussed, so that didn’t really seem to work so hot.

  3. philhassey Says:

    I also found that if I then open a terminal on my Guest OS, I can type this:

    declare -x DISPLAY=”localhost:10.0″

    and then anything I run pops up in my OS X X11.

  4. greg Says:

    What makes game-dev under linux so great?