How to run Linux desktop using Windows Subsystem for Linux

One solution to this problem is to use Windows Subsystem for Linux, but this tool does not have a desktop environment.

Running Linux along with Windows has proven to be increasingly useful over the years. But dual booting may be difficult to manage, while setting up virtual machines has some stability issues.

One solution to this problem is to use Windows Subsystem for Linux, but this tool does not have a desktop environment. So why not just install the Linux distribution you own?

Below, how to run the Linux desktop in Windows with Windows Subsystem for Linux.

How to install Linux desktop with Windows Subsystem for Linux?

  1. What is Windows Subsystem for Linux?
  2. Ensure Windows 10 is compatible
  3. Install Linux desktop in Windows
  4. Please install the application without the Linux desktop

What is Windows Subsystem for Linux?

Windows Subsystem for Linux is provided with Fall Creators Update Windows 10 update in 2018. This is an optional feature that can be easily installed. Windows Subsystem for Linux supports installing Linux operating systems available in Windows Store.

Picture 1 of How to run Linux desktop using Windows Subsystem for Linux

Basically, you can open a Linux terminal in Windows, then install and run the Linux software. No need for a virtual machine or dual boot.

However, the problem with Windows Subsystem for Linux is that it completely uses the command line. There is no desktop. For advanced users, this may not be a problem. But Linux has many options for the desktop environment, so the Windows Subsystem for Linux using only the command line seems a bit confusing.

Fortunately, you can now install the Linux desktop in Windows, as long as you have previously installed Windows Subsystem for Linux.

Ensure Windows 10 is compatible

Before continuing, note that you must be running a 64-bit version of Windows.

You can check the Windows version in Settings> System> About and find the System type section. This part must contain the content of '64-bit operating system '. If not, you need to upgrade Windows 10 from 32-bit to 64-bit.

Picture 2 of How to run Linux desktop using Windows Subsystem for Linux

Another prerequisite is that you need to run Windows 10 build 14393 or higher. This information is in the same About screen , listed in the Windows specifications section. Find the OS build section . If the build is higher than 14393, you can use Windows Subsystem for Linux. If not, just run Windows Update.

Once you've made sure Windows 10 is compatible, it's time to follow the instructions to install Windows Subsystem for Linux.

Install Linux desktop in Windows

If you have set up Windows Subsystem for Linux, click Start and enter bash. Click on the first option (command to run bash) to start using Linux. The following steps assume you have installed Ubuntu as a Linux operating system.

Start by updating and upgrading Ubuntu:

 sudo apt update 
 sudo apt upgrade 

While the upgrade process is running, go to Sourceforge to download and install the VcXsrv Windows X Server utility. (Other X servers are available for Windows including Xming and MobaXterm. But in the rest of this tutorial, we will only use VcXsrv ).

Server X allows you to access the Linux application or the GUI of the desktop environment. Linux systems rely on X to display the desktop, but can also be used across the network.

Make sure server X is installed before continuing. The next step is to install the Linux desktop.

Many Linux desktop environments are available. The simplest is to install a compact environment like LXDE. To install, enter:

 sudo apt install lxde 

After installing LXDE, enter the following command:

 export DISPLAY=:0 export LIBGL_ALWAYS_INDIRECT=1 

This command instructs Linux to display the desktop via server X. So when you run the downloaded server X program, you will see the Linux desktop environment.

Instructions have used VcXsrv with XLaunch tool . Click here to see the X Display Settings window and select One large window or One large window without titlebar . Find Display number and set to 0 .

Picture 3 of How to run Linux desktop using Windows Subsystem for Linux

Click Next, then select Start no client to make sure XLaunch only starts the server, allowing to boot the Linux desktop later. Click Next again, and then click Finish. Click Save configuration to save.

Picture 4 of How to run Linux desktop using Windows Subsystem for Linux

In the command line, enter the command to start your favorite LDE. For example, for LXDE, use the command:

 startlxde 

Linux desktop environment will appear!

Picture 5 of How to run Linux desktop using Windows Subsystem for Linux

Now, you can run any pre-installed Linux software and even install new applications and utilities.

Please install the application without the Linux desktop

In addition to installing the Linux desktop, you only need to install the Linux desktop application from Windows 10. This is useful if you find installing a full desktop for an overkill device.

For example, to install the media player Rhythmbox and run it in Linux on Windows, use the command:

 sudo apt install rhythmbox 

Make sure you have the export command :

 export DISPLAY=:0 

Then just run the application from the Bash prompt:

 rhythmbox 

The media player will launch, ready to browse the library.

Picture 6 of How to run Linux desktop using Windows Subsystem for Linux

Now, in this case, obviously you will need to add some media files to the Linux environment on your computer. You can do this by installing the browser and downloading the files, or simply, connecting the USB to the media files above.

After connecting to USB, remember to mount it (this example uses drive letter D:) :

 sudo mount -t drvfs D: /mnt/d 

When done, you will need to disconnect the USB connection before removing it. This ensures the integrity of the data on the drive.

 sudo umount /mnt/d 

Although Windows directories can be browsed from within a Linux application, no files can be opened. This is a shortcoming of Windows Subsystem for Linux, although it protects both Windows and Linux environments from damage.

Windows Subsystem for Linux makes it simple to run Linux software on Windows PC. Meanwhile, users do not need to worry about virtual machines or dual boot anymore.

With the Linux desktop installed, everything is almost perfect. This is a great way to capture Linux with the comfort of Windows desktop.

Hope you are succesful.

Update 26 May 2019
Category

System

Mac OS X

Hardware

Game

Tech info

Technology

Science

Life

Application

Electric

Program

Mobile