ubuntu xdmcp配置(转)

来源:互联网 发布:怎么把mysql删除干净 编辑:程序博客网 时间:2024/05/19 02:20

http://hi.baidu.com/zerodayz/blog/item/1e9eee51ce3a2765843524cc.html

xdmcp(X Display Manager Control Protocol)则直接可以图形终端方式登录。

服务器端设置

以 ubuntu(gnome) 为例

系统 登录窗口 远程 与本地相同

系统 登录窗口 常规 反选 Disable multiple logins for a single user(否则远程登录会踢掉本机的同名登录用户,这和远程登录到 windows 的情况类似)

sudo gedit /etc/gdm/gdm.conf

修改GDM配置文件

# The greeter for xdmcp logins, usually you want a less graphically intensive

# greeter here so it’s better to leave this with gdmlogin

#RemoteGreeter=/usr/lib/gdm/gdmlogin

去掉 # 注释

[xdmcp]

# Distributions: Ship with this off. It is never a safe thing to leave out on

# the net. Setting up /etc/hosts.allow and /etc/hosts.deny to only allow local

# access is another alternative but not the safest. Firewalling port 177 is

# the safest if you wish to have xdmcp on. Read the manual for more notes on

# the security of XDMCP.

Enable=false

改为 true

重新启动 ubuntu 即可。(建议:重启sudo reboot,不建议sudo gdm restart这样gdm并未生效)

客户端操作

客户端也是 ubuntu。在登录界面 选项 通过 XDMCP 远程登录。或者在终端命令行输入

X :1 -query 192.168.100.xxx

登录 192.168.100.xxx。也可以

X :1 -broadcast

随便登录第一台响应的 xdmcp 服务器。更多 X 命令参考此文

注意事项:

在防火墙软件中打开 TCP 6000 UDP 177

修改sudo vi /etc/inittab增加一行id:5:initdefault:表示系统将自己运行在多用户级别5的模式下;

windows 远程登录 ubuntu 图形界面可以用 X-Win32(一个月免费试用)或者Exceed(商业软件)

修改 /etc/X11/XServers ,加入下面几行取得4个xdm 登录(X Display

Manager)或者

gdm(GNOME X display manager)

进程,可以允许四个不同用户登录,当然你可以允许更多

用户 .

:0 A local /usr/X11R6/bin/X :0

:1 B local /usr/X11R6/bin/X :1

:2 C local /usr/X11R6/bin/X :2

:3 D local /usr/X11R6/bin/X :3

如果连接的host是windows,可以用cygwin/X这个软件,编辑一下 cygwinusrX11R6 instartxdmcp.bat脚本,将

SET REMOTE_HOST=XXX.XXX.XXX.XXX

这一行配成远程的OpenBSD主机IP, 然后运行startxdmcp.bat脚本就可以看到远程的X windows桌面登录窗口。

# Cygwin is a Linux-like environment for Windows. It consists of two parts: A DLL (cygwin1.dll) which acts as a Linux API emulation layer providing substantial Linux API functionality.

# A collection of tools which provide Linux look and feel.

针对KDM,编辑/usr/share/config/kdm/kdmrc (Dingjun Jia:在suse 9.0下,这个文件位于/etc/opt/kde3/share/config/kdm/kdmrc)

代码:

[Xdmcp]

Enable=true

 

ubuntu 为xmanager 配置xdmcp

编辑/etc/kde3/kdm/kdmrc文件
找到[xdmcp]节点
将Enable设置为true
也许你的默认就已经开了吧。

然后编辑/etc/kde3/kdm/Xaccess文件
在最后面加入 * 号,这表示所有主机都可以连接