Linux?
service x11vnc { port = 5900 type = UNLISTED socket_type = stream protocol = tcp wait = no user = root server = /usr/bin/x11vnc server_args = -inetd -o /var/log/x11vnc.log -display :1 -auth /var/run/lightdm/root/:1 -rfbauth /etc/x11vnc.passwd -many -bg disable = no }
sudo /etc/init.d/xinetd restart