Revisiting the GUI for Windows Subsystem for Linux
In this series of articles on Windows Subsystem for Linux (WSL), I looked at the latest version of WSL and found that I could install it with just a few commands, and also that I could view and read and write files to/from Windows and my WSL Linux instance. A few years ago I wrote an article about how I could use a GUI system with WSL, but at that time it wasn’t very elegant and certainly not supported. WSL has since supported GUI applications, and users have reported that the GUI system works better with it now; in this article, I will look at whether this is correct or not.
Since Xfce4 is one of the most common and widely supported GUIs for Linux, it’s the one I’m going to install in this article. I will access it using Microsoft RDP with xRDP as the RDP server on Linux.
I updated my system and installed the necessary packages by entering the following commands:
apt -y upgrade
apt -y install xfce4
apt -y install xubuntu-desktop
apt -y install xrdp
It took about 45 minutes to download and install the above packages. While installing the xubuntu desktop, it stalled for about 20 minutes with the following message, but eventually continued: “Initializing mlocate database; this may take some time… .”
During installation I was asked which display manager to use and I selected gdm3.
The xRDP server had to be restarted to read the new configuration file. To do this, I entered:
xrdp service restart
I left the root user, logged in as a normal user, and configured xRDP to use xfce4 by typing:
echo xfce4-session > ~/.xsession
As I will be connecting to the IP address of the WSL system, I entered:
In the windows start box I entered mstsc to start the RDP session and enter the IP address in the Remote Desktop Connection window.
I logged in as user (usero1) and was presented with a Linux desktop. From the desktop, I could launch a Firefox web browser, a terminal window, and the application finder.
I was interested to see how well it would work, so I fired up a YouTube video and was surprised to see it playing. The video was a little jerky and the audio did not play, but the video played.
I looked at its metrics and found that the CPU on WSL was reporting at around 50% and receiving around 4 Mbps of network traffic.
A visual traceroute showed that network traffic had two hops before arriving at my lab router with no latency between nodes.
I was expecting this article to be longer, but with the latest version of WSL getting a GUI to work with WSL was extremely simple and I was able to install it easily without any issues even leaving my RDP session run day (8 hours).
In this series of articles, I’ve shown you how to install WSL on a Windows system, how to access files to/from the Windows system, and how to set up a GUI to work with it. I love the tools in Linux and I’m glad that Microsoft and its Linux partners have put in the time to make WSL a highly usable product.
Tom Fenton has extensive IT experience gained over the past 25 years in various technologies, with the past 15 years focusing on virtualization and storage. He currently works as Technical Marketing Manager for ControlUp. He previously worked at VMware as a senior course developer, solutions engineer, and in the competitive marketing group. He also worked as a Senior Validation Engineer with the Taneja Group, where he led the Validation Service Lab and was instrumental in starting its vSphere Virtual Volumes practice. He’s on Twitter @vDoppler.