Xmanager连接Gnome显示“XDMCP连接失败”解决方法

时间:2024-05-23 21:15:40

   
         我的centos系统是5.11版本,桌面是gnome,我用xmanager连接centos的时候老是出错,如下图所示:
 Xmanager连接Gnome显示“XDMCP连接失败”解决方法
查xmanager日志,看到如下错误信息:
Xdmcp: received an ACCEPT message.
Xdmcp: sent a MANAGE message.
Xdmcp: Timed out, state 8. Retransmissions: 0
Xdmcp: sent a MANAGE message.
Xdmcp: Timed out, state 8. Retransmissions: 1
Xdmcp: sent a MANAGE message.
Xdmcp: Timed out, state 8. Retransmissions: 2
Xdmcp: sent a MANAGE message.
Xdmcp: Timed out, state 8. Retransmissions: 3
MessageBox: Xmanager: XDMCP连接, XDMCP连接失败。是否要重试?
XDM go to sleep: too many retransmissions

在网上狂找解决方法,功夫不负有心人,最终在这个帖子里找到解决方法:
RESOLUTION
This problem is usually caused by one of the following reasons:
1,Firewall settings on PC, physical firewall, gateway or router.
2,Incorrect entry in the DNS.
3,Improper operation of display manager such as gdm, kdm or xdm.
Depending on the reason, try the following solutions:
1,Follow the instruction on the Xmanager FAQ and configure your firewall.

     How can I configure firewall settings in Windows?

2,Add your PC IP address in /etc/hosts as following:
     172.16.2.120 PC_NAME
3,Restart the display manager process. You can also try restarting the remote server.


我出错的原因是第二条,解决方法很简单,在/etc/hosts加上pc机(运行xmanager)的地址就行了,PC_NAME名字任意。
我分析具体的原因可能是我的centos5.11系统XDMCP连接只认/etc/hosts文件里指定的主机,不在里面的主机无权建立连接,所以在我加入PC IP地址前,XDMCP连接失败。
上一张连接成功的图:
 Xmanager连接Gnome显示“XDMCP连接失败”解决方法
最后提醒一下,把PC IP地址加入/etc/hosts文件,要过一分钟或两分钟,才能生效。