I've tried "all the things" from SO, github, etc. I'm using MobaXTerm.
In my .bashrc I have
export DISPLAY="$(/sbin/ip route | awk '/default/ { print $3 }'):0"
Which results in
(base) balter@ORLT1072346:~$ echo $DISPLAY172.28.80.1:0
In CMD ipconfig
gives
Ethernet adapter vEthernet (WSL): Connection-specific DNS Suffix . : Link-local IPv6 Address . . . . . : fe80::7442:c2c6:5b47:11ff%41 IPv4 Address. . . . . . . . . . . : 172.28.80.1 Subnet Mask . . . . . . . . . . . : 255.255.240.0 Default Gateway . . . . . . . . . :
At the top of my moba terminal it says "Your DISPLAY is set to 192.168.1.14:0.0" So I"ve tried DISPLAY=192.168.1.14:0.0
, which results in the same "Can't open display..." error.
My resolv.conf reads:
(base) balter@ORLT1072346:~$ cat /etc/resolv.confnameserver 8.8.8.8nameserver 8.8.8.4
I had to do this an override the auto-generated one because I wasn't getting internet.
Oh, and my /etc/ssh/sshd_conf
has
(base) balter@ORLT1072346:~$ cat /etc/ssh/sshd_config | grep X11X11Forwarding yes#X11DisplayOffset 10X11UseLocalhost yes# X11Forwarding no