Install the executable with package manager
sudo pacman -S x11vnc
Create a password for incomming connections
sudo x11vnc -storepasswd /etc/x11vnc.passwd
Use systemd to daemonize the service
1 |
|
The systemd part is rather tricky, -auth guess
does not work well, you have to find the right file for the DM using ps wwwaux | grep auth
.
Sometimes the command works fine in bash, but have trouble run with systemd, try wrap the command like below:
ExecStart=/bin/bash -c "/usr/bin/x11vnc -display :0 -auth $(find /var/run/sddm/ -type f) -forever -loop -noxdamage -repeat -rfbauth /etc/x11vnc.passwd -rfbport 5900 -shared"