Running GUI with windows naive PUTTY:
open the xcfe4 connection and set up address 3390:
sudo /etc/init.d/xrdp start
In Putty connect to terminal(xfce4):
localhost:3390
Some other things to notics:
- set in the ssh_config file enable X11port Forwarding to true
- (limitation of WSL2) If you use WSL2, you have to use ‘Allow Public Access’, regardless of which X server you are using.
- set the DISPLAY variable as:
export DISPLAY=$(awk '/nameserver / {print $2; exit}' /etc/resolv.conf 2>/dev/null):0 # in WSL 2
export LIBGL_ALWAYS_INDIRECT=1
Notice The above code is from the WSL2 ubuntu website, this can run firefox GUI okay, but this cannot run oprngl3 GUI (such as lpzrobots and glxgears), which will result in X11 Windows cannot handle error
If you want opengl3 to work:
set
export LIBGL_ALWAYS_INDIRECT=0