相关疑难解决方法(0)

WSL 2:从 Windows 10 Bash Shell 运行图形 Linux 桌面应用程序“错误 E233:无法打开显示”

如何从 Windows 10 的 Bash Shell 运行图形 Linux 桌面应用程序?

首先,我按照此处所示的步骤安装了适用于 Linux 的 Windows 子系统 (WSL) ,如下所示:

(1) 安装了 Windows 10 Pro Insider Preview Build 19619。

(2) 安装了 Ubuntu Linux 发行版。

(3) 将发行版本从 WSL 1 更改为 WSL 2。

其次,使从Windows 10的bash shell的Linux图形桌面应用程序,我也跟着下面的步骤如图所示位置如下:

(4) 我安装了一个X Server,它是Xming

(5) 安装基于 GTK 的图形 vim 编辑器作为测试使用:

sudo apt-get install vim-gtk

(6) 设置我的显示环境变量

export DISPLAY=:0

(7) 启动应用程序

gvim

但是,这并没有使应用程序午餐,我收到以下错误:

E233: cannot open display
Press ENTER or type command to continue
E852: The child process …
Run Code Online (Sandbox Code Playgroud)

windows ubuntu xming xserver windows-subsystem-for-linux

22
推荐指数
5
解决办法
7万
查看次数