关于win10安装wsl子系统Ubuntu图形界面的错误解决
解决了https://blog.csdn.net/weixin_30834783/article/details/102144314
Xserver
个人使用的是VcXsrv。
在WSL中配置环境变量DISPLAY,在~/.bashrc中加入相关配置。
WSL1为:
export DISPLAY=localhost:0
WSL2为:
export DISPLAY=cat /etc/resolv.conf | grep nameserver | awk '{print $2}'
:0
(这里参考https://zhuanlan.zhihu.com/p/51270874)
随后打开Xlaunch,注意要勾选Disable access control,否则会报,其他为默认选项。
Authorization required, but no authorization protocol specified
Error: Can't open display
(这里参考https://codeyarns.com/2019/05/11/vcxsrv-x-server-for-windows/)
可以用xeyes测试一下。