VNC over the browser
at 2021-12-25 13:19:01.
apt-get install -y novnc x11vnc x11vnc -display :0 -autoport -localhost -nopw -bg -xkb -quiet -forever
if you get any errors do this: x11vnc -display :0 -autoport -localhost -nopw -bg -xkb -quiet -forever run
ps aux | grep Xorg
and you will get a line like this root 1930 9.0 1.0 25383856 82068 tty2 Sl+ 14:39 7:58 /usr/lib/xorg/Xorg vt2 -displayfd 3 -auth /run/user/0/gdm/Xauthority -nolisten tcp -background none -noreset -keeptty -novtswitch -verbose 3 and add the following to the end of your first command
-auth /run/user/0/gdm/Xauthority
so like this:
x11vnc -display :0 -autoport -localhost -nopw -bg -xkb -quiet -forever -auth /run/user/0/gdm/Xauthority
The VNC desktop is: localhost:0 PORT=5900
with is you can check if the port is open and the program is running
ss -antp | grep vnc
LISTEN 0 32 127.0.0.1:5900 0.0.0.0:* users:(("x11vnc",pid=8056,fd=8)) LISTEN 0 32 [::1]:5900 [::]:* users:(("x11vnc",pid=8056,fd=9))
then with novnc you can reroute like so:
/usr/share/novnc/utils/launch.sh --listen 8081 --vnc localhost:5900