Chinaunix首页 | 论坛 | 博客
  • 博客访问: 468014
  • 博文数量: 66
  • 博客积分: 2125
  • 博客等级: 大尉
  • 技术积分: 704
  • 用 户 组: 普通用户
  • 注册时间: 2005-03-08 13:42
个人简介

空气中的尘埃

文章分类

全部博文(66)

文章存档

2019年(1)

2017年(4)

2016年(2)

2015年(4)

2014年(4)

2013年(2)

2012年(5)

2011年(6)

2010年(9)

2009年(8)

2008年(12)

2007年(6)

2006年(2)

2005年(1)

我的朋友

分类: LINUX

2012-07-25 10:16:37

1、检查包是否安装

[root@linuxserver1 /]# rpm -q vnc-server vnc
vnc-server-4.1.2-14.el5_3.1
vnc-4.1.2-14.el5_3.1

2、vi /etc/gdm/custom.conf

最后[servers] 后改为

[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
0=VNC

[server-VNC]
name=VNC Server
command=/usr/bin/Xvnc -SecurityTypes None -geometry 1024x768 -depth 16 \
-BlacklistTimeout 0
flexible=true

redhat 执行,Centos 则不需要

cp /etc/gdm/custom.conf  /etc/gdm/gdm.conf

3、vi /etc/sysconfig/vncservers

最后段修改为。

# VNCSERVERS="2:myusername"
# VNCSERVERARGS[2]="-geometry 800x600 -nolisten tcp -nohttpd -localhost"

# VNCSERVERS="1:root 2:oracle" 
VNCSERVERS="1:root"
#VNCSERVERARGS[2]="-geometry 1024x768 -nolisten tcp -nohttpd -localhoSt"
VNCSERVERARGS[2]="-geometry 1024x768 -nolisten tcp -nohttpd -localhost"

4、需要vncserver 远程的用户执行

vncserver

设置密码,并生成相应文件

 

如需启动gnome 桌面,修改用户主目录中的xstartup

去掉绿色行的注释

vi /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 &
~

5、使用vncserver 连接 192.168.0.220:1 输入密码即可连接

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