CentOS 6.5 安裝和配置 VNC!!!

來源:互聯網
上載者:User

標籤:vnc

實驗環境

Server:CentOS 6.5 x86_64

Client: Windows 7

安裝和配置VNC
  1. 1.     [[email protected] ~]# yum install tigervnc-server  -y

  2. 2.     修改vnc主設定檔

[[email protected]~]# vim /etc/sysconfig/vncservers

找到最後兩行,去掉注釋,修改為

VNCSERVERS="1:root"  ###第一個遠端連線的賬戶為root

VNCSERVERARGS[1]="-geometry1200x900 "

###root遠程登入解析度為1200x900

  1. 3.     啟動vnc

[[email protected]~]# vncserver

Youwill require a password to access your desktops.

Password:    ###這裡輸入串連遠端桌面的密碼

Verify:       ###再次輸入密碼 

xauth:(stdin):1:  bad display name"gxh:1" in "add" command

New‘gxh:1 (root)‘ desktop is gxh:1

Creatingdefault startup script /root/.vnc/xstartup

Startingapplications specified in /root/.vnc/xstartup

Logfile is /root/.vnc/gxh:1.log

  1. 4.     修改xstartup檔案

[[email protected]~]# vim .vnc/xstartup

將最後兩行注釋掉,在最後一行添加如下:

#xterm-geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" &

#twm&

gnome-session&

  1. 5.     設定vncserver開機啟動

[[email protected]~]# chkconfig vncserver on

  1. 6.     設定防火牆

VNCserver 監聽的連接埠從 5900 開始,display:1 監聽 5901,display:2監聽 5902,以此類推。

[[email protected]~]# iptables -I INPUT -m state --state NEW -m tcp -p tcp --dport 5901 -j ACCEPT

[[email protected]~]# service iptables save

  1. 7.     VNC Server配置完成

用戶端
  1. 8.     安裝vnc用戶端

  1.9.     遠端連線vnc伺服器

650) this.width=650;" src="https://s4.51cto.com/wyfs02/M00/8C/D7/wKioL1h7RryyzC25AABTM0jHfjo753.png-wh_500x0-wm_3-wmp_4-s_3540894085.png" title="v.png" alt="wKioL1h7RryyzC25AABTM0jHfjo753.png-wh_50" />

擴充命令
  1. 10.  添加一個display

[[email protected] ~]# vncserver

xauth: (stdin):1:  bad display name "gxh:2" in"add" command

New ‘gxh:2 (root)‘ desktop is gxh:2

Starting applications specified in/root/.vnc/xstartup

Log file is /root/.vnc/gxh:2.log

  1. 11.  列出所有display

[[email protected] ~]# vncserver -list

TigerVNC server sessions:

X DISPLAY #  PROCESSID

:1        2403

:2        2998

  1. 12.  關閉一個display

[[email protected] ~]# vncserver -kill :2

Killing Xvnc process ID 2998

[[email protected] ~]# vncserver -list

TigerVNC server sessions:

X DISPLAY #  PROCESSID

:1        2403

  1. 13.  修改遠程登入密碼

[[email protected] ~]# vncpasswd

Password:

Verify:

VNC用戶端軟體推薦
  • VNC Viewer

  • TightVNC

  • RealVNC

  • TigerVNC

 


本文出自 “菜鳥行天下” 部落格,請務必保留此出處http://guoxh.blog.51cto.com/10976315/1892103

CentOS 6.5 安裝和配置 VNC!!!

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在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.