centos下安裝xfce+vnc

來源:互聯網
上載者:User

標籤:des   style   blog   http   color   os   io   使用   ar   

首先安裝案頭環境,我選擇的是xfce,輕量級案頭,小巧實用不佔太多記憶體,(佔用記憶體方面,xfce少於kde,kde少於gnome).

安裝xfce案頭
一開始我以為第三方的軟體源如rpmforge等應該會包含xfce案頭的,結果竟然木有包含,實在是有點兒意外。

根據系統版本開啟相應的連結:
CentOS 5 32位:http://download.fedoraproject.org/pub/epel/5/i386/
CentOS 5 64位:http://download.fedoraproject.org/pub/epel/5/x86_64/
CentOS 6 32位:http://download.fedoraproject.org/pub/epel/6/i386/
CentOS 6 64位:http://download.fedoraproject.org/pub/epel/6/x86_64/
尋找“epel”,應該會找到一個“epel-release-X-X.noarch.rpm”的軟體包。下載,安裝之。

[[email protected] ~]# yum groupinstall Xfce[[email protected] ~]# yum groupinstall Fonts    (可選安裝)

安裝VNCServer

[[email protected] ~]# yum install vnc-server  (適用CentOS 5)[[email protected] ~]# yum install tigervnc-server  (適用CentOS 6)

啟動vncserver

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

[[email protected] mnt]# vncserverYou will require a password to access your desktops.Password:Verify:New ‘centos6.xman.org:1 (root)‘ desktop is centos6.xman.org:1Creating default startup script /root/.vnc/xstartupStarting applications specified in /root/.vnc/xstartupLog file is /root/.vnc/centos6.xman.org:1.log

配置vncserver

殺掉vnc服務開始配置VNC

vncserver -kill :1

修改/etc/sysconfig/vncservers這個檔案

VNCSERVERS="1:root"VNCSERVERARGS[1]="-geometry 800x600"

解析度可更具自己的實際情況來調解,一般常用的1024x768(xp),1366x768(win7)

另外提醒注意一點,這個必須手動修改,如果直接使用vncserver啟動只有,不能添加開機啟動項。

如果想設定多個使用者,可以用如下格式:

VNCSERVERS="1:one 2:two 3:three"VNCSERVERARGS[1]="-geometry 800×600"VNCSERVERARGS[2]="-geometry 800×600"VNCSERVERARGS[3]="-geometry 800×600"

配置vnc案頭

修改/root/.vnc/xstartup這個檔案,把裡面的內容替換成如下:

#!/bin/sh/usr/bin/startxfce4

儲存以後,給xstartup加上執行許可權:

chmod +x ~/.vnc/xstartup

配置完之後,再啟動一下vncserver:

vncserver

啟動之後,用如下命令查看5901連接埠是否開啟:

netstat -lptn

這裡要注意,如果發現連接埠開啟了卻連不上,就要設定好防火牆規則,否則外面連不上 59xx連接埠.

然後設定vncserver開機自動啟動,輸入如下:

chkconfig vncserver on

centos下安裝firefox的方法:

yum install firefox

這樣案頭端就能夠通過vncviewer來訪問了,提醒一點vncviewer那裡伺服器位址是:IP:1

 

centos下安裝xfce+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.