Rocky8.9 x11vnc

hi all,

I’m struggling with x11vnc under Rocky8.9 with xfce and GDM greeter.

It will work perfectly with root user, but when logout and login with normal user, the x11vnc stop and restarting give error.

this is a part of x11vnc.service:

ExecStart=/usr/bin/x11vnc -display :0 -rfbauth /etc/x11vnc.pwd -shared -forever -o /var/log/x11vnc.log

If I install Lightdm and enabling it, then all is working perfectly for all user and even with login screen, because I modified x11vnc.service as:

ExecStart=/usr/bin/x11vnc -display :0 -rfbauth /etc/x11vnc.pwd -auth /run/lightdm/root/:0 -shared -forever -o /var/log/x11vnc.log

The difference is -auth /run/lightdm/root/:0 (which of course doesn’t exist on GDM).

So, I think there are some difference between GDM and LightDM, but as a newby I can’t understand what’s wrong and how can I fix that.

I did work before with Centos7 and x11vnc always worked like a charm …

Any hint, help or guidance please ??

BR, Pietro