huchuan2025/20-Area/21-Person/消费--电子类/已有/Tomato3700x/WSL2/WSL显示图形界面.md

9 lines
978 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

- 重点是$DISPLAY变量的设置 要设置为<Windows的IP地址:0>
- `$DISPLAY` 环境变量指定了X服务器的地址和显示屏的编号。它的格式通常是 `hostname:displaynumber.screennumber`。具体来说:
- **hostname**X服务器所在的主机名或IP地址。如果是本地主机可以省略。
- **displaynumber**显示屏编号通常是一个整数。一个X服务器可以管理多个显示屏每个显示屏都有一个唯一的编号。默认是 `0`
- **screennumber**:屏幕编号,通常是一个整数。一个显示屏可以包含多个屏幕,每个屏幕都有一个唯一的编号。默认是 `0`
- 在Windows中安装Xserver,
- 下载并安装VcXsrv。
- 启动VcXsrv选择“Multiple windows”模式并确保启用了“Disable access control”选项。
- 在已经指定好$DISPLAY环境变量的shell上执行桌面启动例如startlxqt 就可以在VcXsrv上进行图形界面的接受了。