Posts

Showing posts from July, 2024

x11vnc as a service

working one 1. apt install x11vnc 2. x11vnc -storepasswd                      Create a file x11vnc.sh x11vnc -display :0 -forever -loop -noxdamage -repeat -rfbauth /home/rasitha/.vnc/passwd -rfbport 5916 -shared make it executable & run at startup 3. sudo nano /usr/bin/startx11vnc          4. #!/bin/sh # Restart the x11vnc service restartx11vnc () {     /usr/bin/systemctl restart x11vnc } # Log a message to the system log logtosyslog () {     /usr/bin/logger -t startx11vnc $1 } # Log startup logtosyslog "x11vnc starting" # Start up x11vnc in the background. If it exits (-loop exits) then we'll try to recover by restarting. # The & at the end lets the first line run in the background. Restarting the service will kill it. Commands are # chained with  ;  because we want all the commands to be executed if x11vnc exitsno matter what the return status. # Putting...