To stop and delete the x11vnc service that you previously set up, follow these steps:
1. Stop the x11vnc Service:
Use the following command to stop the x11vnc service:
sudo systemctl stop x11vnc.service
This command will immediately stop the x11vnc service if it's currently running.
2. Disable the x11vnc Service
Disable the x11vnc service to prevent it from starting automatically on boot:
sudo systemctl disable x11vnc.service
3. Delete the Service Unit File
Delete the systemd service unit file that you created earlier to remove the x11vnc service definition:
sudo rm /etc/systemd/system/x11vnc.service
4. Reload systemd and Clean Up
After deleting the service unit file, reload the systemd manager and clean up any remnants:
sudo systemctl daemon-reload
5. Stop x11vnc Process (if running)
Verify that the x11vnc process is not running. You can use the `ps` command to check for running processes:
ps aux | grep x11vnc
If you see any x11vnc processes still running, you can terminate them using the `kill` command:
sudo pkill x11vnc