# apt-get install vnc4server
$vncserver -geometry 1366x768 :1
// 其中-geometry 指定客户端窗口的大小,:1 指的是客户端连接号
// 客户端在vnc viewer中输入 192.168.0.253:1 来连接服务器
在册亨等地区,都构建了全面的区域性战略布局,加强发展的系统性、市场前瞻性、产品创新能力,以专注、极致的服务理念,为客户提供网站设计、成都网站建设 网站设计制作按需网站建设,公司网站建设,企业网站建设,成都品牌网站建设,成都全网营销,外贸营销网站建设,册亨网站建设费用合理。
在该网站处,其中有位网友指出:
There are a number of things which can cause the grey screen problem. Your best bet is to look at the log file in .vnc to see what the error is. The log file name is hostName:display#.log, for example, on my machine, whose name is “golden”, it was golden:1.log.
In my case the ./vnc/xstartup file did not have the right permissions, so chmod +x ./vnc/xstartup fixed the problem. I could have fiddled with the contents of xstartup until the cows came home and it wouldn’t have helped.
我们通过查看~/.vnc/xxx:1.log可以查看出现问题的原因。
说明一下,此处的日志1.log表示客户端号为1的连接日志。
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!
在Ubuntu 15.10 下没有看到相关的文件夹,可能是版本路径的改变问题,我们通过find指令找到fonts其实是在/usr/share/fonts/下。
此处需我们创建指定目录,然后用ln 软连接将后者的路径指过来,拼接成日志中的路径名。
配置完成后还会出现下面的几个错误,但是并不会报错了。
error opening security policy file /etc/X11/xserver/SecurityPolicy
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/75dpi/, removing from list!
Could not init font path element /usr/share/fonts/X11/75dpi/, 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 &
重启VNCserver就ok了。
令注:
vncserver :1 开启服务
vncserver -kill :1 关闭这个连接号
网页名称:Ubuntu15.10安装VNC灰屏问题解决
文章起源:http://www.shufengxianlan.com/qtweb/news28/185778.html
网站建设、网络推广公司-创新互联,是专注品牌与效果的网站制作,网络营销seo公司;服务项目有等
声明:本网站发布的内容(图片、视频和文字)以用户投稿、用户转载内容为主,如果涉及侵权请尽快告知,我们将会在第一时间删除。文章观点不代表本网站立场,如需处理请联系客服。电话:028-86922220;邮箱:631063699@qq.com。内容未经允许不得转载,或转载时需注明来源: 创新互联