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
# <URL:[url]http://www.uk.research.att.com/vnc/sshvnc.html[/url]>.
# 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即可。
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章