Create a file to store password
x11vnc -storepasswd /etc/x11vnc.pwd
Create x11vnc service
gedit /etc/systemd/system/x11vnc.service
Edit service
[Unit] After=multi-user.target [Service] Type=simple ExecStart=/usr/bin/x11vnc -auth guess -forever -loop -noxdamage -display :0 -repeat -rfbauth /etc/x11vnc.pwd -rfbport 5900 -shared -o /var/log/x11vnc.log [Install] WantedBy=multi-user.target
Enable service
systemctl enable x11vnc
Start service
systemctl start x11vnc
Verify open port and service
netstat -pat