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:
If I tweak the ExecStart to include the display, it will throw out an SELinux warning
Jan 25 17:49:56 localhost setroubleshoot[2344]: 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
I’ve been able to get the systemd service running, however it does not appear to be accepting connections. The service has to be running as the GDM user.
The issue now is something about systemd socket access, I am not sure how to fix. Any help would be great!
Jan 27 16:38:57 localhost x11vnc[2128]: 27/01/2023 16:38:57
Jan 27 16:38:57 localhost x11vnc[2128]: 27/01/2023 16:38:57 Unable to establish connection with systemd socket
Jan 27 16:38:57 localhost x11vnc[2128]: 27/01/2023 16:38:57 setsockopt failed: can't set TCP_NODELAY flag, non TCP socket?: Socket operation on non-socket
I tested this right after Rocky Linux 9 was released - the problem is that the x11vnc package requires X11 display server and Rocky Linux 9 uses Wayland display server by default - x11vnc works fine on Rocky Linux 9 Mate which still uses X11 display server.
The closest I was able to get was by disabling wayland, I could get x11vnc to start on launch at the login screen level. However, once logged in, it would only display a black window through VNC. If the service is stopped and restarted after the login has happened, then it would be fine, but I can’t get a seemless x11vnc configuration that operates, regardless of who is logged in. Been stumped on this one for a while.
it’s a copy/paste of service file that you sent, which also include the -loop option
I tested your suggestion of running Rocky9 on MATE, and x11vnc seems to work fine! Really appreciate it. It’s a shame since MATE shows an antiquated UI, but we’ll take it! I suppose the limitation comes from the default gnome within Rocky9.