树莓派4b使用vncview连接报错:Cannot currently show the desktop
查看VNC Server状态正常,只是有报错
pi@raspberrypi:~ $ systemctl status vncserver-x11-serviced.service
● vncserver-x11-serviced.service - VNC Server in Service Mode daemon
Loaded: loaded (/usr/lib/systemd/system/vncserver-x11-serviced.service; enabled; vendor preset: enabled)
Active: active (running) since Wed 2020-11-25 14:33:19 CST; 1min 13s ago
Main PID: 437 (vncserver-x11-s)
Nov 25 13:55:46 raspberrypi vncserver-x11[469,root]: AgentInitCheck: no response from agent
Nov 25 13:55:51 raspberrypi vncserver-x11[469,root]: AgentInitCheck: agent comms failure
Nov 25 13:55:56 raspberrypi vncserver-x11[469,root]: AgentInitCheck: no response from agent
Nov 25 13:56:01 raspberrypi vncserver-x11[469,root]: AgentInitCheck: agent comms failure
/var/log/syslog也一直在刷如下错误:
Nov 25 13:50:00 raspberrypi vncserver-x11[469,root]: AgentInitCheck: agent comms failure
Nov 25 13:50:05 raspberrypi vncserver-x11[469,root]: AgentInitCheck: no response from agent
原因:树莓派没有接有显示器,自动获取屏幕分辨率失败,得设置下。
解决办法:
sudo raspi-config
选择:Advanced Options
再选: Resolution
再选:DMT Mode 82 1920x1080 60Hz 16:9
然后重启
参考:https://www.cnblogs.com/kekeoutlook/p/12272705.html(感谢这个大哥,我差点重装系统)