close

先檢查 vnc vnc-server有沒有安裝

#rpm-qa vnc vnc-server

若未安裝

#yum -y intall vnc vnc-server

安裝完畢修改設定檔

#vi /etc/sysconfig/vncserver

將最下面兩行複製

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

VNCSERVERS="5:username"                                                //新增此行5代表port:5900+5
VNCSERVERARGS[1]="-geometry 1024x768 -nolisten tcp -nohttpd " //指定屆時連接到 Xwindows 的解析度

設定VNC 連線密碼

#vncpasswd

passwd:xxxx
verify:xxxx

啟動vncserver

#/sbin/chkconfig --level  345 vncserver on       //在runlevel 345啟動
#/etc/rc.d/init.d/vscserver start

修改X-win設定檔

#vi ~/.vnc/xstartup

# Uncomment the following two lines for normal desktop:
# unset SESSION_MANAGER                    //將此行 mark 拿掉
# exec /etc/X11/xinit/xinitrc                    //將此行 mark 拿掉
其他全部mark起來

 

重新啟動vnc

#/etc/rc.d/init.d/vncserver restart


arrow
arrow
    全站熱搜

    alson 發表在 痞客邦 留言(1) 人氣()