I just managed to get a Linux GUI app running on my windows desktop without the need for a virtual machine. This must seem old-hat to Linux pros, but damn it opens up a world of possibilities.

Thanks to Jessie Frazelle’s blog post on running docker containers with guis, and qinwf’s github comment on a moby repo issue, I was able to get linux firefox running from a container.

The steps are pretty simple:

  1. Install XMing Server (I did so via chocolatey)
  2. Run ‘XLaunch’ and disable access control.
  3. Run your docker image with the environment variable “DISPLAY” pointing to your hostname and display number. e.g

     docker run -e DISPLAY=myhostname:0.0 jess/firefox
    

Note: The :0.0 is just pointing to whatever display has been set up, you can check this in the logs as near the end of the startup sequence, it’ll spit out something like

winClipboardProc - DISPLAY=127.0.0.1:0.0

If that number at the end is different, use that one, I suppose.

While my example has been done with Docker, doing exactly the same for a linux desktop should be no problem either. You could even just invoke application startup via ssh commands, or forward your whole x-windows content, I suppose. I’ll have to try that next.