Step 1: go to connection -> SSH -> X11, check "Enable X11 forwarding.
Try the following codes to check if x-forwarding is enabled:
[yapingxu@agave1:~]$ xeyes
You may receive this error:
PuTTY X11 proxy: unable to connect to forwarded X server: Network error: Connect
Error: Can't open display: localhost:21.0
This is a typical error on Windows, which means there is no available display server for Microsoft Windows operating systems.
Do not worry, the solution could be very simple. You just need to install Xming. Xming is an X11 display server for Microsoft Windows operating systems.
Now, try the xeyes command again, you should be able to see the xeyes interface. The pair of cute little eyes will move as you moving your cursor.
Alternatively, you could use NoMachine, which is a free remote desktop that enables x-11 forwarding by default.
Congratultions! You have now enabled X11 forwarding.