WSL GUI - tomyummmm/Gen2-UHF-RFID-Reader GitHub Wiki

The following has been tested on Windows 10 Version 21H1, WSl 2 Ubuntu 20.04 LTS, usbipd-win 1.3.0, GWSL 1.4.0.

Windows 11 natively supports WSLg, which has not been tested, but should operate similarly in concept to GWSL on Windows 10. See Official WSLg GitHub repo for more info. A video on Windows 11 runs Graphical Linux Apps out of the box with WSLg by Scott Hanselman showing this feature. Windows 11 is too unstable at point of writing this, hence sticking to Windows 10 and GWSL.

Install GWSL

Minimum requirement: Windows 10 version 2004

Install from Microsoft store

Follow manual and ensure GWSL is granted both private and public network access in firewall. This can be tested by opening XClock.

Open GWSL Dashboard, choose Distro Tools, and choose your distro if you have multiple installed, then enable Display to Set to Auto-Export.

Install Desktop Environment

In order to access GWSL with a full Linux Desktop experience, we will install XFCE through the WSL terminal:

sudo apt install xfce4

You can choose either gdm3 or lightdm, we selected gdm3. Once it has finished installing, we will use the Shortcut Creator.

Creating XFCE4 shortcut on Windows

Open the Shortcut Creator from the GWSL Dashboard and fill the following options:

Shortcut Label: XFCE
Shortcut Command: startxfce4
More Options
Display Mode: Single Window

Test configuration and give it 1-2 minutes to load everything, if it works without any glitching or black screen, you can Add to Start Menu on the Shortcut Creator. The shortcut created in Windows Start Menu will have the name XFCE on Ubuntu 20.04.

We enable Single Window mode so that we can still easily Alt + Tab between other programs on Windows. All other options can be left as default. You can close the GUI like any normal program.

Creating GNU Radio Companion shortcut on Windows

Open the Shortcut Creator from the GWSL Dashboard and fill the following options:

Shortcut Label: GNU Radio
Shortcut Command: gnuradio-companion %F

Test configuration and give it 1-2 minutes to load everything, if it works without any glitching or black screen, you can Add to Start Menu on the Shortcut Creator. The shortcut created in Windows Start Menu will have the name GNU Radio on Ubuntu 20.04.

All other options can be left as default.

Coding / IDE's on WSL

I will be showing 2 methods, Visual Studio Code and Pycharm Community.

Visual Studio Code is entirely free, with WSL Remote extension for free, and can readily be opened in Windows from within WSL with a simple code . in any folder. Pycharm Community (free version) does not have support for WSL integration, only Pycharm Professional.

Visual Studio Code + WSL Remote

Visual Studio Code has 2 tutorials available with comprehensive instructions. Developing in WSL and Remote development in WSL. If you have no experience, it would be best read in sequence. A video WSL2, Visual Studio Code, Windows 10, Ubuntu/Linux + more - Computer Stuff They Didn't Teach You #19 by Scott Hanselman showing these features.

Important Note

WSL 2 does not include systemd, hence it is unable to execute udev rules on startup and provide permissions that persist across sessions. The SNAP store of Ubuntu is also dependent on systemd, so it is unavailable in WSL 2 as of December 2020. Hence we can't install Pycharm using sudo snap install [pycharm-professional|pycharm-community] --classic.

Pycharm Community

Pycharm Community can be installed on WSL using a mix of Windows and terminal.

  1. Download the pycharm-*.tar.gz from the link above in Windows, and in WSL change directory to ~ or any working directory. cd ~ and then type explorer.exe . to open the current directory in windows explorer.
  2. Move the pycharm-*.tar.gz from your Windows download location into the WSL directory open in file explorer.
  3. The recommended installation location according to the filesystem hierarchy standard (FHS) is /opt. To install PyCharm into this directory, enter the following command in WSL:
sudo tar xzf pycharm-*.tar.gz -C /opt/
  1. Switch to the bin subdirectory:
cd /opt/pycharm-*/bin
  1. Add the following into ~/.bashrc and source ~/.bashrc after.
# Add pycharm to path
export PATH=/opt/pycharm-community-2021.3/bin:$PATH
  1. Add into /etc/bash.bashrc
export LIBGL_ALWAYS_INDIRECT=1
  1. Run pycharm.sh from the bin subdirectory.
sh pycharm.sh

Creating Pycharm Community WSL shortcut on Windows

Open the Shortcut Creator from the GWSL Dashboard and fill the following options:

Shortcut Label: Pycharm WSL
Shortcut Command: sh /opt/pycharm-community-2021.3/bin/pycharm.sh

Change version of Pycharm community accordingly. Test configuration and give it 1-2 minutes to load everything, if it works without any glitching or black screen, you can Add to Start Menu on the Shortcut Creator. The shortcut created in Windows Start Menu will have the name Pycharm WSL on Ubuntu 20.04.

All other options can be left as default.

⚠️ **GitHub.com Fallback** ⚠️