Skip to content

Instantly share code, notes, and snippets.

@erm3nda
Last active June 15, 2019 06:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save erm3nda/fa0bfb8f3737dc6398889adb50fdc84b to your computer and use it in GitHub Desktop.
Save erm3nda/fa0bfb8f3737dc6398889adb50fdc84b to your computer and use it in GitHub Desktop.
x11vnc dynamic launcher
# 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
@erm3nda
Copy link
Author

erm3nda commented Mar 31, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment