Graphical Interfaces
Last updated
Last updated
This topic is: advanced
If you know how to use Linux and you are comfortable using it, you can do this.
You know WSL can be accessed only by command line. But there's a way to use apps.
WSL2 now have its own graphic server called WSLg. It's preinstalled and ready to go.
You can try it, install some GUI application like mousepad
in WSL.
You will see Mousepad in your Windows Start Menu.
In my experience, I prefer using an alternative because WSLg gave me some problems, it's beta anyways, errors may happen.
The same name? Almost! GWSL is an , the same idea as WSLg. In my opinion, with GWSL I feel more "in control" than WSLg. We need to configure it before using.
You can install GWSL from the Microsoft Store. Don't worry by the price, that's a donation. If you want it just for free just click "Free Trial", you will have it forever.
When it is installed open GWSL from your Start Menu.
If is the first time you open GWSL in your PC, a firewall prompt may appear. Allow access.
Before we continue, we need to tell our distro to use GWSL for display exporting.
GWSL is designed to be easy to configure without using any commands.
Open GWSL menu (click the icon in the taskbar) and select "GWSL Distro Tools". Then "Display/Audio Auto-Exporting", "LibGL Indirect" and "Configure DBus".
Then, click "Reboot Ubuntu 20.04". That's it.
To check if GWSL was properly configured, check your .bashrc
file. At the end, it must have these lines:
If you use GWSL, is recommended to disable WSLg too. For this, you must create the file .wslconfig
in your Windows personal folder (%HOMEPATH%
). Inside, put this:
Now WSLg is disabled and we can use GWSL without conflicts.
Supposing you have installed the same application as before (Mousepad). Open your GWSL Menu and go to "Linux Apps", you will see the app there.
With GWSL you can create your own shortcuts. Open the menu and select "Shortcut Creator".
There you can specify the command of the app to be opened, if it requires 'sudo', and more settings if you need. The shortcut will be created in your Start Menu.