VNC client on Windows Subsystem for Linux

One can connect to a VNC server on a remote PC VNC using Windows Subsystem for Linux with this setup:

Setup X11 and VNC Viewer on Windows Subsystem for Linux:

apt install vncviewer

Create ~/connectVNC.sh, filling in “user@IPaddress” with info for the actual remote PC.

#!/bin/bash

ssh -f -L 5901:localhost:5901 user@IPaddress sleep 1;
vncviewer  localhost::5901

Connect to VNC from WSL

Start the X11 server on laptop before SSH tunnel VNC from WSL:

~/connectVNC.sh

A VNC Viewer window opens, showing the X11 desktop on the remote PC.