I'm trying to implement X11VNC on Ubuntu 20.04 but it's been frustrating. I need to use command way, the goal is to keep it on a systemd service.
As I know Ubuntu is using Xorg for the moment. Running ps wwwwaux | grep auth
I get this:
gdm 3530 0.0 2.4 211180 50128 tty1 Sl+ 10:41 0:01 /usr/lib/xorg/Xorg vt1 -displayfd 3 -auth /run/user/125/gdm/Xauthority -background none -noreset -keeptty -verbose 3
admin-r+ 4700 0.2 2.7 216112 55220 tty2 Sl+ 11:58 0:02 /usr/lib/xorg/Xorg vt2 -displayfd 3 -auth /run/user/1000/gdm/Xauthority -background none -noreset -keeptty -verbose 3
So it should be correct to run the X11VNC server like this when user is not logged in (forget security pls):
x11vnc -xkb -noxrecord -noxfixes -noxdamage -forever -rfbport 11226 -auth /run/user/125/gdm/Xauthority -display :0
And like this when it's logged in:
x11vnc -xkb -noxrecord -noxfixes -noxdamage -forever -rfbport 11226 -auth /run/user/1000/gdm/Xauthority -display :0
Well, it works good on GDM, but not when the user is logged in.
- Tried with root and user profile of course.
- UUIDs checked of course.
Also tried with the directive GDM conf file WaylandEnable=false
commented and without comment. When comment it, it works running this when the user is logged in:
x11vnc -xkb -noxrecord -noxfixes -noxdamage -forever -rfbport 11226 -display :0
But not works in GDM. If I comment it, it works on GDM from root with:
x11vnc -xkb -noxrecord -noxfixes -noxdamage -forever -rfbport 11226 -auth /run/user/125/gdm/Xauthority -display :0
So I don't get a solution for everything. I'm now out of ideas. LightDM is not a solution, cause we want to use GDM3.
Any response will be highly appreciated.
Regards.
x11vnc -display :0 -auth /var/run/lightdm/root/:0
is a good start. https://askubuntu.com/questions/229989/how-to-setup-x11vnc-to-access-with-graphical-login-screen/ – Kevin Jun 26 '23 at 22:32