Created
November 2, 2020 20:44
-
-
Save XertroV/844339eaca1adda2a51afd0ee95287a2 to your computer and use it in GitHub Desktop.
commands to export DISPLAY on WSL v2 so that X11 applications work. (an option like 'allow public access' is usually required in the x-server settings; use windows firewall to block network traffic)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export WSL_HOST_IP="$(cat /etc/resolv.conf | grep -E '[0-9]{1,3}\.' | cut -d ' ' -f 2)" | |
export DISPLAY=$WSL_HOST_IP:0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment