Ubuntu|使用x11vnc進行遠端桌面連線
阿新 • • 發佈:2019-02-10
1
安裝x11vnc
$ sudo apt-get update
$ sudo apt-get install x11vnc
2
生成密碼
$ x11vnc -storepasswd
3
開啟服務
$ x11vnc -auth guess -once -loop -noxdamage -repeat - rfbauth /home/robomaster/.vnc/passwd -rfbport 5900 -shared
4
設為開機啟動
$ sudo nano /lib/systemd/system/x11vnc.service
插入以下程式碼
[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
$ sudo systemctl daemon-reload
$ sudo systemctl enable x11vnc.service
注意在這之前不要嘗試更老版本的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
降低伺服器端的安全等級(不推薦)。