Last active
June 15, 2019 06:00
-
-
Save erm3nda/fa0bfb8f3737dc6398889adb50fdc84b to your computer and use it in GitHub Desktop.
x11vnc dynamic launcher
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This is dinamyc x11vnc service listening only to localhost (intended to use it with ssh tunnel) | |
# I do use that along realvnc-vnc-server because i do tweak geometry for vnn while having full resolution on hdmi screen | |
# To create password file run "x11vnc -storepasswd in /etc/x11vnc.pass" or even "x11vnc -storepasswd yourpassword /etc/x11vnc.pass" | |
# Once created, enable this service with "sudo systemctl enable x11vnc" restart or "sudo service x11vnc start" | |
[Unit] | |
Description=Scaled remote desktop service (x11vnc) | |
After=syslog.target network.target | |
[Service] | |
RemainAfterExit=yes | |
Type=oneshot | |
User=pi | |
PAMName=login | |
PIDFile=/home/pi/.x11vnc/%H:590%i.pid | |
ExecStart=/usr/bin/x11vnc -forever -shared -bg -rfbport 590%i -display :0 -geometry 800x600 -rfbauth /etc/x11vnc.pass -listen 127.0.0.1 | |
ExecStop=/bin/sh -c "/bin/kill -9 `lsof -i:590%i -t`" | |
[Install] | |
WantedBy=multi-user.target |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Doesn't work at boot time properly. Here is the proper way to do it http://www.lueckdatasystems.com/Successfully_running_x11vnc_as_a_Systemd_Service_in_Xubuntu_16.04_Xenial-Xerus