xdmcp

1. ipchains / iptables configuration, simply use > iptables -F
2. ssh, ping or others to check the remote host is online
3. let xdmcp open listen to port 177. edit /etc/X11/xdm/xdm-config and comment out 
        DisplayManager.requestPort:     0
        to
        ! DisplayManager.requestPort:     0
4. the host/ip allowed to access xdmcp. edit /etc/X11/xdm/Xaccess and modify 
        #*    # any host can get a login window
        to
        #*    # any host can get a login window
5. xdmcp start to work. edit /etc/X11/gdm/custom.conf and add line after [xdmcp]
        Enable=true
   looks like:
        [xdmcp]
        Enable=true       
   custom.conf is cofiguration of gdm in version 2.20.3. the configuration file
   of old gdm release is named by gdm.conf. see man gdm for more info
6. check /etc/X11/xdm/Xservers is set to 444 
   check /etc/X11/xdm/Xsetup_0 is set to 755
7. start gdm server at console.  > /usr/sbin/gdm
   if gdm is runing before configuration is modified, use this command to restart > /usr/sbin/gdm-restart

8. with Xming X Window Server , login linux free in ms windows . refer to here
 to learn more about Xming. otherwise XManager , a business software with
trial version, can be used to explore linux, too.


reference:
http://blog.chinaunix.net/u2/87597/showart_1897982.html
http://projects.gnome.org/gdm/docs/2.18/overview.html#xdmcp
http://www.faqs.org/docs/Linux-HOWTO/XDMCP-HOWTO.html#AEN46
### XDMCP服务配置与使用指南 XDMCP(X Display Manager Control Protocol)是一种用于管理X Window系统登录会话的协议,广泛用于Linux和Unix系统中。通过XDMCP,用户可以在本地机器上运行一个X服务器,并连接到远程主机的X显示管理器以进行图形化登录。以下是关于XDMCP服务的配置、使用指南以及常见问题解决方法。 #### XDMCP服务配置 1. **启用XDMCP服务** 在大多数Linux发行版中,XDMCP服务通常由`gdm`(GNOME Display Manager)或`xdm`(X Display Manager)提供。为了启用XDMCP,需要修改相应的配置文件。 - 对于使用`gdm`的系统(如Ubuntu),编辑`/etc/gdm3/daemon.conf`文件,确保包含以下内容: ```ini [xdmcp] Enable=true ``` 保存文件后,重启`gdm`服务: ```bash sudo systemctl restart gdm ``` - 对于使用`xdm`的系统(如某些旧版Debian或FreeBSD),编辑`/etc/X11/xdm/Xaccess`文件,取消注释以下行: ``` * #允许所有主机连接 ``` 同时,确保`/etc/X11/xdm/xdm-config`文件中包含: ``` DisplayManager.requestPort: 177 ``` 2. **配置防火墙** 确保系统防火墙允许UDP端口177(XDMCP)和TCP端口6000+(X11)的通信。例如,在`ufw`防火墙中执行以下命令: ```bash sudo ufw allow from 192.168.1.0/24 to any port 177 proto udp sudo ufw allow from 192.168.1.0/24 to any port 6000:6063 proto tcp ``` 3. **启动XDMCP服务** 确保XDMCP服务已启动并设置为开机自启。对于使用`systemd`的系统,可以使用以下命令: ```bash sudo systemctl enable gdm sudo systemctl start gdm ``` #### 使用XDMCP服务 1. **在本地运行X服务器** 在Windows系统上,可以使用Xmanager或MobaXterm等工具来连接XDMCP服务。例如,在Xmanager中,打开“Xmanager - Passive”模式,并确保X服务器处于监听状态。 2. **连接到远程XDMCP服务器** 在Xmanager或MobaXterm的会话配置中,选择“XDMCP”作为连接类型,并输入远程服务器的IP地址或主机名。启动连接后,远程服务器的登录界面将显示在本地X服务器上。 3. **使用X11转发** 如果通过SSH连接远程服务器并希望显示图形界面应用程序,可以启用X11转发功能。在SSH连接时添加`-X`或`-Y`参数: ```bash ssh -X user@remote_host ``` 确保SSH服务器配置文件`/etc/ssh/sshd_config`中包含以下设置: ``` X11Forwarding yes X11DisplayOffset 10 X11UseLocalhost yes ``` #### 常见问题及解决方法 1. **无法连接到XDMCP服务器** - 确认XDMCP服务已在远程服务器上启用,并且防火墙规则允许相关端口的通信。 - 检查网络连接是否正常,并尝试使用`ping`或`traceroute`诊断网络问题。 2. **XDMCP连接后显示空白屏幕或登录界面无法加载** - 确保远程服务器的X显示管理器(如`gdm`或`xdm`)正常运行。 - 检查X服务器的日志文件(如`/var/log/Xorg.0.log`)以获取错误信息。 3. **X11转发失败** - 确保SSH服务器和客户端的配置均启用了X11转发功能。 - 检查本地X服务器是否正在运行,并且环境变量`DISPLAY`已正确设置。 4. **中文乱码问题** - 在XDMCP连接或X11转发时,如果出现中文乱码,可以在远程服务器的`.bashrc`文件中添加以下行以设置UTF-8编码: ```bash export LANG=en_US.UTF-8 ``` 然后执行以下命令使更改生效: ```bash source ~/.bashrc ``` ###
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值