Autostart x11vnc on boot

Posted on

I followed these steps:

x11vnc -storepasswd

Enter VNC password:
Verify password:
Write password to /home/USERNAME/.vnc/passwd? [y]/n y
Password written to: /home/USERNAME/.vnc/passwd

edit /etc/init.d/x11vnc.conf

description "Start x11vnc at boot"

description "x11vnc"
start on runlevel [2345]
stop on runlevel [^2345]

console log

respawn limit 20 5

exec /usr/bin/x11vnc -auth guess -forever -loop -noxdamage -repeat -rfbauth /home/USERNAME/.vnc/passwd -rfbport 5901 -shared

Reboot system.

Firewalld it's configured to allow 5901 port. I can connect if I start x11vnc manually, but it doesn't start automatically after system boots.

Any idea?