跳過(guò)前戲,我要給WSL2完整的圖形界面

wsl -d debian
sudo passwd root
exit
debian config --default-user root
wsl -d debian
cd ~
nano /etc/apt/sources.list
# 默認(rèn)注釋了源碼鏡像以提高 apt update 速度,如有需要可自行取消注釋
deb
Index of /debian/ | 清華大學(xué)開(kāi)源軟件鏡像站 | Tsinghua Open Source Mirror
http://mirrors.tuna.tsinghua.edu.cn/debian/
bookworm main contrib non-free non-free-firmware
# deb-src
Index of /debian/ | 清華大學(xué)開(kāi)源軟件鏡像站 | Tsinghua Open Source Mirror
http://mirrors.tuna.tsinghua.edu.cn/debian/
bookworm main contrib non-free non-free-firmware
deb
Index of /debian/ | 清華大學(xué)開(kāi)源軟件鏡像站 | Tsinghua Open Source Mirror
http://mirrors.tuna.tsinghua.edu.cn/debian/
bookworm-updates main contrib non-free non-free-firmware
# deb-src
Index of /debian/ | 清華大學(xué)開(kāi)源軟件鏡像站 | Tsinghua Open Source Mirror
http://mirrors.tuna.tsinghua.edu.cn/debian/
bookworm-updates main contrib non-free non-free-firmware
deb
Index of /debian/ | 清華大學(xué)開(kāi)源軟件鏡像站 | Tsinghua Open Source Mirror
http://mirrors.tuna.tsinghua.edu.cn/debian/
bookworm-backports main contrib non-free non-free-firmware
# deb-src
Index of /debian/ | 清華大學(xué)開(kāi)源軟件鏡像站 | Tsinghua Open Source Mirror
http://mirrors.tuna.tsinghua.edu.cn/debian/
bookworm-backports main contrib non-free non-free-firmware
# deb
Index of /debian-security/ | 清華大學(xué)開(kāi)源軟件鏡像站 | Tsinghua Open Source Mirror
http://mirrors.tuna.tsinghua.edu.cn/debian-security
bookworm-security main contrib non-free non-free-firmware
# # deb-src
Index of /debian-security/ | 清華大學(xué)開(kāi)源軟件鏡像站 | Tsinghua Open Source Mirror
http://mirrors.tuna.tsinghua.edu.cn/debian-security
bookworm-security main contrib non-free non-free-firmware
deb
http://security.debian.org/debian-security
bookworm-security main contrib non-free non-free-firmware
# deb-src
http://security.debian.org/debian-security
bookworm-security main contrib non-free non-free-firmware
apt update && apt upgrade -y
apt install xfce4 xfce4-goodies dbus-* -y
export DISPLAY=192.168.3.5:0
nano /etc/profile
export XDG_RUNTIME_DIR=/usr/lib/
export RUNLEVEL=3
source /etc/profile
startxfce4