Win7 VNC 客戶端連接RedHat Linux AS 5.8的配置

轉載請註明出處:http://blog.csdn.net/guoyjoe/article/details/20647553

1、配置安裝VNC

[root@guodb2 Disk1]# yum install vnc*


2、設VNC密碼
[root@guodb2 Disk1]# vncserver


You will require a password to access your desktops.


Password:
Verify:


New 'guodb2:1 (root)' desktop is guodb2:1


Creating default startup script /root/.vnc/xstartup
Starting applications specified in /root/.vnc/xstartup
Log file is /root/.vnc/guodb2:1.log


3、重新啓動VNC服務
[root@guodb2 Disk1]# service vncserver stop
Shutting down VNC server:                                  [  OK  ]
[root@guodb2 Disk1]# service vncserver start
Starting VNC server: no displays configured                [  OK  ]

4、登錄報錯如下



5、查VNC端口
[root@guodb2 Disk1]# netstat -tupln |grep vnc
tcp        0      0 0.0.0.0:6001                0.0.0.0:*                   LISTEN      9748/Xvnc           
tcp        0      0 0.0.0.0:5801                0.0.0.0:*                   LISTEN      9748/Xvnc           

tcp        0      0 0.0.0.0:5901                0.0.0.0:*                   LISTEN      9748/Xvnc    

    

6、從上面可以看出0號端號被佔用了,用1號端號登錄



7、正常登錄VNC,但圖形界面顯示如下 



8、修改VNC配置文件,註釋原來的兩行,添加最後兩行
[root@guodb2 Disk1]# vi /etc/sysconfig/vncservers
# VNCSERVERS="2:myusername"
# VNCSERVERARGS[2]="-geometry 800x600 -nolisten tcp -nohttpd -localhost"

 VNCSERVERS="1:root"
 VNCSERVERARGS[1]="-geometry 1400x750 -nolisten tcp "


9、修改圖形界面,全部註釋掉,添加最後一行
[root@guodb1 yum.repos.d]# 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 &
gnome-session &


10、重啓VNC服務
[root@guodb2 Disk1]# service vncserver stop
Shutting down VNC server: 1:root                           [  OK  ]
[root@guodb2 Disk1]# service vncserver start
Starting VNC server: 1:root xauth:  creating new authority file /root/.Xauthority


New 'guodb2:1 (root)' desktop is guodb2:1


Starting applications specified in /root/.vnc/xstartup
Log file is /root/.vnc/guodb2:1.log


                                                           [  OK  ]


11、正常登錄,並正常顯示圖形界面





發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章