Run Linux GUI applications on Windows 10

A Little Background

As much as I would like to ignore Windows in the tech world, it can not be marginalized. To many users with to many applications on to many systems operate on Windows. Coupled with the recent moves by Microsoft into the free or open source software (FOSS) world Windows is as well making major headway towards being taken seriously in the IT / engineering world.

The Current Situation

At home I run Ubuntu 18.04, on the go is a 15″ MacBook Pro, my phone is some version of Android, and finally in the office we run on Windows 10 HP notebooks. I am as far from the unified experience as a user could possibly get. Being able to running Linux programs on Windows is a highly desirable ability given my current role. Windows Subsystem for Linux has makes this possible very easily. I can even run a container using Docker on Linux wrapped in Windows. #softwareabstractioninception. This is an amazing leap from ten years ago when when running LAMP stack properly working with IIS was a journey into madness. Interoperability has progressed so far that running a Linux GUI program on Windows is now possible. Thus this walk through.

The Solution

From the Windows Store install the Windows Subsystem for Linux (WSL). I chose the Ubuntu option.

Linux on Windows #mind-blown

Next we will want to install Xming on to Windows 10. If can be obtained from https://sourceforge.net/projects/xming/. Follow the install directions as they appear from the installer.

Check that out. An X11 server on Windows 10.

Press the START button and type ‘wsl’. Start the Windows Subsystem for Linux program. When the Linux terminal is available let’s install gvim.

sudo apt-get install vim-gtk
gvim Installed

The final step before being able to run the Linux application is to tell WSL what display to send the video data to. This will be the Xming server running on Windows.

export DISPLAY=:0

Now, if everything went as expected, we should be able to run gvim and see the application open.

gvim

Wow, look at that!

Conclusion

Given historic context it would be easy to dismiss Microsoft Windows as a legitimate development environment. However, with the advancement in containerization, Windows subsystems,  and Microsoft’s embrace of the FOSS community; Windows might just be worth staying with as a home/office desktop.

Resources


Also published on Medium.