第一步安裝vnc
sudo apt update
sudo apt install vino
第二步,設(shè)置vnc服務(wù)自行啟動
mkdir -p ~/.config/autostart
cp /usr/share/applications/vino-server.desktop ~/.config/autostart
第三步配置vnc服務(wù)
gsettings set org.gnome.Vino prompt-enabled false # 禁止彈窗
gsettings set org.gnome.Vino require-encryption false # 禁止加密
# 以上兩個也可以在路徑下自行勾選org->gnome->desktop->remote-access
gsettings set org.gnome.Vino authentication-methods "['vnc']"
gsettings set org.gnome.Vino vnc-password $(echo -n '123456'|base64) # 設(shè)置密碼為123456