Anyone have luck getting x11vnc running on Rocky 9 as a systemd service? I’ve scoured the web and have not seen an article for this on Rocky, mostly for Ubuntu/Debian.
My goal is to have x11vnc working, even at the login screen.
I’m able to get x11vnc running manually while logged in using the command below:
/usr/bin/x11vnc -passwd 1234 -display :1 -auth /run/user/1000/gdm/Xauthority -forever -bg -shared
However, when setting up the systemd service, the application will not start up
[Unit] Description=x11vnc server After=multi-user.target network.target [Service] Type=simple ExecStart=/usr/bin/x11vnc -passwd 1234 -forever -bg -shared -auth guess [Install] WantedBy=multi-user.target
If I tweak the ExecStart to include the display, it will throw out an SELinux warning
Jan 25 17:49:56 localhost setroubleshoot: SELinux is preventing /usr/bin/xauth from append access on the unix_stream_socket unix_stream_socket. For complete SELinux messages run: sealert -l bf083e83-d316-4ca3-998a-9f3c1204c1f0
In my previous Centos7 build, this was the systemd config and worked flawlessly
/usr/bin/x11vnc -inetd -o /var/log/x11vnc.log -display :0 -auth /var/gdm/:0.Xauth -passwd 1234 -forever -bg