我有一个带有 Raspbian OS 的 Raspberry Pi。安装 VNC 后,我尝试启动服务器并返回:
~ $ vncserver :0
Warning: raspberrypi:0 is taken because of /tmp/.X0-lock
Remove this file if there is no X server raspberrypi:0
A VNC server is already running as :0
如果我删除该临时文件,请返回:
~ $ vncserver :0
Warning: raspberrypi:0 is taken because of /tmp/.X11-unix/X0
Remove this file if there is no X server raspberrypi:0
A VNC server is already running as :0
如果我再次删除,服务器启动,但通过 VNC 客户端显示纯灰色屏幕。简而言之,之后:
~ $ sudo rm /tmp/.X11-unix/X0
~ $ sudo rm /tmp/.X0-lock
~ $ vncserver :0
New 'X' desktop is raspberrypi:0
Starting applications specified in /home/pi/.vnc/xstartup
Log file is /home/pi/.vnc/raspberrypi:0.log
我可以在 RealVNC 客户端中看到这一点(屏幕截图):
我不知道会发生什么。