Created
October 23, 2021 22:43
-
-
Save y3nr1ng/f63f11513e65f73b5f1275e4f5c09440 to your computer and use it in GitHub Desktop.
This is the emulated startx script for VcXsrv on WSL2, it will spawn the VcXsrv client and connect to it.
This file contains 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
#!/usr/bin/env bash | |
# get host address | |
HOST=$(ip address show dev eth0 | awk -F '[ /]+' '/inet / { print $3 }') | |
# start the server | |
powershell.exe -Command '& "C:\Program Files\VcXsrv\vcxsrv.exe" -multiwindow -nowgl' | |
# configure xhost | |
WSLENV="$WSLENV:DISPLAY" | |
powershell.exe -Command '& "C:\Program Files\VcXsrv\xhost.exe" '+$HOST |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment