Chinaunix首页 | 论坛 | 博客
  • 博客访问: 255037
  • 博文数量: 71
  • 博客积分: 3044
  • 博客等级: 少校
  • 技术积分: 695
  • 用 户 组: 普通用户
  • 注册时间: 2010-10-16 11:06
文章分类

全部博文(71)

文章存档

2011年(30)

2010年(41)

分类: LINUX

2010-11-09 11:58:15

在网上找了一点东西,但是貌似和真的centos不一样,所以这里自己来测试着做做这个配置:

[root@localhost X11]# ls -l
总计 80
drwxr-xr-x 2 root root 4096 2009-03-10 applnk
drwxr-xr-x 2 root root 4096 10-15 01:58 fs
-rwxr-xr-x 1 root root  947 2009-09-29 prefdm
drwxr-xr-x 2 root root 4096 2009-03-10 serverconfig
drwxr-xr-x 2 root root 4096 2009-03-10 sysconfig
drwxr-xr-x 2 root root 4096 10-15 01:41 twm
drwxr-xr-x 5 root root 4096 10-15 01:45 xinit
-rw-r--r-- 1 root root  547 2008-05-24 Xmodmap
-rw-r--r-- 1 root root  564 10-15 02:06 xorg.conf
-rw-r--r-- 1 root root  492 2008-05-24 Xresources
这里没有/etc/X11/gdm/gdm.conf这个文件。所以whereis一下,但是貌似位置不一样
[root@localhost X11]# whereis gdm.conf
gdm: /usr/sbin/gdm /etc/gdm /usr/share/gdm /usr/share/man/man1/gdm.1.gz
于是进入到/etc/gdm中
[root@localhost X11]# cd /etc/gdm/
[root@localhost gdm]# ls
custom.conf  locale.alias  PostLogin    PreSession           XKeepsCrashing
Init         modules       PostSession  securitytokens.conf  Xsession
发现这里也没有gdm.conf,不过根据以往经验.conf就是这个程序的设置程序,这里有两个就不妨打开一个:
比如 :
[root@localhost gdm]# cat custom.conf
# GDM Configuration Customization file.
#
# This file is the appropriate place for specifying your customizations to the
# GDM configuration.   If you run gdmsetup, it will automatically edit this
# file for you and will cause the daemon and any running GDM GUI programs to
# automatically update with the new configuration.  Not all configuration
# options are supported by gdmsetup, so to modify some values it may be
# necessary to modify this file directly by hand.
#
# Older versions of GDM used the "gdm.conf" file for configuration.  If your
# system has an old gdm.conf file on the system, it will be used instead of
# this file - so changes made to this file will not take effect.  Consider
# migrating your configuration to this file and removing the gdm.conf file.
#
# To hand-edit this file, simply add or modify the key=value combination in
# the appropriate section in the template below.  Refer to the comments in the
# /usr/share/gdm/defaults.conf file for information about each option.  Also
# refer to the reference documentation.
#
# If you hand edit a GDM configuration file, you should run the following
# command to get the GDM daemon to notice the change.  Any running GDM GUI
# programs will also be notified to update with the new configuration.
#
# gdmflexiserver --command="UPDATE_CONFIG "
#
# e.g, the "Enable" key in the "[debug]" section would be "debug/Enable".
#
# You can also run gdm-restart or gdm-safe-restart to cause GDM to restart and
# re-read the new configuration settings.  You can also restart GDM by sending
# a HUP or USR1 signal to the daemon.  HUP behaves like gdm-restart and causes
# any user session started by GDM to exit immediately while USR1 behaves like
# gdm-safe-restart and will wait until all users log out before restarting GDM.
#
# For full reference documentation see the gnome help browser under
# GNOME|System category.  You can also find the docs in HTML form on
#
#
# NOTE: Lines that begin with "#" are considered comments.
#
# Have fun!

[daemon]

[security]

[xdmcp]

[gui]

[greeter]

[chooser]

[debug]

# Note that to disable servers defined in the defaults.conf file (such as
# 0=Standard, you must put a line in this file that says 0=inactive, as
# described in the Configuration section of the GDM documentation.
#
[servers]

# Also note, that if you redefine a [server-foo] section, then GDM will
# use the definition in this file, not the defaults.conf file.  It is
# currently not possible to disable a [server-foo] section defined
# in the defaults.conf file.

这下发现,这个文件就是我要的配置文件。先备份(备份操作很重要),再开始设置相应的选项:

编辑/etc/gdm/custom.conf,内容如下:

[daemon]

[security]
AllowRemoteRoot=true

[xdmcp]
Port=177

[gui]

[greeter]

[chooser]

[debug]

[servers]

然后重启桌面:gdm-restart

设置防火墙,在/etc/sysconfig/iptables文件中加入:

-A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 6000:6010 -j ACCEPT
-A RH-Firewall-1-INPUT -m state --state NEW -m udp -p udp --dport 177 -j ACCEPT

重启防火墙:service iptables restart

在windows中启动Xmanager,就可以看到CentOS了。


在中启动启动Xstart,按下列提示输入:
Name: Xterm
Host: 192.168.1.4
procotol: SSH (setup port 为22)
User: xuys
Password: xuys1234

Execution Command可以填写/usr/bin/gnome-session --display=$DISPLAY,也可以填写  /usr/bin/xterm -display $DISPLAY 前者主要打开一个X桌面,后者只是打开一个xterm.根据需要自行选择.

点击“Save”,保存。
点击“Run”运行Xmanager。



阅读(2783) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~