Everything used to work with xMing server and I'm not sure what caused it to stop. I tried everything I could find to troubleshoot and finally gave up. I uninstalled XMing and installed VcXsrv. I like the extra features btw! It installed and started without error. I've attached the log and a screen shot of Windows Terminal showing Ubuntu running in WSL2 as well as my laptop and Windows OS info. The sample applications on the context menu run fine (xcalc, xclock, etc.) But when I try to run xeyes (from the x11-samples), or anything else with a GUI, I get Error: Can't open display: 127.0.0.1:0.0. I've tried all kinds of variations for export DISPLAY= including localhost:0, localhost:0.0, 127.0.0.1:0, 0.0, the IP address of my Windows machine:0.0. I've tried disabling the Windows firewall. I've restarted the machine several times. I've looked in the Windows Event logs for clues. I've tried connecting with Putty and setting the X11 properties in there. Nothing is giving me any clues. As I said, I started with a different X Window Server (XMing) and it used to work and stopped working. It might have been a Windows update, a WSL2 update, an Ubuntu update or something else entirely. What steps should I take next to troubleshoot?
Thank You,
Mike
Well, this is embarrassing... The very next discussion I looked at had a link that solved the problem for me. It said, if you use powershell, type systeminfo and use the IP address found at the bottom. It worked! So I did an IP Config and that IP addresses is listed under "Ethernet adapter vEthernet (WSL):". It's not the IP address of my computer and it's not the IP address I get in WSL when I run ifconfig and it's not the IP address I get when I copy and paste the suggested export DISPLAY commands in many of these posts which pulls the IP address from various shell commands. That's a whole day shot learning something new. Thanks anyway and I hope this helps someone else. I'm going to stick with VcxSrv. I like it!
And if you run these commands from Windows
you are guaranteed to always have the same IP address available between host and guest.
Thanks for the tip, but I had some trouble with it. When I ran the first command, I got:
RTNETLINK answers: Operation not permitted
So I modified it to run wsl sudo ip addr… and it did indeed add a 192.168.250.1 IP address to my WSL adapter in addition to the original IP address). The second command ran without issue.
After doing this, I’ve had to check ‘Disable access control’ in the XLaunch, but otherwise, it runs fine. I did not have to check it before. Not a big deal.
After re-starting though, I was back to my old configuration. Do I have to run these commands on startup of Windows or is there way to make them permanent?
Thank you!
Mike Yeager
From: Darrek darrek@users.sourceforge.net
Sent: Wednesday, February 17, 2021 5:28 PM
To: [vcxsrv:bugs] 140@bugs.vcxsrv.p.re.sourceforge.net
Subject: [vcxsrv:bugs] #140 Error: Can't open display WSL2 Ubuntu 20.04.2 on Windows 10
And if you run these commands from Windows
wsl ip addr add 192.168.250.2/24 broadcast 192.168.250.255 dev eth0:1
netsh interface ip add address "vEthernet (WSL)" 192.168.250.1 255.255.255.0
you are guaranteed to always have the same IP address available between host and guest.
[bugs:#140]https://sourceforge.net/p/vcxsrv/bugs/140/ Error: Can't open display WSL2 Ubuntu 20.04.2 on Windows 10
Status: open
Group: v1.0_(example)
Created: Wed Feb 17, 2021 12:17 AM UTC by Mike Yeager
Last Updated: Wed Feb 17, 2021 12:38 AM UTC
Owner: nobody
Attachments:
Everything used to work with xMing server and I'm not sure what caused it to stop. I tried everything I could find to troubleshoot and finally gave up. I uninstalled XMing and installed VcXsrv. I like the extra features btw! It installed and started without error. I've attached the log and a screen shot of Windows Terminal showing Ubuntu running in WSL2 as well as my laptop and Windows OS info. The sample applications on the context menu run fine (xcalc, xclock, etc.) But when I try to run xeyes (from the x11-samples), or anything else with a GUI, I get Error: Can't open display: 127.0.0.1:0.0. I've tried all kinds of variations for export DISPLAY= including localhost:0, localhost:0.0, 127.0.0.1:0, 0.0, the IP address of my Windows machine:0.0. I've tried disabling the Windows firewall. I've restarted the machine several times. I've looked in the Windows Event logs for clues. I've tried connecting with Putty and setting the X11 properties in there. Nothing is giving me any clues. As I said, I started with a different X Window Server (XMing) and it used to work and stopped working. It might have been a Windows update, a WSL2 update, an Ubuntu update or something else entirely. What steps should I take next to troubleshoot?
Thank You,
Mike
Sent from sourceforge.net because you indicated interest in https://sourceforge.net/p/vcxsrv/bugs/140/
To unsubscribe from further messages, please visit https://sourceforge.net/auth/subscriptions/
Related
Bugs: #140