我已经安装了 WSl,并根据此进行了更新MS 指南:
wsl --update
wsl --shutdown
并尝试运行 gedit:
sudo apt install gedit -y
gedit ~/.bashrc
但得到了
(gedit:1854): Gtk-WARNING **: 19:49:45.422: cannot open display:
gimp 和其他图形应用程序也一样。
我是否应该做一些进一步的操作,比如安装 ubuntu 桌面
apt install gnome
或者使用 VcXsrc 或在 Windows 防火墙中打开端口?
WSL 版本:
WSL version: 1.2.0.0
Kernel version: 5.15.90.1
WSLg version: 1.0.51
MSRDC version: 1.2.3770
Direct3D version: 1.608.2-61064218
DXCore version: 10.0.25131.1002-220531-1700.rs-onecore-base2-hyp
Windows version: 10.0.19045.2604
命令
wsl --list --online
输出以下内容:
The following is a list of valid distributions that can be installed.
Install using 'wsl.exe --install <Distro>'.
NAME FRIENDLY NAME
Ubuntu Ubuntu
Debian Debian GNU/Linux
kali-linux Kali Linux Rolling
Ubuntu-18.04 Ubuntu 18.04 LTS
Ubuntu-20.04 Ubuntu 20.04 LTS
Ubuntu-22.04 Ubuntu 22.04 LTS
OracleLinux_8_5 Oracle Linux 8.5
OracleLinux_7_9 Oracle Linux 7.9
SUSE-Linux-Enterprise-Server-15-SP4 SUSE Linux Enterprise Server 15 SP4
openSUSE-Leap-15.4 openSUSE Leap 15.4
openSUSE-Tumbleweed openSUSE Tumbleweed