如何在“Windows 上的 Ubuntu 上的 Bash”中启动 X 窗口

Kra*_*ime 6 xorg bash windows-10 windows-subsystem-for-linux

Windows 上的 Ubuntu 上安装名为Bash的新功能(仍为“测试版”)后,该功能是 Windows 10 周年版的功能子集,尝试使用以下命令启动 X-Windows 时收到以下消息startx

ubuntu 上的 x-windows 子系统故障

我需要调整/配置什么才能启动 X-Windows?

我注意到xauth已经安装了,但是我必须按如下方式安装框架的其余部分:

apt-get install xorg openbox
Run Code Online (Sandbox Code Playgroud)

小智 3

你可以安装Xming。

使用export DISPLAY=:0export DISPLAY=localhost:0并从控制台运行您的应用程序。


小智 0

我无法使用Windows 10 Ubuntu bash 命令行,我尝试使用类似Xming-6-9-0-31-setupor 的命令,但它似乎没有将其发送到 Windows 10 下的这些应用程序中的任何一个,我无法让它们工作还收到有关无法连接到 X 服务器连接拒绝类型消息的消息,我现在尝试在 Windows 10 下使用 Debian 命令,看看我是否有更好的运气,这是我唯一能够让 X 服务器运行的东西是远程桌面连接,我找到了该信息,但后来在 Ubuntu 下安装了应用程序,但在尝试运行它时找不到该类型错误消息的应用程序的路径,我能够得到 lite shell 而不是 gnome为了解决这个问题,在网上找到了一个关于如何执行此操作的页面,否则我无法在不使用远程桌面连接的情况下使其工作,该应用程序似乎不适合我。除非我在尝试运行它时做错了什么,但我认为我没有做错。vcxsrv-64.1.20.8.1.installerexport DISPLAY=:0export DISPLAY=localhost:0bashlocalhost:3390scummvm/etc/gamesXming

https://autoize.com/xfce4-desktop-environment-and-x-server-for-ubuntu-on-wsl-2/

这个关于开始工作的页面xfce4可能会再次有所帮助,它不是 gnome shell 或kdeshell,我更喜欢让它们重新工作xfce4。我希望这有帮助。

不确定我做错了什么,我找到了ipconfigforWSL并将cmd其输入到显示中,但我仍然无法让它正常工作,我尝试了这两个Xming软件vcxsrv

$ startxfce4
/usr/bin/startxfce4: X server already running on display **
xrdb: Can't open display '**'
xfce4-session: Cannot open display: .
Type 'xfce4-session --help' for usage.
Run Code Online (Sandbox Code Playgroud)

如果您在使用 WSL 2 时遇到问题,此链接也可能会有所帮助:

  1. https://github.com/Microsoft/WSL/issues/1800
  2. https://github.com/microsoft/WSL/issues/4106
  3. https://forums.freebsd.org/threads/xfce-xserver-already-running-on-display0.64651/

我能够让 X 服务器仅在使用 MobaXterm 应用程序时运行。否则到目前为止没有运气,我认为使用 WSL 2 时它得到更好的支持可能与 WSL ip 信息内容的网络有关。必须在 MobaXterm 软件中将 X11 设置为 Full 才能正确运行。

https://mobaxterm.mobatek.net/download.html