How to set up working X11 forwarding on WSL2

前端 未结 14 2262
灰色年华
灰色年华 2020-12-12 12:09

When moving from WSL1 to WSL2 many things change; apparently this applies to X11 forwarding as well.
What steps do I need to make in order to use X11 forwarding with WSL

14条回答
  •  悲哀的现实
    2020-12-12 12:31

    For some people who allowed only for private networks like me,

    It should have stop signs on Windows Defender firewall

    Double click it and allow the connection for both

    So all the 4 items should be ticked green.

    and the above answer from @NicolasBrauer was working for me.

    Disable the access control when you XLaunch and

    export DISPLAY=$(awk '/nameserver / {print $2; exit}' /etc/resolv.conf 2>/dev/null):0
    export LIBGL_ALWAYS_INDIRECT=1
    

提交回复
热议问题