VNC client on Windows Subsystem for Linux

Assuming you have already setup VNC server on your remote PC, here is what to do on your client Windows laptop.

  1. setup X11 for Windows Subsystem for Linux.
  2. setup VNC Viewer on Windows Subsystem for Linux

     apt install vncviewer
    
  3. create connectVNC.sh

     #!/bin/bash
        
     ssh -f -L 5901:localhost:5901 [email protected] sleep 1;
     vncviewer  localhost::5901
    

Connect to your remote VNC server from WSL

Start the Xming X11 server on your laptop, then

./connectVNC.sh

you will be asked for your SSH password, then VNC password. Then the VNC Viewer window will open on your laptop, showing the X11 desktop on your remote PC.

Leave a Comment