红联Linux门户
Linux帮助

linux下VNC配置详解

发布时间:2008-09-06 00:58:46来源:红联作者:Xuehai
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
# .http://www.uk.research.att.com/vnc/sshvnc.html
# 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即可。
文章评论

共有 8 条评论

  1. D调漫步 于 2011-08-13 11:51:13发表:

    支持

  2. liusongguang 于 2011-08-09 12:21:38发表:

    支持一下,学习一下

  3. dengbao2001 于 2011-07-29 23:57:16发表:

    学习了,谢谢

  4. at_123 于 2011-07-11 22:31:05发表:

    在找这方面的资料,看看

  5. love35459 于 2010-07-10 18:06:25发表:

    fedora12 好像?有vncserver 的安?包

  6. xiazhouquan 于 2010-03-21 15:59:11发表:

    在找这方面的资料,看看

  7. 373061200 于 2009-03-04 13:20:21发表:

    linux远程登录windows如何设置

  8. zhuanghq114 于 2008-09-06 08:51:06发表:

    :0)1 顶