Running GUI apps in WSL 2

#StandWithUkraine
Today, 18th May 2022, Ukraine is still bravely fighting for democratic values, human rights and peace in whole world. Russians ruthlessly kill all civilians in Ukraine including childs and destroy their cities. We are uniting against Putinโ€™s invasion and violence, in support of the people in Ukraine. You can help by donating to Ukrainian's army.

First, install VcXsrv from from vcxsrv on sourceforge.net

Install to and launch from Desktop Icon. Follow wizard, in Extra settings, check Disable access control: (otherwise you will get Permission Denied errors)

Image for a hint

To autoselect this setting, we recommend to save configuration:

Image for a hint

In WSL 2 Terminal export DISPLAY:

export DISPLAY=$(awk '/nameserver / {print $2; exit}' /etc/resolv.conf 2>/dev/null):0 # in WSL 2
export LIBGL_ALWAYS_INDIRECT=1

you might want to add this to .bashrc file

#wsl
0
Ivan Borshchov profile picture
Apr 03, 2022
by Ivan Borshchov
Did it help you?
Yes !
No

Best related