Multiple Xming servers on a single Windows host

One use-case we have at work for Xming is to be the X11 server on a Windows RDP terminal server. For security reasons (don't ask!) we can only access certain Unix hosts via an RDP session from our desktops, not directly over the campus LAN. So, we installed Xming on the TS and it works well. Except if two or more people wish to use it at once. Then it's first come, first served.

I found a work-around for this that works, but is inelegant: start with a different display number argument.  For instance, the normal Xming start-up parameters are like this:

D:\Programs\Xming\Xming.exe :0 -clipboard -multiwindow

Change the :0 to be something else, and you can have a second (or third) instance running on the same host. Then, so long as you launch an xterm on the remote hosts using an item from your Xming menu, then it seems to pass the X11 packets back to your instance of the server, and not to other people on the same TS.

There are at least a couple of issues with this:

  • It's not very resource efficient. But I can't see a way around this, so long as we are using the RDP terminal server
  • You need to manually allocate display numbers to different people. If two people pick the same number, one will lose (first come, first served again). But at least your clients won't end up on their server...

If anybody can think of a way to snoop which displays are already taken, then choose the next one, it'd be neat!