-
-
Notifications
You must be signed in to change notification settings - Fork 85
Description
If I use the "GWSL Distro Tools" -> "Display/Audio Auto-Exporting", it adds the following lines to my profile:
export DISPLAY=$(cat /etc/resolv.conf | grep nameserver | awk '{print $2; exit;}'):0.0 #GWSL
export PULSE_SERVER=tcp:$(cat /etc/resolv.conf | grep nameserver | awk '{print $2; exit;}') #GWSL
/etc/resolv.conf is a symlink to /mnt/wsl/resolv.conf, and the contents of that file are:
# This file was automatically generated by WSL. To stop automatic generation of this file, add the following entry to /etc/wsl.conf:
# [network]
# generateResolvConf = false
nameserver 10.255.255.254
search lan
The contents of /etc/wsl.conf are:
[boot]
systemd=true
The XClock app in the about menu properly loads for me, but jetbrains-toolbox is unable to connect to my X Server.
However, when I run ipconfig from my Windows terminal, I see a Ethernet adapter vEthernet (WSL (Hyper-V firewall)): with IP 172.22.112.1. If I use this set DISPLAY to this IP, jetbrains-toolbox loads fine. However, I do not see this IP address listed when I type ifconfig from WSL, and I do not know how to otherwise find this IP address programmatically. I could hardcode the DISPLAY and PULSE_SEVER variables to this IP, and maybe that IP never changes, but this still feels kind of dirty.
I have a few questions:
- Am I supposed to be able to use my nameserver IP as my X Server IP? I see that config used in the docs as well, so I assume that is the case. GWSL was working fine for me for a long time before today, so I believe this is how I used to connect in the past but I cannot anymore.
- Is it expected that my virtual adapter IP is different from my namesever in
/etc/resolv./conf - Is there a way to programmatically get the IP of the WSL virtual adapter from within WSL?