ubuntu下安装vnc出错(灰屏)

我 win10 用的 vncviewer.exe ,

在Ubuntu上首先需要安装vnc4server

# apt-get install vnc4server


出现灰色屏幕和×型鼠标是因为vncserver找不到指定的图形化组件,

错误提示如下:在软件的下方提示的,大概2s就消失了


查看/home/用户名/.vnc/*.log   可以看到日志文件

 
 

提示:

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!

这是没有找到文件,无法初始化,所以运行如下命令即可解决:

5. 需要更改~/.vnc/xstartup文件


在安装之前,我们先安装如下软件:

$sudo apt-get install gnome-panel gnome-settings-daemon metacity nautilus gnome-terminal

然后修改xstartup文件

#!/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:

mkdir /usr/X11R6/lib/X11/
cd /usr/X11R6/lib/X11
ln -s /usr/share/fonts/X11/ fonts



重启VNCserver就ok了。






猜你喜欢

转载自blog.csdn.net/ordream/article/details/79797113