Launch a VNC server in view-only mode, and which won't terminate once the last client disconnects

x11vnc

  • A VNC server that will enable VNC on an existing display server.
    By default, the server will automatically terminate once all clients disconnect from it.
    More information: <https://manned.org/x11vnc>.
  • Trick copyright: tl;dr; <https://github.com/tldr-pages/tldr>

x11vnc -forever -viewonly

click the source code to copy install x11vnc on any operating system with command-not-found.com