Windows Subsystem for Linux (WSL) Install & Setup

The Windows Subsystem for Linux (WSL) enables a Unix distribution to run in a "virtualized" environment under Windows OS. Some common linux distributions, e.g., CentOS and Ubuntu, are currently available from the Windows App store for download and use in WSL. The WSL terminal window looks much like what you would see in a virtual machine running on Windows, but includes access to your home directory on the Windows side via NTFS. So if your Windows username was "bill" then from the WSL terminal window you can see bill's download folder as /mnt/c/Users/bill/Downloads. The username you pick to run in the WSL linux environment has sudo/admin privileges and need not be the same as your username, e.g., "bill" on the Windows side.

To setup WSL, the PowerShell must first be used to enable WSL. Then a linux distribution needs to be installed in the WSL environment. Subsequently additional software may need to be installed to run on the Windows side and/or in the Linux distribution running under WSL depending upon what you want to run under Linux.

In order to run X-windows based graphics programs in WSL, an X server needs to be installed on the Windows side (since the Windows OS is driving the graphics hardware and there is no native X server in Windows). Accordingly, the WSL linux environment needs to be set/tested to run X based graphics in WSL with the X server running under Windows (instead of under Linux).

The instructions below will show how to setup the WSL environment (under Windows 10) with a linux distribution in order to run Freeview (using a 3rd party X server running under Windows 10).

WSL is still under development and changing with each release. WSL was not (at least initially) intended to reproduce a fully functional X based Linux GUI/desktop environment such as Gnome or KDE; it was primarily intended to give Windows developers a way to test their applications with Linux based services. That being said, WSL can be setup to display graphics with varying degrees of success for different Linux distirbutions.

Enable WSL from PowerShell

Bring up a PowerShell window,

Run the "enable optional feature" command. You should be able to cut and paste the command from the MS documentation, WSL_install

Install a Windows X Server and Fonts

Use of the Xming X server will be shown in the examples below. Please note there are other X-servers available for Windows.

Download a copy of the X-server and the corresponding X-fonts from the (Xming) web site, Xming. The paid 7.x version is preferable to the free 6.X version, however the 7.x version is not free. The examples below will show using the 6.x version, i.e., the 6.x version of the X-server and the 7.x version of the fonts have been downloaded into the Downloads folder in the screen shot below.

First run the Xming installer. You can accept the defaults presented by the installer menus including allowing it to install "Xming" and 'Xlaunch" shortcuts on the desktop.

Next install the corresponding X-fonts,