Solved Dummies way of running WSL2 GUI apps from Windows desktop / menu without any steps other than installing the Linux apps via standard package mgmt.


jimbo45

Well-known member
Pro User
VIP
Local time
1:05 AM
Posts
4,031
Location
Hafnarfjörður IS
OS
Windows XP,7,10,11 Linux Arch Linux
Hi folks
If you don't need the full desktop GUI for a Linux distro and want to run these from the Windows desktop via shortcut or menu without starting wsl and logging on it's really easy if you just do this. All examples running on W11 build 22000.376 with wsl2 enabled and ubuntu-18.04 (LTS).

You don't also need obscure ways to get the IP address of the WSL image or install X-Servers on Windows (the WSL2 built in windows X-sever handles the display).

You don't need to mess around with dotnet.5 or 6 runtime either to get these all working -- WSL2 has come on by leaps and bounds recently becoming really useful in Windows --best of both worlds - secent Windows and Linux apps running seamlessly from a Windows desktop. !!

1) You must after installing WSL2 run from powershell wsl update
2) restart the WSL
3) install the GUI applications you want to run : they will be installed to this directory in Windows

e.g : I've installed these so far on ubuntu-18.04

Skjámynd 2021-12-21 105539.png

simply right mouse click and -->create short cut

e.g say I want konsole (the linux kde konsole) I've made a short cut

Skjámynd 2021-12-21 105826.png
Now I simply from Windows desktop run it with no further ado

Skjámynd 2021-12-21 110107.png


If you need to run a program that needs Root privileges e.g gparted then from the linux console switch to root and run it sudo gparted -- I haven't yet worked out if there's a way of running those programs directly via a short cut but using the console isn't to hard as there's not many programs you need super user privileges for.

e.g
Skjámynd 2021-12-21 110728.png


Much better Bit torrent client -- for example deluge -- run staright from windows desktop / taskbar or start menu (your choice)

Skjámynd 2021-12-21 120045.png
If you don't neeed a full GUI this provides perfect integration seamless integration with Windows. No extra steps needed other than to install the programs you want (simple in ubuntu / debian / arch linux type of distros (apt or pacman) - resizeable too

I like the evolution email package so it's good installing that too-- plenty of people might have a version of Office e.g Home and Student edition which doesn't have an email client in it.

-- in some ways this is a lot better than messing around with a full desktop GUI -- the seamless integration with windows and the extremely fast performance can make this a far better option for a load of users than using "classical VM's".

Anyway this stuff is fun to mess around with.

Don't forget it's really easy also to delete any distros simply by wsl --unregister distro-name if things get hosed up so you can re-start. This stuff is all running on UBUNTU-18.04 -- should also work on UBUNTU 20.04 -- will try that next and then a few other distros. I really don't actually need the full Linux desktop -- Integration with windows is just fine.

You can change the icons etc by standard proerties in the desktop -- either copy a new one from a windows.dll file or create one manually via an ico creator.

Cheers
jimbo
 
Last edited:

My Computer

System One

  • OS
    Windows XP,7,10,11 Linux Arch Linux
    Computer type
    PC/Desktop
    CPU
    2 X Intel i7
Back
Top Bottom