oracle linux 配置X manager 与VNC

oracle linux 配置X manager 与VNC
lovehuangxuan发布于 2009-9-24 |     (网友评论 1 条) 我要评论
今天在oracle linux上配置了一下X manager 和vnc,是第一次配置vnc,vnc配置要比X manager简单许多这里记录一下: ---- X manager 配置:
1.修改GDM的配置文件,/etc/X11/gdm/gdm.conf,将[xdmcp]中的enable选项设置为true


[table=95%,#f1f1f1][tr][td][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=true

[/td][/tr][/table]用vi编辑gdm.conf 进入后键入/xdmcp查找字符串xdmcp "n"是搜索下一句,这样就能快速的定位到xdmcp项
2.修改/etc/X11/xdm/xdm-config文件,将DisplayManager.requestPort: 0注释掉
[table=95%,#f1f1f1][tr][td]

! SECURITY: do not listen for XDMCP or Chooser requests
! Comment out this line if you want to manage X terminals with xdm
!DisplayManager.requestPort: 0

[/td][/tr][/table]3.修改/etc/X11/xdm/Xaccess文件 #* #any host can get a login window 去掉此行首位的#
[table=95%,#f1f1f1][tr][td]# right hand sides can match.
#

* #any host can get a login window

#
# To hardwire a specific terminal to a specific host, you can

[/td][/tr][/table]4. 如果有防火墙,请打开177的端口
ok!配置完后用X manager进入吧
----VNC 配置
1.检查rpm包是否安装
[table=95%,#f1f1f1][tr][td][oracle@niuge ~]$ rpm -qa|grep vnc
vnc-server-4.0-11.el4
vnc-4.0-11.el4

[/td][/tr][/table]只要有第一个vnc-server-4.0-11.el这个就足够,这是服务端运行程序。如未安装,请安装
2.安装好后运行 vncserver
[table=95%,#f1f1f1][tr][td][test@niuge ~]$ vncserver

You will require a password to access your desktops.

Password:
Verify:
xauth: creating new authority file /home/test/.Xauthority

New 'niuge:3 (test)' desktop is niuge:3

Creating default startup script /home/test/.vnc/xstartup
Starting applications specified in /home/test/.vnc/xstartup
Log file is /home/test/.vnc/niuge:3.log

[/td][/tr][/table]会提示你输入登录密码,同时会给你提示,记住这个":3" 这是你vnc客户端登录时候要用到的,我机器已经开启了2个,所以这个是:3
3.在windows机器上装好vnc客户端,装好后运行客户端,输入方式如下图所示



080115202946.jpg

点击OK后提示输入你刚才设置的密码。点击后就会进入



Click here to open new window

ok!是不是觉得命令行方式不爽,别着急,修改一下配置就可以进入windows模式
4.刚才在开启vncserver时候有如下提示:
[table=95%,#f1f1f1][tr][td]Creating default startup script /home/test/.vnc/xstartup
Starting applications specified in /home/test/.vnc/xstartup
Log file is /home/test/.vnc/niuge:3.log

[/td][/tr][/table]我们来看看xstartup内容:
[table=95%,#f1f1f1][tr][td]#!/bin/sh

# Uncomment the following two lines for normal desktop:
# unset SESSION_MANAGER
# exec /etc/X11/xinit/xinitrc

[ -x /etc/vnc/xstartup ] && exec /etc/vnc/xstartup
[ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources
xsetroot -solid grey
vncconfig -iconic &
xterm -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" &
twm &

[/td][/tr][/table]ok!看说明很容易就知道如何正常进入desktop了
[table=95%,#f1f1f1][tr][td]# Uncomment the following two lines for normal desktop:
unset SESSION_MANAGER
exec /etc/X11/xinit/xinitrc

[/td][/tr][/table]修改后保存退出
先停止vncserver:
[table=95%,#f1f1f1][tr][td][test@niuge ~]$ vncserver -kill :3
Killing Xvnc process ID 30475
[test@niuge ~]$

[/td][/tr][/table]重启vncserver
[table=95%,#f1f1f1][tr][td][test@niuge ~]$ vncserver

New 'niuge:3 (test)' desktop is niuge:3

Starting applications specified in /home/test/.vnc/xstartup
Log file is /home/test/.vnc/niuge:3.log

[/td][/tr][/table]OK!让我们重复上边的步骤重新登录vnc



Click here to open new window

熟悉的画面出现了。
icon_ad.gif与30万Linux爱好者讨论问题!

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/12035968/viewspace-617161/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/12035968/viewspace-617161/

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值