如何在windows 11中安装WSLG(WSL2)

https://blog.csdn.net/u013066730/article/details/122948011
图形化:
https://blog.csdn.net/liyunxin_c_language/article/details/114107994

1. windows打开XLaunch


选择 one large window Display number设置为0

勾选上Disable access control

完成

2. UBUNTU终端中输入:

在~/.bashrc中加入

export DISPLAY=$(grep -m 1 nameserver /etc/resolv.conf | awk '{print $2}'):0.0
export XDG_SESSION_TYPE=x11
sudo service dbus restart
gnome-session

即可显示界面

posted @ 2022-10-22 18:47  penuel  阅读(178)  评论(0编辑  收藏  举报