Chinaunix首页 | 论坛 | 博客
  • 博客访问: 6875061
  • 博文数量: 3857
  • 博客积分: 6409
  • 博客等级: 准将
  • 技术积分: 15948
  • 用 户 组: 普通用户
  • 注册时间: 2008-09-02 16:48
个人简介

迷彩 潜伏 隐蔽 伪装

文章分类

全部博文(3857)

文章存档

2017年(5)

2016年(63)

2015年(927)

2014年(677)

2013年(807)

2012年(1241)

2011年(67)

2010年(7)

2009年(36)

2008年(28)

分类:

2012-07-26 09:30:29

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 输入密码即可连接

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