WSL系列--Wslg使用

WSL系列--Wslg使用

是 Windows Subsystem for Linux GUI 的缩写,这个项目的目的是在一个完全集成的桌面体验中支持在 Windows 上运行 Linux GUI 应用程序,比如可以在wslg中运行idea

软件要求

硬件要求

GPU需要支持vgpu

1、使用命令glxinfo -B查看支持情况
如果支持的话会有类似以下的输出,一般D3D12都是支持的
How can I make sure my WSL2/g distro is using vGPU? · Discussion #78 · microsoft/wslg (github.com)

name of display: :0
display: :0 screen: 0
direct rendering: Yes
Extended renderer info (GLX_MESA_query_renderer):
Vendor: Microsoft Corporation (0xffffffff)
Device: D3D12 (NVIDIA GeForce RTX 3060 Ti) (0xffffffff)
Version: 22.0.5
Accelerated: yes
Video memory: 24379MB
Unified memory: no
Preferred profile: core (0x1)
Max core profile version: 3.3
Max compat profile version: 3.3
Max GLES1 profile version: 1.1
Max GLES[23] profile version: 3.1
OpenGL vendor string: Microsoft Corporation
OpenGL renderer string: D3D12 (NVIDIA GeForce RTX 3060 Ti)
OpenGL core profile version string: 3.3 (Core Profile) Mesa 22.0.5
OpenGL core profile shading language version string: 3.30
OpenGL core profile context flags: (none)
OpenGL core profile profile mask: core profile

OpenGL version string: 3.3 (Compatibility Profile) Mesa 22.0.5
OpenGL shading language version string: 3.30
OpenGL context flags: (none)
OpenGL profile mask: compatibility profile

OpenGL ES profile version string: OpenGL ES 3.1 Mesa 22.0.5
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.10

Segmentation fault

2、显示器只能在:0u输出
输入以下命令查看显示器是否正确

echo $DISPLAY

如果输出不是

:0

需要在~/.bashrc中修改环境变量

export DISPLAY=:0

一些常用的系统应用

  • 文件管理器nautilus
    sudo apt-get install nautilus

    nautilus

  • gedit

  • idea

作者

AriaLyy

发布于

2022-11-21

许可协议

CC BY-NC-SA 4.0

评论