WSL2 GUI in windows 10 with xserver easy steps latest 2022

preview_player
Показать описание
The Real Network LAB

---------------------------------------------------------------------
Hi All,

Install WSL 2 linux kernal, Link in the description

i already downloaded n installed

after installation make ver 2 as default : wsl --set-default-version 2(in powershell)

Install Linux from Store(ubuntu or kali)
i installed ubuntu 20.04

Install Xserver in your system linux GUI Application.(link in description)

install gedit for testing or x11-apps
i already installed

edit .bashrc file with : export DISPLAY=X.X.X.X:0"
go to home dir and edit bashrc file save and type below cmd

cmd: source .bashrc

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

Thanks a lot for this updated guide.
Just want to share my experience and additional workaround to make mine work:

1. If this guide still doesn't work for you, it may be due to the firewall so I created an exemption for "vcxsrv.exe" specifically. Make it allow inbound and outbound connections.
2. Sometimes the "Native opengl" option doesn't work (gui still runs but the visualization is broken), especially for more complex GUI apps (in my case, a structure visualizer XCRYSDEN) so I just untick it.
3. If the IP address of your windows is dynamic / changes frequently, it may be more convenient to use
export DISPLAY=$(cat /etc/resolv.conf | grep nameserver | awk '{print $2}'):0

in bashrc to automate the IP address encoding.

Hope this helps!

Thanks again!

kurtrojas
Автор

Thanks for the vid, now I can back to learning SFML...

awekwardwizard
Автор

I laughed when you ran sudo /etc/resolv.conf .

howtoeverythingchannel
Автор

Great thanks - it's perfect worked for me - now I can use X11 thank you a lot :=)

beszerwisserbeszerwisser
Автор

Is there a way to access local host 3390 from another computer in the same network?

KingOfGods
Автор

See comment of kurt rojas (Like his comment). The ip of Windows is dynamic, so you have to work around this using dynamic export DISPLAY:
export DISPLAY=$(cat /etc/resolv.conf | grep nameserver | awk '{print $2}'):0

mathstylish
Автор

Does this work offline or i am connecting to my wsl via internet

ManzarSahil
Автор

You should mention what the name of the song and who the artist is :-)

ChrisClark