3 ms·
> Getting the same working with WSL2 was a pain in the ass, and I eventually gave up. Overall it works the same as WSL 1, you just need to change DISPLAY=:0 to
by nickjj 6y ago
> Getting the same working with WSL2 was a pain in the ass, and I eventually gave up.
Overall it works the same as WSL 1, you just need to change DISPLAY=:0 to DISPLAY="$(/sbin/ip route | awk '/default/ { print $3 }'):0"
Here's a snippet from my bashrc that handles both WSL 1 and WSL 2: https://github.com/nickjj/dotfiles/blob/385007837ab787a2be2e2f29577d899550d8e3f5/.bashrc#L59-L75 https://github.com/nickjj/dotfiles/blob/385007837ab787a2be2e...