
我已經在 Windows 10 Professional build 19041.329 上安裝了 Ubuntu 20.04 LTS,並且希望在 X 伺服器上執行圖形應用程式。安裝了 Docker Desktop 並進行了測試,運作良好。
但重點關注我安裝的圖形應用程式: VcXsrv
VT-x 在 BIOS 中啟用,WSL 2 在 Windows 10 Pro 下處於活動狀態。
PS C:\WINDOWS\system32> wsl -l -v
NAME STATE VERSION
* Ubuntu-20.04 Running 2
docker-desktop-data Stopped 2
docker-desktop Stopped 2
我在 Windows 10 中禁用了公有域和私有網域防火牆區域和 Ubuntu 20.04 LTS 我做了:
$ sudo ufw disable
我按照這個教學安裝了 Docker: 在 WSL2 上安裝 Docker
我在 WSL 介面 (Windows 10) 中使用了相同的 IP 位址:
$sudo apt-get update && sudo apt-get upgrade -y
$sudo apt-get install xfce4
做了步驟:
$nano .bashrc
export DISPLAY=SAMEIP_of_WSL_IFACE:0 -> put at the EOF.
source ~/.bashrc
當我運行一次並成功啟動 Xserver for Windows 時(顯示黑屏)。
但現在當我點擊 Xlaunch not open 並顯示以下內容時,我在 VcxSvr 上遇到此訊息:
不知道...嘗試在 WSL 中放入靜態 IP,使用 Privazer(清理視窗)但什麼都沒有...