Break Out of the Virtualbox Jail: Run Linux Graphical Apps On Windows Using Putty, Xming, and VirtualBox

I use Virtualbox to run linux. But the terminal Virtualbox uses is awful so I ssh in when I want to use the command line. I recently discovered you can also do this for the graphical desktop so you don’t have to put up with the lousy Virtualbox console which fits all the linux elements in a hard to scale box. You can have your graphical linux desktop run right along Windows just as it was another MS Window Window. Follow thiese steps:

  1. Download and install Xming Server on Windows.
  2. Setup your VirtualBox running say debian and boot up your virtual box ( I won’t go into that here but check this tutorial out).
  3. At your debian command line edit /etc/ssh/sshd_config and make these lines “yes”:
     

  4. If you don’t have a graphical desktop installed, install some sample programs:
     

  5. Now on your Windows desktop fire up Putty. Add a profile to ssh into your debian virtualbox machine (hint: if you haven’t already, you’ll need to get your virtual machine’s ip address and you can’t get that until you make sure your debian virtual machine’s network setting is set to bridge so it has an ip address on your local network. Follow the steps under Selecting Bridge Networking)
  6. In your Putty profile Go to X11 and make sure forwarding is turned on. Save your profile.

  7. Now, ssh in to your Virtualbox machine and start an x-windows app.
  8. You should see the eerie “xeyes” program staring at your right on your Windows desktop!:

    That’s right, a Linux program running right on top of your local Windows desktop (actually the graphical elements are being forwarded by your virtualbox session to xming). Really cool and the Windows resizing and movements are unlimited by the Virtualbox Console. Try moving the window around – acts like any other Windows program.
  9. For programs that require sudo you have to use the “-E” option:
     
  10. Now you should see something like this – completely cool. I’ve labeled all the windows so you can appreciate the fact that the gparted GUI is running separately from the Putty and Virtualbox consoles:

    And here’s a video:

Leave a Reply

Your email address will not be published. Required fields are marked *