How to set up working X11 forwarding on WSL2

前端 未结 14 2258
灰色年华
灰色年华 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:34

    I used the following bash to set display:

    export DISPLAY=$(powershell.exe -c ipconfig | grep -A4 WSL | tail -1 | awk '{ print $NF }' | tr -d '\r'):0
    

提交回复
热议问题