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

On your client Windows 10 computer, setup X11 for WSL.

2. setup VNC Viewer on Windows Subsystem for Linux

sudo apt install vncviewer

create a Bash script connectVNC.sh

#!/bin/bash

ssh -f -L 5901:localhost:5901 [email protected] sleep 1;
vncviewer  localhost::5901

3. 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