When you ssh to a remote server, you may need to open graphic software through x11. Check the following things to avoid the displaying error X11 forwarding request failed on channel 0:
ssh -X user@serveror
ssh -Y user@server
- On local machine, modify the
XAuthLocation /usr/X11/bin/xauth(The location of xauth may change from version to version!)
WSL2 requires XWindow for GUI applications. This guide provides a good summary of how to set it up on your Win10. I have only tried the first option VcXsrv Windows X Server, which works great but I have to remember to launch it with the correct settings everytime before I start a GUI from WSL2.