sudo apt update

Install The Following:

sudo apt install x11vnc

Let's Make The Following Dir:

sudo mkdir /etc/x11vnc

Now Create A Password To Use For VNC:

sudo x11vnc --storepasswd /etc/x11vnc/vncpwd

Press Y To Save Password

Let's Create The Service File:

sudo nano /lib/systemd/system/x11vnc.service

Copy & Paste The Following And Save:


[Unit]
Description=Start x11vnc at startup.
After=multi-user.target

[Service]
Type=simple
ExecStart=/usr/bin/x11vnc -auth guess -forever -noxdamage -repeat -rfbauth /etc/x11vnc/vncpwd -rfbport 5900 -shared

[Install]
WantedBy=multi-user.target


Now Reload The Service:

sudo systemctl daemon-reload

Enable x11vnc Service:

sudo systemctl enable x11vnc.service

Let's Start x11vnc:

sudo systemctl start x11vnc.service