树莓派4b开启vnc
vnc开启
通过ssh连接到树莓派后运行如下命令
打开命令行,输入
sudo raspi-config
,
打开树莓派软件设置工具
选择
“3 Interfacing Options
”
选择
“I3 VNC
”
提示是否要开启VNC,选择是
开启后,按tab选择“Finish”结束
启动vnc,命令行运行:
vncserver
如果不用realvnc软件连接,而是用别的连接软件,会出现vnc无法连接的现象,按以下步骤来
vnc无法连接
显示 Error in TightVNC Viewer No security types supported 的解决方案
树莓派4b Raspbian系统,用 mobaxterm VNC 连接的时候提示
Error in TightVNC Viewer: No security types supported. Server sent security types, but we do not support any of their.
需要降级vnc服务器的身份验证
解决方案
- 用 root 权限在 /root/.vnc/config.d/vncserver-x11 里面加入下列行
Authentication=VncAuth
- 设定 VNC 密码
vncpasswd -service
- 重启 VNC 服务
systemctl restart vncserver-x11-serviced.service
参考链接
https://www.cyberpunk.rs/raspberry-pi-remote-login-with-vnc