在我执行了一次terminate以后,突然出现了十几个窗口,灰屏并无法正常启动。
root@raspbmc:/home/pi# vncserver -terminate
Warning: raspbmc:1 is taken because of /tmp/.X1-lock
Remove this file if there is no X server raspbmc:1
Warning: raspbmc:2 is taken because of /tmp/.X2-lock
Remove this file if there is no X server raspbmc:2
Warning: raspbmc:3 is taken because of /tmp/.X3-lock
Remove this file if there is no X server raspbmc:3
Warning: raspbmc:4 is taken because of /tmp/.X4-lock
Remove this file if there is no X server raspbmc:4
Warning: raspbmc:5 is taken because of /tmp/.X5-lock
Remove this file if there is no X server raspbmc:5
Warning: raspbmc:6 is taken because of /tmp/.X11-unix/X6
Remove this file if there is no X server raspbmc:6
Warning: raspbmc:7 is taken because of /tmp/.X11-unix/X7
Remove this file if there is no X server raspbmc:7
Warning: raspbmc:8 is taken because of /tmp/.X11-unix/X8
Remove this file if there is no X server raspbmc:8
Warning: raspbmc:9 is taken because of /tmp/.X11-unix/X9
Remove this file if there is no X server raspbmc:9
Warning: raspbmc:10 is taken because of /tmp/.X10-lock
Remove this file if there is no X server raspbmc:10
Warning: raspbmc:11 is taken because of /tmp/.X11-lock
Remove this file if there is no X server raspbmc:11
Warning: raspbmc:12 is taken because of /tmp/.X12-lock
Remove this file if there is no X server raspbmc:12
Warning: raspbmc:13 is taken because of /tmp/.X13-lock
Remove this file if there is no X server raspbmc:13
Warning: raspbmc:14 is taken because of /tmp/.X14-lock
Remove this file if there is no X server raspbmc:14
Warning: raspbmc:15 is taken because of /tmp/.X15-lock
Remove this file if there is no X server raspbmc:15
Warning: raspbmc:16 is taken because of /tmp/.X16-lock
Remove this file if there is no X server raspbmc:16
Warning: raspbmc:17 is taken because of /tmp/.X11-unix/X17
Remove this file if there is no X server raspbmc:17
Warning: raspbmc:18 is taken because of /tmp/.X11-unix/X18
Remove this file if there is no X server raspbmc:18
New ‘X’ desktop is raspbmc:21
Starting applications specified in /root/.vnc/xstartup
Log file is /root/.vnc/raspbmc:21.log
解决方法是删除临时目录下的文件。
sudo rm -rf /tmp/.X11-unix/*
然后重新启动
root@raspbmc:/home/pi# vncserver
New ‘X’ desktop is raspbmc:1
Starting applications specified in /root/.vnc/xstartup
Log file is /root/.vnc/raspbmc:1.log