Vnc的问题,Xmanager无法连接!

Web、Mail、Ftp、DNS、Proxy、VPN、Samba、LDAP 等基础网络服务
回复
kingsin
帖子: 21
注册时间: 2007-09-01 5:09
送出感谢: 0
接收感谢: 0

Vnc的问题,Xmanager无法连接!

#1

帖子 kingsin » 2008-09-28 15:46

按照教程配置了vnc
1.创建vnc user

代码: 全选

# useradd larry
# passwd larry ***
2.创建vnc文件
使用larry登陆

代码: 全选

#vncpassword
[~]$ cd .vnc
[.vnc]$ ls
passwd
3.编辑配置文件

代码: 全选

vi /etc/sysconfig/vncservers
在文件末尾加入
VNCSERVERS="1:larry "
VNCSERVERARGS[1]="-geometry 640x480"
4.编辑xstartup

代码: 全选

vi ~/.vnc/xstartup

#!/bin/sh
# Add the following line to ensure you always have an xterm available.
while true &
# 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" &
twm &
我是按照上面的方法配制的!结果在localhost.localdomain:1.log报错 Xmanager也无法连接!!!

代码: 全选

** (nm-applet:18370): WARNING **: <WARNING>      nma_dbus_init (): nma_dbus_init() could not acquire its service.  dbus_bus_acquire_service() says: 'Connection ":1.108" is not allowed to own the service "org.freedesktop.NetworkManagerInfo" due to security policies in the configuration file'
我不知道我错在什么地方了! :em20
头像
windwiny
帖子: 2254
注册时间: 2007-03-13 17:26
送出感谢: 0
接收感谢: 1 次

Re: Vnc的问题,Xmanager无法连接!

#2

帖子 windwiny » 2008-09-28 16:30

如果你用GNOME桌面,,在首选项里有个 远程桌面,里面设置共享就可以了

这个可能要服务器用户登陆后才行,我没用过这个



如果你用VNC
sudo apt-get install vnc-server
创建 ~/.vnc/xstrartup
#!/bin/sh

# 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 &


然后运行 vncserver ,第一次运行有提示输入密码
会有提示在哪个端口 0.log 1.log
vncserver -k :0 关闭

远程用 vncviewer 12.34.56.78:1 后面 端口好像是 0 1 2 ..或者 5900 5901 ... 记不太清了

连上之后的用户就是 运行 vncserver 的用户
kingsin
帖子: 21
注册时间: 2007-09-01 5:09
送出感谢: 0
接收感谢: 0

Re: Vnc的问题,Xmanager无法连接!

#3

帖子 kingsin » 2008-09-28 17:13

好像跟您说的不一样阿!那个177端口是干什么用的?我按照您的说法重新启动vnc显示

代码: 全选

New 'localhost.localdomain:2 (root)' desktop is localhost.localdomain:2

Starting applications specified in /root/.vnc/xstartup
Log file is /root/.vnc/localhost.localdomain:2.log
察看日志显示

代码: 全选

Sun Sep 28 16:58:29 2008
 vncext:      VNC extension running!
 vncext:      Listening for VNC connections on port 5902
 vncext:      Listening for HTTP connections on port 5802
 vncext:      created VNC server for screen 0
Could not init font path element /usr/share/X11/fonts/OTF, removing from list!
Could not init font path element /usr/share/X11/fonts/CID/, removing from list!
我用netstat的结果

代码: 全选

[root@localhost .vnc]# netstat -tulnp|grep vnc
tcp        0      0 0.0.0.0:5801                0.0.0.0:*                   LISTEN      20043/Xvnc          
tcp        0      0 0.0.0.0:5802                0.0.0.0:*                   LISTEN      20460/Xvnc          
tcp        0      0 0.0.0.0:5803                0.0.0.0:*                   LISTEN      19421/Xvnc          
tcp        0      0 0.0.0.0:5901                0.0.0.0:*                   LISTEN      20043/Xvnc          
tcp        0      0 0.0.0.0:5902                0.0.0.0:*                   LISTEN      20460/Xvnc          
tcp        0      0 0.0.0.0:5903                0.0.0.0:*                   LISTEN      19421/Xvnc          
tcp        0      0 0.0.0.0:6001                0.0.0.0:*                   LISTEN      20043/Xvnc          
tcp        0      0 0.0.0.0:6002                0.0.0.0:*                   LISTEN      20460/Xvnc          
tcp        0      0 0.0.0.0:6003                0.0.0.0:*                   LISTEN      19421/Xvnc          
tcp        0      0 :::6001                     :::*                        LISTEN      20043/Xvnc          
tcp        0      0 :::6002                     :::*                        LISTEN      20460/Xvnc          
tcp        0      0 :::6003                     :::*                        LISTEN      19421/Xvnc          
udp        0      0 0.0.0.0:42705               0.0.0.0:*                               20043/Xvnc     
我使用windows下面的Xmanager连接的!我的桌面环境是GNOME,XDMCP已经打开了!ubuntu连接xp是那么的轻松可是反过来为什么就这么麻烦了 :em20
kingsin
帖子: 21
注册时间: 2007-09-01 5:09
送出感谢: 0
接收感谢: 0

Re: Vnc的问题,Xmanager无法连接!

#4

帖子 kingsin » 2008-09-28 17:45

我重启了一下机器,还是报错!

代码: 全选

[root@localhost .vnc]# tail -f localhost.localdomain\:1.log 

** (nautilus:3175): WARNING **: Can not get _NET_WORKAREA

** (nautilus:3175): WARNING **: Can not determine workarea, guessing at layout
GTK Panel of SCIM 1.4.4

Starting SCIM as daemon ...
SCIM has been successfully launched.
Smart Common Input Method 1.4.4


** (eggcups:3263): WARNING **: IPP request failed with status 1030

** (eggcups:3263): WARNING **: IPP request failed with status 1030

** (nm-applet:3277): WARNING **: <WARNING>       nma_dbus_init (): nma_dbus_init() could not acquire its service.  dbus_bus_acquire_service() says: 'Connection ":1.10" is not allowed to own the service "org.freedesktop.NetworkManagerInfo" due to security policies in the configuration file'

Introspect error: A security policy in place prevents this sender from sending this message to this recipient, see message bus configuration file (rejected message had interface "org.freedesktop.DBus.Introspectable" member "Introspect" error name "(unset)" destination "edu.duke.linux.yum")
Traceback (most recent call last):
  File "/usr/bin/puplet", line 467, in ?
    main()
  File "/usr/bin/puplet", line 464, in main
    p.run()
  File "/usr/bin/puplet", line 451, in run
    self._refreshInfo()
  File "/usr/bin/puplet", line 191, in _refreshInfo
    if self.updatesObject is not None and \
AttributeError: DBusException instance has no attribute '_dbus_error_name'

** (nm-applet:3277): WARNING **: <WARNING>       nma_dbus_init (): nma_dbus_init() could not acquire its service.  dbus_bus_acquire_service() says: 'Connection ":1.10" is not allowed to own the service "org.freedesktop.NetworkManagerInfo" due to security policies in the configuration file'


** (nm-applet:3277): WARNING **: <WARNING>       nma_dbus_init (): nma_dbus_init() could not acquire its service.  dbus_bus_acquire_service() says: 'Connection ":1.10" is not allowed to own the service "org.freedesktop.NetworkManagerInfo" due to security policies in the configuration file'
kingsin
帖子: 21
注册时间: 2007-09-01 5:09
送出感谢: 0
接收感谢: 0

Re: Vnc的问题,Xmanager无法连接!

#5

帖子 kingsin » 2008-09-30 11:30

难道就没有人用图形界面的远程方式了么,有些时候还是还是会遇到的。
kingsin
帖子: 21
注册时间: 2007-09-01 5:09
送出感谢: 0
接收感谢: 0

Re: Vnc的问题,Xmanager无法连接!

#6

帖子 kingsin » 2008-10-03 11:19

再顶一下!高人帮忙了!?
头像
windwiny
帖子: 2254
注册时间: 2007-03-13 17:26
送出感谢: 0
接收感谢: 1 次

Re: Vnc的问题,Xmanager无法连接!

#7

帖子 windwiny » 2008-10-03 22:40

New 'localhost.localdomain:2 (root)' desktop is localhost.localdomain:2

这就表示运行好几个实例了 0 1 2
端口里也能看出啊 5901 02 03 都开3个端口了

没用过 Xmanager ,, 直接用 vnc 的 vncviewer 连接 12.34.56.67:1 或 12.34.56.67:5901
kingsin
帖子: 21
注册时间: 2007-09-01 5:09
送出感谢: 0
接收感谢: 0

Re: Vnc的问题,Xmanager无法连接!

#8

帖子 kingsin » 2008-10-06 10:40

关键是那个报错?是什么意思?
头像
冲浪板
论坛版主
帖子: 7466
注册时间: 2007-05-06 8:19
送出感谢: 0
接收感谢: 5 次

Re: Vnc的问题,Xmanager无法连接!

#9

帖子 冲浪板 » 2008-10-06 10:50

kingsin 写了:好像跟您说的不一样阿!那个177端口是干什么用的?我按照您的说法重新启动vnc显示

代码: 全选

New 'localhost.localdomain:2 (root)' desktop is localhost.localdomain:2

Starting applications specified in /root/.vnc/xstartup
Log file is /root/.vnc/localhost.localdomain:2.log
察看日志显示

代码: 全选

Sun Sep 28 16:58:29 2008
 vncext:      VNC extension running!
 vncext:      Listening for VNC connections on port 5902
 vncext:      Listening for HTTP connections on port 5802
 vncext:      created VNC server for screen 0
Could not init font path element /usr/share/X11/fonts/OTF, removing from list!
Could not init font path element /usr/share/X11/fonts/CID/, removing from list!
我用netstat的结果

代码: 全选

[root@localhost .vnc]# netstat -tulnp|grep vnc
tcp        0      0 0.0.0.0:5801                0.0.0.0:*                   LISTEN      20043/Xvnc          
tcp        0      0 0.0.0.0:5802                0.0.0.0:*                   LISTEN      20460/Xvnc          
tcp        0      0 0.0.0.0:5803                0.0.0.0:*                   LISTEN      19421/Xvnc          
tcp        0      0 0.0.0.0:5901                0.0.0.0:*                   LISTEN      20043/Xvnc          
tcp        0      0 0.0.0.0:5902                0.0.0.0:*                   LISTEN      20460/Xvnc          
tcp        0      0 0.0.0.0:5903                0.0.0.0:*                   LISTEN      19421/Xvnc          
tcp        0      0 0.0.0.0:6001                0.0.0.0:*                   LISTEN      20043/Xvnc          
tcp        0      0 0.0.0.0:6002                0.0.0.0:*                   LISTEN      20460/Xvnc          
tcp        0      0 0.0.0.0:6003                0.0.0.0:*                   LISTEN      19421/Xvnc          
tcp        0      0 :::6001                     :::*                        LISTEN      20043/Xvnc          
tcp        0      0 :::6002                     :::*                        LISTEN      20460/Xvnc          
tcp        0      0 :::6003                     :::*                        LISTEN      19421/Xvnc          
udp        0      0 0.0.0.0:42705               0.0.0.0:*                               20043/Xvnc     
我使用windows下面的Xmanager连接的!我的桌面环境是GNOME,XDMCP已经打开了!ubuntu连接xp是那么的轻松可是反过来为什么就这么麻烦了 :em20
你干错了事;
要么用vnc,要么用Xmanager,不是一挡子事;
若用后者,可以先telnet,ssh也成啊,然后expoer DISPLAY=your_IP:0.0,
然后测试一个:
xcalc
看到没?
这个也可以,xcalc youe_ip:0.0
ssh -X了就简单(windows下可用putty),应该可以直接的xcalc
kingsin
帖子: 21
注册时间: 2007-09-01 5:09
送出感谢: 0
接收感谢: 0

Re: Vnc的问题,Xmanager无法连接!

#10

帖子 kingsin » 2008-10-06 10:55

关键是那个报错?是什么意思?
头像
冲浪板
论坛版主
帖子: 7466
注册时间: 2007-05-06 8:19
送出感谢: 0
接收感谢: 5 次

Re: Vnc的问题,Xmanager无法连接!

#11

帖子 冲浪板 » 2008-10-06 12:38

“我是按照上面的方法配制的!
......
结果在localhost.localdomain:1.log报错 Xmanager也无法连接!!!”

这中间有做了啥?
kingsin
帖子: 21
注册时间: 2007-09-01 5:09
送出感谢: 0
接收感谢: 0

Re: Vnc的问题,Xmanager无法连接!

#12

帖子 kingsin » 2008-10-13 14:58

之前,就是一个新系统么,安装了wordpress!这也没什么影响啊!
勒色
帖子: 2
注册时间: 2008-04-03 22:57
送出感谢: 0
接收感谢: 0

Re: Vnc的问题,Xmanager无法连接!

#13

帖子 勒色 » 2009-09-03 16:54

有可能是你密码错误。
回复

回到 “服务器基础应用”