VNC配置不成功,求帮助客户成功自己

ubuntu安装vnc,远程链接时出现灰屏,配置文档不对吗? - 知乎6被浏览887分享邀请回答0添加评论分享收藏感谢收起0添加评论分享收藏感谢收起查看更多回答您还没有登录,快捷通道只有在登录后才能使用。 还没有帐号? 赶紧
关于VNC新手求助
在线时间1小时
[font='Helvetica Neue', 'Luxi Sans', 'DejaVu Sans', Tahoma, 'Hiragino Sans GB', STHeiti, 'Microsoft YaHei'] [font='Helvetica Neue', 'Luxi Sans', 'DejaVu Sans', Tahoma, 'Hiragino Sans GB', STHeiti, 'Microsoft YaHei']在配置VNC的过程出现以下问题:&[font='Helvetica Neue', 'Luxi Sans', 'DejaVu Sans', Tahoma, 'Hiragino Sans GB', STHeiti, 'Microsoft YaHei']&&[font='Helvetica Neue', 'Luxi Sans', 'DejaVu Sans', Tahoma, 'Hiragino Sans GB', STHeiti, 'Microsoft YaHei']Fri Dec 18 22:06:45 2015 vncext:&&&&&&VNC extension running! vncext:&&&&&&Listening for VNC connections on all interface(s), port 5901 vncext:&&&&&&created VNC server for screen 0gnome-session[1753]: devkit-power-gobject-WARNING: Couldn't connect to system bus: Failed to connect to socket /var/run/dbus/system_bus_socket: No such file or directorygnome-session[1753]: WARNING: Could not connect to ConsoleKit: Failed to connect to socket /var/run/dbus/system_bus_socket: No such file or directorygnome-session[1753]: WARNING: Could not connect to ConsoleKit: Failed to connect to socket /var/run/dbus/system_bus_socket: No such file or directorygnome-session[1753]: WARNING: Could not parse desktop file /root/.config/autostart/xfce4-settings-helper-autostart.desktop: Key file does not have key 'Name'gnome-session[1753]: WARNING: could not read /root/.config/autostart/xfce4-settings-helper-autostart.desktopgnome-session[1753]: WARNING: Could not parse desktop file /root/.config/autostart/xfconf-migration-4.6.desktop: Key file does not have key 'Name'gnome-session[1753]: WARNING: could not read /root/.config/autostart/xfconf-migration-4.6.desktopGNOME_KEYRING_SOCKET=/tmp/keyring-0kvHhu/socketSSH_AUTH_SOCK=/tmp/keyring-0kvHhu/socket.sshGNOME_KEYRING_PID=1831socket(): Address family not supported by protocol** (gnome-panel:1854): WARNING **: panel-applet-frame.c:1288: failed to load applet OAFIID:GnoteApplet:(null)gnome-session[1753]: WARNING: Could not connect to ConsoleKit: Failed to connect to socket /var/run/dbus/system_bus_socket: No such file or directorygnome-session[1753]: WARNING: Could not connect to ConsoleKit: Failed to connect to socket /var/run/dbus/system_bus_socket: No such file or directory** (gnome-panel:1854): WARNING **: panel-applet-frame.c:1359: failed to load applet OAFIID:GNOME_FastUserSwitchApplet (cannot get property bag):Unknown CORBA exception id: 'IDL:omg.org/CORBA/INV_OBJREF:1.0'(gnome-panel:1854): Gtk-WARNING **: A floating object was finalized. This means that someonecalled g_object_unref() on an object that had only a floating the initial floating reference is not owned by anyoneand must be removed with g_object_ref_sink().&请教大神解决办法!!谢谢!! [font='Helvetica Neue', 'Luxi Sans', 'DejaVu Sans', Tahoma, 'Hiragino Sans GB', STHeiti, 'Microsoft YaHei'] &[ 此帖被gzpol在 23:23重新编辑 ]
在线时间2352小时
楼主您好,&&欢迎来到阿里云论坛。&&请问,您的ECS云服务器的配置,是多少内存呢?&&您是在使用Debian系统,安装有gnome桌面套件吗?&&您是根据哪个教程来安装vnc的呢?
Debian 是一个自由的操作系统 (OS),提供您安装在计算机上使用。操作系统就是能让您的计算机工作的一系列基本程序和实用工具。
在线时间1小时
回 1楼dongshan8的帖子
我的云服务器的配置是1G内存,我在使用Centos系统,安装的套件了。&呃,我根据阿里云的教程来安装的,但后来自己又瞎搞了一通...&之前一直是提示说找不到文件的,后来将文件格式弄成UNIX的以后就成这个样子了。
在线时间1小时
回 1楼dongshan8的帖子
刚刚试着打开一下,发现莫名就行了...
访问内容超出本站范围,不能确定是否安全
限100 字节
如果您提交过一次失败了,可以用”恢复数据”来恢复帖子内容
您目前还是游客,请
验证问题: 阿里云官网域名是什么? 正确答案:
&回复后跳转到最后一页VNC连接黑屏的问题
我安装的是红旗的操作系统。连接vnccserver后黑屏
·查看系统已经安装了vnc
&#rpm -q vnc
·解决方案:
1.修改配置文件/root/.vnc/xstartup
注:有的系统配置里有 &nolisten tcp 和 &nohttpd
,这两个是阻止Xwindows登陆和HTTP方式VNC登陆的,如果需要图形界面,那就删除这部分
如果使用的是gnome图像界面,则需要注释掉以下两行,
#xterm -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop"
并添加以下这行:
gnome-session &
例如:我的配置文件如下
# Uncomment the following two lines for normal desktop:
unset SESSION_MANAGER
exec /etc/X11/xinit/xinitrc[ -x /etc/vnc/xstartup ]
&& exec /etc/vnc/xstartup
[ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources
xsetroot -solid grey
vncconfig -iconic &
#xterm -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop"
#gnome-session &&
&#set starting GNOME desktop
&  &&&&&&
#kde desktop
#twm &&&    #Text
注:红色部分就是被修改或增加的部分
2.&修改用户配置文件:/etc/sysconfig/vncservers
打开配置文件:vi
/etc/sysconfig/vncservers,去掉下面这两行前的“#”,也就是说把这两行的注释给去掉。
VNCSERVERS=”1:root”
VNCSERVERARGS[1]="-geometry 800&600"
1表示VNC以桌面1运行,这样可以启动root的桌面。你可以添加其他的用户,例如VNCSERVERS=”
1:root,2:user1,3:user2”,当然这些用户是实现系统存在的。
例如:我的/etc/sysconfig/vncservers配置文件如下:
VNCSERVERS=”1:root”
#VNCSERVERARGS[1]="-geometry 800&600"
VNCSERVERARGS[1]=”-geometry 800&600 -alwaysshared
-depth 24&P
-alwaysshared代表允许多用户同时登录
-depth代为色深,参数有8,16,24,32。
注:红色部分就是被修改或增加的部分
另外:如果有图像界面的话,在系统设置&服务器设置&服务 中把 vncserver 打勾,可以随系统启动。
3、改变xstartup的权限
这个问题是很多人容易忽视的问题,也是造成连接成功后黑屏的原因之一。
在CentOS中,xstartup的文件路径为:/root/.vnc/ (可以通过locate
xstartup来查看xstartup的文件路径)
所以需要执行:chmod 777 root/.vnc/xstartup
关闭防火墙对VNC端口的限制如果需要从外网控制内网的某台Linux,则需要打开防火墙相应的端口,并在路由器上进行端口映射。
VNC给浏览器的端口是5800+N,给vncviewer的端口是5900+N,N是设置的display号。
如果不想打开防火墙,但是仍需要VNC这项服务,则需要:
编辑vi /etc/sysconfig/iptables&
在里边加入如下两行:&
-A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport
5901 -j ACCEPT&
-A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport
5902 -j ACCEPT
这里需要的是,display N 对应的端口就是 5900+N,所以不建议设的太多。
5. 启动 VNC Server:
打开终端执行:vncserver
第一次运行 vncserver,将会要求输入两次密码,会看到如下提示信息:
New ‘localhost.localdomain:1 (root)’ desktop is
localhost.localdomain:1
Starting applications specified in /root/.vnc/xstartup
Log file is /root/.vnc/localhost.localdomain:1.log
上边信息中的“:1”表示启动的第一个vnc桌面。
1、VNC的启动/停止/重启
#service vncserver start/stop/restart
关闭具体的vncserver命令:vncserver -kill
vncserver -kill :2
2、设置密码
#vncpasswd
6. 停止vncserver:(选读)
停止 vncserver 的方法是执行:vncserver -kill :1
注意:“:1”,表示停止第一个vnc桌面,1代表当前启用的VNCserver序号,“:1”之前是有一个空格的。如果目前启动的序号是2,若要关闭其,则应该使用“vncserver
-kill :2”.
7. 修改vnc密码:(选读)
修改vnc密码的方法是执行:vncpasswd
输入两次密码即可。
8:检查服务器端VNC Server是否正常运行中:
执行:ps -ef|grep vnc
如果vnc在执行,可以看到类似的消息:
[root@IMS ~]# ps -ef|grep vnc
00:13:51 Xvnc :1 -desktop
MyIMS.local:1&(root) -httpd
/usr/share/vnc/classes -auth /root/.Xauthority -geometry 800x600
-depth 16 -rfbwait 30000 -rfbauth /root/.vnc/passwd -rfbport 5901
说明是序号为":1"vnc进程在端口为5901上进行监听。
9.VNC 客户端
服务器端运行正常后,我们方可以考虑使用VNC客户端与其相连。
Windows 客户端 VNC Viewer 的配置:
1. 从&&下载
VNC Free Edition for Windows Version 4.1.2
2. 打开 VNCViewer :
填入VNCServer 的IP:编号(1或2或…)
3. VNCViewer 切换全屏模式:F8
10 一些配置文件:
/etc/X11/xorg.conf 设置屏幕分辨率
到这里,您的VNC应该已经能够连上,但有可能出现黑屏的问题:
1、查看/root/.vnc/下的log日志,有没有报错;有可能是xstartup权限不够。“chmod xstartup
777”更改下
权限,重启后再进。
2、重新启动下电脑,试一试。我就是各种配置之后,始终黑屏,重启电脑后OK。
解决方法参考:
已投稿到:
以上网友发言只代表其个人观点,不代表新浪网的观点或立场。#apt-get install x-window-system-core
#apt-get install gnome-core gdm
重启即可进入gnome桌面
#apt-get install fcitx
使fcitx开机启动:
方法一:编辑/etc/environment,添加两行:
export LANG=zh_CN.GBK
export XMODIFIERS=@im=fcitx
方法二:创建文件/etc/X11/Xsession.d/25xchinput-start,写入:
export LANG=zh_CN.GBK
export XMODIFIERS=@im=fcitx
  到现在为止系统已经可以用作很好的桌面了。桌面下推荐安装synaptic软件管理器。相当方便。
#apt-get install synaptic
Debian 6解决中文乱码
解决办法:打开终端,切换至root帐号。  
执行以下命令:
apt-get install ttf-wqy-zenhei(安装字体)   
apt-get install ibus ibus-gtk ibus-pinyin(安装输入法)
-------------------------
设置本地化 Locale
如果我们在安装 Debian&
系统时,语言选择了英语呢?进入系统后看到全是英文,是不是有点郁闷。那么我们怎样设置成简体中文呢?
#如果你安装系统时选择的就是简体中文,可以跳过这段,只安装中文字体就行了。当然你也可以修改成其他的语言。
打开终端,执行命令:&
dpkg-reconfigure locales
把 带 zh_CN 字样的全部选上,然后选择 OK 确定,在弹出的对话框中,选择系统的 locale ,选择zh_CN.UTF-8。
安装时选择的是英语,会缺少中文字体,用以下命令安装字体:
apt-get install xfonts-intl-chinese wqy*&
下次重起机器,在GNOME登录介面下方的Language,登录语言选择:汉语(中国)
对着桌面猛击右键 ===& 更改桌面背景 ===& 字体
选择自己喜欢的字体,比如:文泉驿点阵正黑或文泉驿微米黑
Debian6下安装VNC
一、VNC安装
$ sudo aptitude install vnc4server
二、首行运行vncserver设置密码
$ vncserver&& //注意:如果是普通用户执行的话,则客户端是以普通用户身份连接的服务器。
$ vncpasswd
Centos5.6 VNC安装配置
一、检查是否安装了VNC的服务端和客户端
[root@localhost ~]#&rpm –q vnc vnc-server
使用如上命令查看是否安装VNC的服务端和客户端。如果显示如下,说明已经安装
[root@tenjak-250 ~]# rpm -q vnc vnc-server
vnc-4.1.2-14.el5_5.4
vnc-server-4.1.2-14.el5_5.4
如果什么都没显示说明没有安装,则需要安装
[root@localhost ~]#&yum install vnc vnc-server
二、配置VNC
1、& 切换到想启动VNC服务的用户下执行vncserver,启动VNC并在该用户家目&&&&& 录里面生成远程桌面配置文件,这里就以root用户为例
需要在每个用户下启动vncserver,生成该用户远程桌面连接时的配置文件以及访问密码,方法就是切换到每个用户,执行 vncserver。
(注释:在启动VNCserver时,你也可以为server指定一个display参数。你可以把display理解为一个桌面,每个用户都可以有自己的桌面。VNC客户端在连接时,可以指定连接到哪个桌面上。在系统中,display号不能重复,也就是说,如果有用户已经建立了名为“:1”的display,另外一个用户就不能再使用“:1”了,他可以使用“:2”。指定display号码的启动VNC server的命令是:&& vncserver : 1)
[root@localhost ~]#&vncserver&&&&&&&& //运行vncserver。
You will require a password to access your desktops.
enter password:&&&&//首次运行会让你设置密码,密码要求6位以上
verify password:&&& //确认密码
xauth: creating new authority file /root/.Xauthority&&&&&&& #首次运行会生成本用户的相关配置文件,以及日志文件,生成位置在~.vnc/目录下
New 'CPAYNET005:1 (root)' desktop is CPAYNET005:1 注意这个数字1
Creating default startup script /root/.vnc/xstartup
Starting applications specified in /root/.vnc/xstartup
Log file is /root/.vnc/CPAYNET005:1.log&&&& #注意这个数字
[root@localhost ~]# vncserver&& -kill&& :1&&& #杀死刚才运行的vncserver,数字1正是上面1.log那个1。注意上面红色字体。这个方法也可以
[root@localhost ~]# vi ~/.vnc/xstartup&&&&&& #编辑这个配置脚本文件,配置使远程登录为gnome或者kde桌面。
[root@localhost ~]#
vi /root/.vnc/xstartup
# Uncomment the following two lines for normal desktop:
# unset SESSION_MANAGER
# exec /etc/X11/xinit/xinitrc
[ -x /etc/vnc/xstartup ] && exec /etc/vnc/xstartup
[ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources
xsetroot -solid grey
vncconfig -iconic &
xterm -geometry 80x24+10+10 -ls -title &$VNCDESKTOP Desktop& &
gnome-session &
2.接下来编辑vnc的配置文件
[root@localhost~]#vi /etc/sysconfig/vncservers
以下是文件内容:
解释一下这个文件:
VNCSERVERS这一行是配置在系统启动时启动几个VNC server,上面的例子里运行了一个VNC server,root在display:1 VNCSERVERARGS这行,为VNC server 1配置启动参数,上面的例子里对root使用屏幕分辨率。
设置完成后就可以启动vncserver服务了。
[root@localhost~]#/sbin/service vncserver restart& 防止VNC已经启动,我们用重新启动的命令以防万一
启动失败的原因有:
1./etc/sysconfig/vncservers文件参数不对
2.没有为vncservers提到的用户生成各自的配置文件
3.在生成配置文件后,没有使用命令vncserver -kill :1 将那个进程杀死
--------------------------------------------------------------------------------------------------------------------
3. 如果连不通,需要配置一下防火墙,允许VNC客户端连接VNC server。&(此步不一定要)
VNC server监听的端口从5900开始,display:1的监听5901,display:2监听5902,以此类推。CentOs的防火墙缺省是不允许连接这些端口的,所以需要使用下面的步骤打开防火墙(需要root权限):
vi /etc/sysconfig/iptables&&
vi /etc/sysconfig/iptables 找到下面的语句:
-A RH-Firewall-1-INPUT -j REJECT –reject-with icmp-host-prohibited
在此行之前,加上下面的内容:
-A RH-Firewall-1-INPUT -m state –state NEW -m tcp -p tcp –dport
这句话的含义是,允许其它机器访问本机的端口,这样,display:1, display:2, display:3的用户就可以连接到本机。
然后使用root身份重新启动防火墙:
[root@localhost~]#/sbin/service iptables restart
[root@localhost~]#/sbin/service iptables restart
(注:如果是用做实验的机器,可以干脆用/sbin/service iptables stop来关掉防火墙)
好了,现在就可以运行客户端软件,连接到VNC server上了。
从VNC view登录
在windows上安装vnc view,然后输入xxx.xxx.xxx.xxx:1,连接登录,输入密码即可。
修改VNC分辨率大小
1.第一种方法:使用参数进行调整
使用man命令获得关于geometry参数的描述
[root@secdb ~]# man vncserver
&&&&&& -geometry widthxheight
&&&&&&&&&&&&& Specify the size of the desktop to be created. Default is .
可见,默认的分辨率是,我们可以使用这个参数对分辨率进行调整。
例如,我们需要将分辨率调整到800x600
[root@secdb ~]# vncserver -geometry 800x600
2.第二种方法:修改配置文件vncservers
[root@secdb ~]# vi /etc/sysconfig/vncservers
# The VNCSERVERS variable is a list of display:user pairs.
# Uncomment the line below to start a VNC&&on
display :1
# as my 'myusername' (adjust this to your own).& You will also
# need to set a VNC run 'man vncpasswd' to see how
# to do that.
# DO NOT RUN THIS SERVICE if your local area network is
# untrusted!& For a secure way of using VNC, see
# &URL:http://www.uk./vnc/sshvnc.html&.
# VNCSERVERS=&1:myusername&
# VNCSERVERARGS[1]=&-geometry 800x600&
VNCSERVERS=&1:root 2:oracle&
VNCSERVERARGS[1]=&-geometry &
VNCSERVERARGS[2]=&-geometry &
例如我们可以将最后一行内容调整为如下
VNCSERVERARGS[2]=&-geometry 800x600&
重启vncserver后,使用“192.168.23.102:2”登录VNC便会得到一个800x600的操作窗口,用户是。
[root@secdb ~]# /etc/init.d/vncserver restart
Shutting down VNC server: 1:root 2:oracle&&&&&&&&&&&&& [& OK& ]
Starting VNC server: 1:root 2:oracle&&&&&&&&&&&&&&&&&& [& OK& ]
本文已收录于以下专栏:
相关文章推荐
vnc是Virtual Network Computing(虚拟网络计算机)的缩写。VNC是由AT&T的欧洲研究实验室开发的一款优秀的跨平台远程桌面控制软件,支持linux,unix,windows等...
首先要判断安装了vnc ,yum install -y vnc vnc-sercer
vnc启停方式:vncserver :1  ; vncserver -kill :1
今天是2013...
mRemote可以在一个界面下管理RDP、VNC、SSH、TELNET、HTTP、Rlogin、RAW等多种协议的远程控制。mRemote利用目录组织大量连接,并能保存链接信息,使用Tab页面同时控制...
在CentOS5下安装配置VNC的过程
2011 年 04 月 02 日linlonxRHEL
及衍生Go to comment
1.查看VNC是否已经安装:
$ rpm -q vnc ...
Ubuntu 14.04安装配置VNC桌面的过程,记录一下。由于Ubuntu 14.04采用的新版Gnome对远程桌面支持的非常不友好,因此,网上的解决方案普遍是安装旧版gnome,或者安装xfce桌...
他的最新文章
讲师:王哲涵
讲师:韦玮
您举报文章:
举报原因:
原文地址:
原因补充:
(最多只允许输入30个字)}

我要回帖

更多关于 一个人的成功在于帮助 的文章

更多推荐

版权声明:文章内容来源于网络,版权归原作者所有,如有侵权请点击这里与我们联系,我们将及时删除。

点击添加站长微信