windows操作系统环境: windows server 2003 sp2
linux操作系统环境:CentOS_5.4
目前通过图形化远程连接 linux操作系统有多种方案可以选择:1. VNC 2. Xmanger.
这里我采用Xmanger 方式。
首先 在linux系统上开启和配置 Xmanger服务配置。
Xmanager 官方给出的FAQ
For XDMCP connection to Red Hat 5 EL
1. XDM Configuration
1. Change runlevel to 5Open/etc/inittab and set the initial runlevel to 5 as following:
id:5:initdefault:2. Enable XDMCP
For GDM:
Open /etc/gdm/custom.conf and set the Enable entry to 1 in the [xdmcp] section as following.
[xdmcp]
Enable=1For KDM:
Open /usr/share/config/kdm/Xaccess and remove the initial "#" character for the following line:
#* #any host can get a login window ==>
* #any host can get a login window
Open /usr/share/config/kdm/kdmrc and set the Enable entry to true in the [xdmcp] section as following.
[xdmcp]
Enable=true2. Firewall (TCP/UDP Ports) Configuration
Open UDP port 177 from the PC to the remote host direction.
Open incoming TCP ports 6000~6010 from the remote host to your PC.
3. Reboot the remote host and start Xmanager
# init 3; init 5
在CentOS 5.4 中查找发现并没有/usr/share/config/kdm/Xaccess这个项,郁闷。但是 官方文件中提到:Refer to the comments in the /usr/share/gdm/defaults.conf file for information about each option.这样一句话。
于是在 /usr/share/gdm/defaults.conf找到了 Xmanger 配置
具体设置:
1. [security] 中找到 DisallowTCP=true 改成 False
2. [xdmcp] 中找到 Enable=Flase 改成 true
3. [xdmcp] 中找到 #Port=177 去掉前面的 # ,改完保存时如果提示只读,用 更改文件属性改为读写或使用WQ! 强制保存.
4. 因为安装系统的时候没有设置防火墙,所以不用设置打开177端口.如果linux系统安装的时候有配置防火墙,就需要设置 iptables防火墙列表 开启 177 UDP 端口(Xmanage 通信)
具体在 /etc/sysconfig/iptables 加入
-A RH-Firewall -l -INPUT -m state --state NEW -m udp -p udp --dport 177 -j ACCEPT
5. 做完以后记得 reboot 让刚才的更改生效.
第二部分 在 windows 操作系统下载 安装 Xmanger 软件。