灰屏问题
https://blog.csdn.net/orDream/article/details/79797113
https://askubuntu.com/questions/172384/vnc-grey-screen-and-start-on-boot-12-04
安装文档中的配置文件无效才考虑使用本方法
1. 灰屏问题¶
出现灰色屏幕和×型鼠标是因为vncserver找不到指定的图形化组件, 错误提示如下:在软件的下方提示的,大概2s就消失了
查看/home/用户名/.vnc/.log 可以看到日志文件 cat /home/用户名/.vnc/.log 提示:
Python
error opening security policy file /etc/X11/xserver/SecurityPolicy
Could not init font path element /usr/X11R6/lib/X11/fonts/Type1/, removing from list!
Could not init font path element /usr/X11R6/lib/X11/fonts/Speedo/, removing from list!
Could not init font path element /usr/X11R6/lib/X11/fonts/misc/, removing from list!
Could not init font path element /usr/X11R6/lib/X11/fonts/75dpi/, removing from list!
Could not init font path element /usr/X11R6/lib/X11/fonts/100dpi/, removing from list!
Could not init font path element /usr/share/fonts/X11/75dpi/, removing from list!
Could not init font path element /usr/share/fonts/X11/100dpi/, removing from list!
2. 解决¶
2.1 增加可执行权限重启不行则继续看下面的内容¶
2.2 修改配置文件¶
2.1重启无效后才考虑使用本方法。
在安装之前,我们先安装如下软件:
然后修改xstartup文件
Bash
#!/bin/sh
# Uncomment the following two lines for normal desktop:
export XKL_XMODMAP_DISABLE=1
unset SESSION_MANAGER
# exec /etc/X11/xinit/xinitrc
unset DBUS_SESSION_BUS_ADDRESS
gnome-panel &
gnmoe-settings-daemon &
metacity &
nautilus &
gnome-terminal &
Ubuntu(下面的步骤应该可以省略)