mik*_*ana 3 microsoft-edge windows-subsystem-for-linux wsl-2
我可以运行code以从 WSL2 内部启动 VSCode。
我将如何启动 Edge(当前基于 Chromium 的 Edge)?
我试过了:
~/Code/company/workshops-website$ cmd.exe /c 'start microsoft-edge:\\wsl$\Ubuntu\home\mike\Code\company\workshops-website\index.html'
'\\wsl$\Ubuntu\home\mike\Code\company\workshops-website'
CMD.EXE was started with the above path as the current directory.
UNC paths are not supported. Defaulting to Windows directory.
Run Code Online (Sandbox Code Playgroud)
它启动 Edge 但没有打开index.html(而是 Edge 搜索它)
我将如何从 WSL2 内部启动 Edge?
我很乐意制作 bash 别名、函数等。
小智 9
如果您希望自动使用默认的 Windows 浏览器,例如使用“az login”时,请将这些行添加到 shell 的 RC 例如 .bashrc 或 .zshrc:
export DISPLAY=:0
export BROWSER=/usr/bin/wslview
Run Code Online (Sandbox Code Playgroud)
小智 8
$ wslview index.html
将在 Windows 上的默认浏览器中打开文件。
wslview 打包在wslutilities 中,它预装在 WSL 和其他一些 WSL 发行版上的 Ubuntu 上。
| 归档时间: |
|
| 查看次数: |
4074 次 |
| 最近记录: |