现在的位置: 首页 > 综合 > 正文

Windows下通过xmanager远程桌面控制Linux

2013年12月12日 ⁄ 综合 ⁄ 共 1200字 ⁄ 字号 评论关闭
实验环境:
Linux机:RHEL 3;IP:10.1.8.176
Windows机:Windows Server 2003 Standard Edition;Xmanager 2.0;IP:10.1.8.201;

步骤如下:

一、Linux 机配置

1. 修改/etc/X11/xdm/Xaccess文件,找到下面的语句:
#* #any host can get a login window
去掉最前面的#号,成为:
* #any host can get a login window

2. 修改/etc/X11/gdm/gdm.conf文件,找到下面的语句:
[xdmcp]
# Distributions: Ship with this off. It is never a safe thing to leave
# out on the net. Alternatively you can set up /etc/hosts.allow and
# /etc/hosts.deny to only allow say local access.
Enable=false
将其中的Enable=false 改为Enable=true
配置端口为177:
# The port. 177 is the standard port so better keep it that way
Port=177

3. 修改/etc/inittab文件,
将 id:3:initdefault: 改为 id:5:initdefault:;将 x:5:respawn:/etc/X11/prefdm -nodaemon 改为 x:5:respawn:/usr/bin/gdm

4. 修改/etc/X11/xdm/xdm-config的最后一行,在 displayManager.requestPort:0 前面加上一个!号

5. 确保/etc/X11/xdm/Xservers的属性为444,/etc/X11/xdm/Xsetup_0的属性为755(这两个文件默认的属性就是444和775)

6. /sbin/iptables -A INPUT -p udp -s 0/0 -d 0/0 --dport 177 -j ACCEPT

7. 设置登录用户的.bash_profile,添加环境变量设置:DISPLAY=10.1.8.201:0.0; export DISPLAY

8. 重启 reboot

二、Windows 机配置

1. 安装 Xmanager 2.0 

2. 运行 Xbrowser,New Session Wizard -> 选XDMCP -> Method 选 Query,Host 填写 10.1.8.176,Port Number 填写 177 -> X server 设置都用缺省 -> Session Name 填写会话名字,自己定义(我这里习惯用ip)-> 完成

三、验证

在 Xbrowser 运行上一步定义的 session,选则Windows机IP 10.1.8.201,出现Linux桌面登录画面,输入用户名/密码,进入Linux桌面。

这里只列出步骤,没做解释,详细请参考这里 

抱歉!评论已关闭.