Windows下VNCViewer遠端連線Linux案頭

來源:互聯網
上載者:User

Windows下VNCViewer遠端連線Linux案頭

一:伺服器端(Centos6.5)

1:安裝案頭:

# yum groupinstall "GNOME Desktop Environment"(CentOS 5.x安裝GNOME案頭環境)

# yum groupinstall "X Window System""Desktop"(CentOS 6.x安裝GNOME案頭環境)

2:安裝vncserver

(1) 檢查是否已經安裝了VNCServer

[java]view plaincopyprint?
  1. [root@centos6~]#rpm-qa|grepvnc
  2. tigervnc-1.0.90-0.17.20110314svn4359.el6.i686
  3. gtk-vnc-0.3.10-3.el6.i686
  4. tigervnc-server-1.0.90-0.17.20110314svn4359.el6.i686
  5. gtk-vnc-python-0.3.10-3.el6.i686
[java]view plaincopyprint?
  1. <spanstyle="font-family:Arial,Helvetica,sans-serif;background-color:rgb(255,255,255);">如果上面的幾個rpm包已經存在,說明VNCserver已經安裝好了,接下來跳轉步驟(3)啟動vncserver就可以了,否則執行步驟(2)</span>

(2) 安裝vncServer

[java]view plaincopyprint?
  1. #yuminstalltigervnc
  2. #yuminstalltigervnc-server

(3)啟動vncserver

第一次啟動vncserver需要輸入密碼兩次

[java]view plaincopyprint?
  1. [root@centos6mnt]#vncserver
  2. Youwillrequireapasswordtoaccessyourdesktops.
  3. Password:
  4. Verify:
  5. New'centos6.xman.org:1(root)'desktopiscentos6.xman.org:1
  6. Creatingdefaultstartupscript/root/.vnc/xstartup
  7. Startingapplicationsspecifiedin/root/.vnc/xstartup
  8. Logfileis/root/.vnc/centos6.xman.org:1.log

注意:

# /etc/init.d/vncserver restart

註:有時候上面的命令啟動會報錯,直接運行就可以:

# vncserver

註:關閉具體的vncserver命令:vncserver -kill :1vncserver -kill :2

(4) 設定遠程登陸到gnome案頭的配置:

# vim /etc/sysconfig/vncservers(SUSE企業版不用配置此檔案)

再最後面加入如下兩行:

VNCSERVERS="1:root"

VNCSERVERARGS[1]="-geometry 1024x768 -alwaysshared-depth 24"

注意:如果windows串連的時候出現黑屏(在ip地址和連接埠沒有輸出錯誤的情況下),可將這裡的解析度改為800x600.

(5)防火牆的設定

不設定防火牆串連的時候有可能會被阻止,這是可以選擇關閉防火牆或者將VNC的伺服器連接埠號碼加入到防火牆的信任清單中:

關閉防火牆:service iptables stop

或者:將VNC server添加到linux的防火牆信任清單中

[java]view plaincopyprint?
  1. [root@centos6u2~]#vim/etc/sysconfig/iptables
  2. #thenaddbelowlinetothisfile
  3. -AINPUT-mstate--stateNEW-mtcp-ptcp--dport5900:5910-jACCEPT
  4. #restartiptables
  5. [root@centos6u2~]#serviceiptablesrestart

防火牆的其它操作可見:http://blog.csdn.net/jemlee2002/article/details/7042991

二:用戶端(windows)

接下來可以在網上下載http://vnc-pe.softonic.cn/vncviewer進行安裝。開啟輸入ip地址和連接埠號碼。這裡的連接埠號碼我也沒有弄清楚,我這裡輸入的是1,你可以試試2 或者5901或者5902,具體我沒有研究,有明白的也可以告訴我。

參考文獻:1:http://www.cnblogs.com/wise-man/archive/2012/07/23/2604023.htmlCentOS 6安裝和配置VNC

2: http://www.ha97.com/4634.html#comment-322709 CentOSLinux下VNC Server遠端桌面配置詳解

3:http://blog.sina.com.cn/s/blog_6e0c0fdf010198pl.html TightVNC Windows下遠端連線Linux案頭

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.