Last active
March 7, 2024 03:41
-
-
Save djfdyuruiry/3150b9e5f3dadba89ea323df49ea7ab1 to your computer and use it in GitHub Desktop.
Revisions
-
djfdyuruiry revised this gist
May 29, 2020 . 1 changed file with 2 additions and 0 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -1,3 +1,5 @@ # WSL 2 XServer Setup This guide will setup WSL 2 to be able to connect to an XServer installed on your host Windows machine. Note: this was tested on Windows 10 Build 2004, running Ubuntu 20.04 LTS in WSL 2. The XServer software used was [VcXsrv](https://sourceforge.net/projects/vcxsrv/); remember to disable authentication for this to work correctly. - Open a WSL terminal -
djfdyuruiry revised this gist
May 29, 2020 . 1 changed file with 2 additions and 2 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -1,4 +1,4 @@ This guide will setup WSL 2 to be able to connect to an XServer installed on your host Windows machine. Note: this was tested on Windows 10 Build 2004, running Ubuntu 20.04 LTS in WSL 2. The XServer software used was [VcXsrv](https://sourceforge.net/projects/vcxsrv/); remember to disable authentication for this to work correctly. - Open a WSL terminal @@ -19,7 +19,7 @@ This guide will setup WSL to be able to connect to an XServer installed on your export DISPLAY="${WSL_HOST}:0" ``` - Close and reopen the terminal and prove it works: ```bash sudo apt-get install -y x11-apps -
djfdyuruiry created this gist
May 29, 2020 .There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,27 @@ This guide will setup WSL to be able to connect to an XServer installed on your host Windows machine. Note: this was tested on Windows 10 Build 2004, running Ubuntu 20.04 LTS in WSL 2. The XServer software used was [VcXsrv](https://sourceforge.net/projects/vcxsrv/); remember to disable authentication for this to work correctly. - Open a WSL terminal - Fix an issue with `dbus`: ```bash sudo sh -c "dbus-uuidgen > /etc/machine-id" ``` - Update `~/.zshrc`: ```bash # X Server export $(dbus-launch) # not needed if you have systemd enabled export LIBGL_ALWAYS_INDIRECT=1 export WSL_HOST=$(cat "/etc/resolv.conf" | grep nameserver | awk '{print $2}' ) export DISPLAY="${WSL_HOST}:0" ``` - Reopen a terminal and prove it works: ```bash sudo apt-get install -y x11-apps xeyes ```