How to install Linux GUI apps with WSL 2 on Windows 10

preview_player
Показать описание

Additional info:
When using WSL2 with support for GUI apps, the integration automatically starts a “companion system distro,” which includes a Wayland, X server, pulse audio server, and all the required components to make the experience possible. After you close the app and WSL, the system distro will end automatically.

Table of contents
00:00 Intro
01:25 WSL2 Setup
03:41 Linux GUI app install
05:27 Integration details
07:59 Linux GUI app uninstall
08:47 Closing

Рекомендации по теме
Комментарии
Автор

i never thought i would live long enough to see Linux apps run in Windows like this ever...

ricigri
Автор

For most people running this on Windows 10 (and for a number on Windows 11) they will need to make sure that they have enabled several settings before this will work.

First, in Windows > Control Panel > Programs > "Turn Windows features on or off", make sure that you check (enable) "Hyper-V" and "Windows Hypervisor Platform" and "Windows Subsystem for Linux".

Second, you have to make a change to your BIOS. For me I had to re-boot, and while the computer is booting I have to press either F2 or delete to enter BIOS (each computer is different and the loading screen should say). Since I have an Intel computer, I made sure "Intel Virtualization Technology" = Enabled and "No-Execute Memory Protection" = Enabled.

For AMD CPUs, you will look in your BIOS for a feature called: "AMD (AMD Secure Virtual Machine, AMD SVM)" and enable it.

After that Ubuntu will be able to work on Windows 10

ronsandahl
Автор

This is super cool!
I don't want to risk installing Insider Preview in my daily driver; luckily, according to the Microsoft documentation, "Support for Linux GUI apps via WSL will become generally available in the next major release of Windows."
Let's hope that turns out to be true so we can all benefit from this :)

glitchy_weasel
Автор

Unable to init server: Could not connect: Connection refused
when i enter gedit command

IStMl
Автор

Unable to init server: Could not connect: Connection refused

(gedit:65): Gtk-WARNING **: 10:14:56.974: cannot open display:

need help why does this happen

troxical
Автор

Thanks! I didn't realize how much easier they'd made it to use gui apps. Very helpful video!

smoocher
Автор

Great video!!! I tried a lot of ways to get the linux GUI. Now I can watch the the python plot. Thanks for the video!

celdan
Автор

Nice video💙, I'am waiting for official build. This is exclusive feature for windows 10, especially for Linux users, thanks for this video :)

chandus
Автор

you need to be part of the windows insider program for this to work as shown

andrewh
Автор

How to fix Gtk-WARNING **: cannot open display:?
Thank you

jeffreyfenis
Автор

Thank you. This is very helpful. Keep up the good work.

ColePatterson-mwgy
Автор

Can you please make a video on how to install Linux File explorer on windows 10. It would be very Amazing!

laquinn
Автор

i am getting Gtk-WARNING **: 23:43:03.867: cannot open display:

iamworstgamer
Автор

wow, updating wsl did the trick, thanks! I spent way to much time trying to get xming to work, and now I don't need it :)

amkval
Автор

Thanks for the solid info save a dual boot setup

jimmysoncookland
Автор

By default, its graphic drivers (llvmpipe) are run in software mode so if you want to do some serious hardware acceleration GUI, you have to install these:

1. GPU drivers specifically for WSL functionality
2. Latest mesa drivers from PPA.

Right now, hardware acceleration in WSL only up to OpenGL 3.0 at the moment so running OpenGL 4.0 applications will throw out an error. Also for AMD GPU users, it is strongly recommended to install OpenGL & OpenCL compatibility pack from windows store. Windows 11 is already supporting WSL2 gui but with the right setup you can get linux gui apps launched without any 3rd party apps.

AmirZaimMohdZaini
Автор

That is a quite interesting feature for wsl2

gavinxu
Автор

I'd like to point out that the mentioned build number is some dev build one form 2021 (the time when video was posted) and is by now outdated anyway. Official builds have different numbering and therefore may "appear older" (mine is 19045 for example) whereas they are actually newer. Would be nice if minimum requirement would be also mentioned by official build numbers to eliminate this confusion.

kito
Автор

Can I install One of the Linux distribution like, 'Linux mint' Instead of Linux Ubuntu. And we can able to install 'build essential' package on it. pls reply me ...!

chandus
Автор

Is there a date of release for this feature in windows stable?

camilomartinez