Chinaunix首页 | 论坛 | 博客
  • 博客访问: 86247
  • 博文数量: 31
  • 博客积分: 2010
  • 博客等级: 大尉
  • 技术积分: 370
  • 用 户 组: 普通用户
  • 注册时间: 2008-06-26 13:33
文章分类

全部博文(31)

文章存档

2009年(5)

2008年(26)

我的朋友

分类: LINUX

2008-07-30 13:29:46

RHEL4U5 VNC配置方法,其他版本下配置相同
以root用户登陆系统
步骤1:
查看是否安装vnc软件包
# rpm -qa | grep vnc
vnc-server-4.0-11.el4
步骤2:
# vncserver  (输入该命令)
You will require a password to access your desktops.
Password:
输入vncserver 系统将提示输入密码,该密码是VNC链接桌面时时的密码,需要输入2次。 系统给出如下提示
xauth:  creating new authority file /root/.Xauthority
New 'localhost.localdomain:1 (root)' desktop is localhost.localdomain:1
Creating default startup script /root/.vnc/xstartup
Starting applications specified in /root/.vnc/xstartup
Log file is /root/.vnc/localhost.localdomain:1.log

步骤3:
修改启动脚本/root/.vnc/xstartup,内容如下
#!/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 &
gnome-session &  或者是 startkde &

步骤4:
将 # VNCSERVERS="1:myusername" 修改为 VNCSERVERS="1:root"  (其中1表示进程号,root表示使用哪个帐户来登陆)

步骤5:
service vncserver restart 重新VNC服务

步骤6:
测试VNC链接,在浏览器中输入如下地址

此时弹出VNC浏览器,点击OK后输入密码即可登陆
其他链接方法,打开VNC客户端,输入IP:1 也可以登陆
 
注意:防火墙上要打开5801和5901两个端口
阅读(510) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~