Sign up ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

It seems inefficient to run an X/Server (Xming or Cygwin/X) on a Windows host when a more actively maintained X/Server is already running on a VirtualBox Linux guest. I have a setup that mostly works, but I have the feeling that it is a big hack and that there must be a simpler way.

I now run VB in Seamless mode in Virtualbox and I can get most of the behavior you would expect from an X Server. What I still want to be able to do is:

  • Be able to ssh -Y from the host and get output on the host screen...
  • ... and thus be able to alt-tab between all windows (host and guest) using the host's Window Manager
  • Not have to deal with the workaround of re-assigning screens (see below) when I remote desktop into the host
  • Be able to move the guest-running and remote-running applications between different screens without having to use window rules in VirtuaWin.

That was the end of the question part. In summary: can I use an X/server on a guest to provide X services from the host?

What follows are instructions to get to the stage I am at now, which does the basics. It is noticeably faster and smoother (for me) than either Xming or Cygwin/X:

  • Upgrade to the latest VB (4.2.16 as I write this, August 2013)
  • Change the window manager to XFCE
  • Run VB in Seamless mode
  • Some other stuff related to dual head with differing geometry and using VirtuaWin (yes, I know, I am pushing my luck):
    • Follow these instructions (I did the item II, using arandr)
    • Make sure that in the VB &View Menu, the mapping between virtual and real screens is correct.
    • If you remote-desktop, or your screen geometry changes for whatever reason, you can:
    • Use arandr to adjust the geometry, or when that fails...
    • ... reassign the screens incorrectly and then correctly in VB.
    • Add rules to the VirtualBox windows in VirtuaWin so that they show up on all desktops and are always on top.
share|improve this question
Your current setup involves running an X client on the host, which talks to the X server on the guest, which creates windows on the host's display via some Virtualbox magic. This seems considerably more inefficient than simply having X clients, be they wherever, talk to an X server on the host -- the latter configuration also permits your virtual desktop manager to manage X server windows natively. (On that latter point, I prefer Dexpot, which might be worth a look for you; it's the most capable Windows virtual desktop manager I've found in ten years of trying.) – Aaron Miller Aug 8 '13 at 14:58
Thanks for the Dexpot pointer. I'll check it out. In terms of speed, you are correct: It is rather a lot of gymnastics to run the server on the guest. But there is a server running already -- why run two? That is the sense in which it is more efficient to do it on the guest (if practial). I guess if I was happy with XMing and Cygwin/X that would be fine. But each has separate issues in my setup. – Leo Aug 8 '13 at 15:24
Sure, but running an X server on the host costs effectively nothing in terms of resources, and your current configuration incurs extra cost for every X protocol message that gets passed. I've found Cygwin/X to be kinda flaky, and Xming perfectly satisfactory with a modicum of effort; would you like to elaborate on the issues you've seen with them? Given the other benefits of running an X server on the host, such as having your desktop manager manage X clients' windows, it seems possibly worthwhile to spend some effort finding out whether a modus vivendi can be reached. – Aaron Miller Aug 8 '13 at 15:38
With X/ming the problems are three, all of which are serious: handling geometry changes due to remote desktop connections; issues with the Java Swing library; and the fact that the easily redistributable version is several years old. I do agree that for the vanilla case it is a great choice. I also have found Cygwin/X to be kinda flaky. Xming hangs too, but less often. – Leo Aug 8 '13 at 16:56
The geometry-change issue can be handled (works for me anyway) by precalculating the maximum possible X and Y dimensions and passing them as an argument to the -screen option, e.g. xming.exe -clipboard -multiwindow -screen 0 max-width max-height. I haven't tried the up-to-date Xming release; the free version has sufficed thus far. Regarding Swing issues, I have no direct experience, but consider this and this. – Aaron Miller Aug 8 '13 at 20:04

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.