Skip to content
This repository has been archived by the owner on Feb 17, 2022. It is now read-only.

图形化界面安装过程中 一个更方便的配置WSL2参数的方法 #86

Open
innns opened this issue May 10, 2021 · 0 comments
Open

Comments

@innns
Copy link

innns commented May 10, 2021

我希望文档能够包括这一内容 :

GUI 图形化窗口-安装 XServer for windows-配置 WSL 参数:原文如下

# 如果你使用的是 WSL 2:填入 {YOUR_WINDOWS_IP},你的本机 IP 地址
$ echo 'export DISPLAY={YOUR_WINDOWS_IP}:0.0' >> .profile

然而在WSL2中,本机的IP地址可以用$(grep -m 1 nameserver /etc/resolv.conf | awk '{print $2}')来获取

所以这部分可以更改为

# 如果你使用的是 WSL 2:填入 {YOUR_WINDOWS_IP},你的本机 IP 地址
$ echo "export DISPLAY=$(grep -m 1 nameserver /etc/resolv.conf | awk '{print $2}'):0.0" >> .profile
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant