Last active
June 15, 2019 06:00
-
-
Save erm3nda/37e5720b4197a7a16c564418d377aac0 to your computer and use it in GitHub Desktop.
x11vnc static service
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 hardcoded x11vnc at port 5901 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:5901.pid | |
ExecStart=/usr/bin/x11vnc -forever -shared -bg -rfbport 5901 -display :0 -geometry 800x600 -rfbauth /etc/x11vnc.pass -listen 127.0.0.1 | |
ExecStop=/bin/sh -c "/bin/kill -9 `lsof -i:5901 -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