将 wsl1 更新道到 wsl2 后,vcxsrv 需要重新配置冰并且配置方法变了
WSL1为:
export DISPLAY=localhost:0
WSL2为:
export DISPLAY=`cat /etc/resolv.conf | grep nameserver | awk '{print $2}'`:0
随后打开Xlaunch,注意要勾选Disable access control,否则会报错如下
Authorization required, but no authorization protocol specified
Error: Can't open display