Revisiting the Graphic Interface for Windows Subsystem for Linux
In this series of articles on Windows Subsystem for Linux (WSL), I've looked at the latest WSL release 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 point in time it wasn't very elegant and definitely not supported. WSL has since supported graphic applications and users have reported that the GUI system works better with it now; in this article, I will look at whether or not this is accurate.
As Xfce4 is one of the most common and widely supported GUIs for Linux, it is the one I will be installing in this article. I will be accessing it using Microsoft RDP with xRDP as the RDP server on Linux.
I updated my system and installed the packages needed 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. When 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 the install, I was asked which display manager to use, and I selected gdm3.
The xRDP server needed to be restarted to read the new configuration file. To do this, I entered:
service xrdp restart
I exited out of root user, logged in as a regular user and configured xRDP to use xfce4 by entering:
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 entered the IP address on the Remote Desktop Connection window.
I logged in as my 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 perform, so I launched a YouTube video and was surprised to find that that it played. The video was a little jerky, and the audio did not pass through, but the video did play.
I looked at its metrics and found that the CPU on WSL was reported at about 50 percent and was receiving about 4Mbps of network traffic.
A visual traceroute showed that the network traffic had two hops before getting to my lab router without any latency between nodes.
I fully expected this article to be longer, but, with the latest release of WSL, getting a graphical interface to work with WSL was dead-simple and I was able to install it easily without any issues, even while letting my RDP session run all day (8 hours).
In this series of articles, I showed you how to install WSL on a Windows system, how to access files to/from the Windows system and how to set up a graphical interface to work with it. I love the tools that Linux has, and I am elated that Microsoft and its Linux partners have spent the time to make WSL a highly usable product.
Tom Fenton has a wealth of hands-on IT experience gained over the past 30 years in a variety of technologies, with the past 20 years focusing on virtualization and storage. He currently works as a Technical Marketing Manager for ControlUp. He previously worked at VMware in Staff and Senior level positions. He has also worked as a Senior Validation Engineer with The Taneja Group, where he headed the Validation Service Lab and was instrumental in starting up its vSphere Virtual Volumes practice. He's on X @vDoppler.