Start x11vnc with supervisord

To auo start x11vnc with supervisord, first install x11vnc and supervisord

apt -y install supervisor x11vnc

Create a password file

x11vnc -storepasswd YOUR_SECRET_PW /etc/vncsecret

Replace YOUR_SECRET_PW with whatever password you want to use.

Create supervisord unit file

vi /etc/supervisor/conf.d/x11vnc.conf 

Add following content

[program:x11vnc]
priority=200
command=/usr/bin/x11vnc -rfbauth /etc/vncsecret -display :0 -xkb -noxrecord -noxfixes -noxdamage -wait 5 -shared 
user=USERNAME_HERE
autorestart=true
autostart=true
redirect_stderr=true

Replace USERNAME_HERE with actual user name used to login to system.

Enable supervisior

systemctl enable supervisor

You can use following commands to interact with supervisord

supervisorctl restart all
supervisorctl reload
supervisorctl status

See vnc

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *