#1
安装x11vnc
$ sudo apt-get update
$ sudo apt-get install x11vnc
- 1
- 2
#2
生成密码
$ x11vnc -storepasswd
- 1
#3
开启服务
$ x11vnc -auth guess -once -loop -noxdamage -repeat - rfbauth /home/robomaster/.vnc/passwd -rfbport 5900 -shared
- 1
#4
设为开机启动
$ sudo nano /lib/systemd/system/x11vnc.service
- 1
插入以下代码
[Unit]
Description=Start x11vnc at startup.
After=multi-user.target
[Service]
Type=simple
ExecStart=/usr/bin/x11vnc -auth guess -once -loop -noxdamage -repeat -rfbauth /home/USERNAME/.vnc/passwd -rfbport 5900 -shared
[Install]
WantedBy=multi-user.target
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
$ sudo systemctl daemon-reload
$ sudo systemctl enable x11vnc.service
- 1
- 2
注意在这之前不要尝试更老版本的VNCServer否则我出现莫名其妙的错误,然后日常重装Ubuntu
#5
连接时出现错误
Unable to connect to VNC Server using your chosen security
setting. Either upgrade VNC Server to a more recent version from
RealVNC, or select a weaker level of encryption.
在服务器端使用
gsettings set org.gnome.Vino require-encryption false
- 1
降低服务器端的安全等级(不推荐)。
评论记录:
回复评论: