Chinaunix首页 | 论坛 | 博客
  • 博客访问: 1193710
  • 博文数量: 116
  • 博客积分: 2889
  • 博客等级: 少校
  • 技术积分: 1337
  • 用 户 组: 普通用户
  • 注册时间: 2007-03-29 09:35
个人简介

IT运维工程师、律师 IT相关技术支持、法律咨询

文章分类

全部博文(116)

文章存档

2015年(1)

2014年(2)

2013年(5)

2012年(12)

2011年(4)

2010年(12)

2009年(21)

2008年(37)

2007年(22)

分类: LINUX

2007-10-17 11:36:02

 linux下VNC配置详解
2007-08-20 12:18:54
 标签:linux VNC配置 

1、VNC的启动/停止/重启
#service vncserver start/stop/restart
关闭具体的vncserver命令:vncserver -kill :1       vncserver -kill :2
 
2、设置密码
#vncpasswd
 
3、客户端登陆
在vnc客户端中输入:服务器端IP:1或服务器端IP:2
 
4、设置登陆到KDE桌面
a.
[root@centos ~]# vi /etc/sysconfig/vncservers
#
# Uncomment the line below to start a VNC server on display :1
# as my 'myusername' (adjust this to your own).  You will also
# need to set a VNC password; run 'man vncpasswd' to see how
# to do that.
#
# DO NOT RUN THIS SERVICE if your local area network is
# untrusted!  For a secure way of using VNC, see
# <>.
# VNCSERVERS="1:myusername"
VNCSERVERS="1:root"
# VNCSERVERARGS[1]="-geometry 800x600"
 VNCSERVERARGS[1]=”-geometry 800×600 -alwaysshared -depth 24″
-alwaysshared代表允许多用户同时登录 -depth代为色深,参数有8,16,24,32。
注:红色部分就是被修改或增加的部分
b.
[root@centos .vnc]$ 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" &
#gnome-session &   #set starting GNOME desktop
startkde &         #kde desktop
#twm &      #Text interface
注:红色部分就是被修改或增加的部分
c.
重启VNC即可。


设置VNCSERVER自动启动:
1。前题,已经配置发ROOT目录的下的.vnc/startup的配置。
2、编辑/etc/sysconfig/vncservers
添加以下:
VNCSERVERS="1:root"
VNCSERVERARGS[1]="-geometry 800x600":
3.在setup 中启动服务vnc

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