####on server/remote machine
#install
sudo apt install x11vnc
#start without password
x11vnc -auth ~/.Xauthority -display :0
#view only
x11vnc -auth ~/.Xauthority -display :0 -viewonly
#create password (by default it's stored in ~/.vnc/passwd)
x11vnc -storepasswd
#start server
x11vnc -rfbauth ~/.vnc/passwd -auth ~/.Xauthority -display :0
#on client/local machine
#install
sudo apt install tigervnc-viewer
#connect
vncviewer
###Through SSH Tunneling###
#on the client
ssh user@host -L 5900:localhost:5900 x11vnc -localhost -viewonly
vncviewer