这是一个亲测可用的VNC安装步骤。
sudo apt install -y x11vnc
sudo apt install -y lightdm
mestars@pop-os:~$ mkdir -pv /home/yourname/.vnc
mestars@pop-os:~$ x11vnc -storepasswd yourpassword /home/yourname/.vnc/passwd
配置一个x11vnc服务
nano /lib/systemd/system/x11vnc.service
[Unit]
Description=x11vnc
serviceAfter=multi-user.target
[Service]
Type=simple
ExecStart=/usr/bin/x11vnc -auth guess -once -loop -noxdamage -repeat -rfbauth -geometry 1024x768 /home/yourname/.vnc/passwd -rfbport 5900 -shared
ExecStop=/usr/bin/killall x11vnc
Restart=on-failure
[Install]
WantedBy=multi-user.target
重新加载系统服务,并启动x11vnc服务。
sudo systemctl daemon-reload
sudo systemctl enable x11vnc.service
sudo systemctl start x11vnc.service
sudo systemctl status x11vnc.service
还不快抢沙发