apt-get install x11vnc x11vnc -storepasswd VNCpasswordHERE /etc/x11vnc.pass vi /lib/systemd/system/x11vnc.service [Unit] Description="x11vnc" Requires=display-manager.service After=display-manager.service [Service] ExecStart=/usr/bin/x11vnc -xkb -noxrecord -noxfixes -noxdamage -display :0 -auth guess -ncache 10 -rfbauth /etc/x11vnc.pass -rfbport 55528 -forever -shared ExecStop=/usr/bin/killall x11vnc Restart=on-failure Restart-sec=2 [Install] WantedBy=multi-user.target chmod 775 /lib/systemd/system/x11vnc.servicesystemctl daemon-reload systemctl start x11vnc
systemctl enable x11vnc
原文:http://www.cnblogs.com/fr5s/p/6402281.html