If you want to connect again once the first connection is terminated, but disallow multiple concurrent connections, then you probably want to start x11vnc with '-never-shared -forever' instead of '-once -shared' - see
Code:
man x11vnc
-once
Exit after the first successfully connected viewer disconnects,
opposite of -forever. This is the Default.
-forever
Keep listening for more connections rather than exiting as soon
as the first client(s) disconnect. Same as -many
To get the standard non-shared VNC behavior where when a new VNC
client connects the existing VNC client is dropped use: -never‐
shared -forever This method can also be used to guard against
hung TCP connections that do not go away.
I'm not familiar with the VNC_VIA_CMD or the '-via' option but I suspect they are only applicable when you are tunneling via a (3rd) intermediate host - if you are tunneling straight from the x11vnc server to your laptop then once you have set up the SSH tunnel (which looks correct btw) and started the remote x11vnc server, afaik it *should* be sufficient just to do
Code:
vncviewer -encodings tight -depth 8 -quality 1 localhost::5904
(where 5904 is your chosen alternative local port) or equivalently
Code:
vncviewer -encodings tight -depth 8 -quality 1 localhost:04
Or you can use the Remmina VNC client which is standard in Ubuntu I think
Bookmarks