CentOS 5.5 下安裝 VNC Server

來源:互聯網
上載者:User

 

1.安裝所需的組件

伺服器的組件名叫 vnc-server。請執行 rpm -q vnc-server 這個指令。

它的輸出應該是 package vnc-server is not installed 或類似 vnc-server-4.0-11.el4。

假如伺服器未被安裝,請用這個指令來安裝它:yum install vnc-server。

 

 

2.設定使用者的 VNC 口令

執行vncpasswd,輸入並確認密碼

 

 

3./etc/sysconfig/vncservers

VNCSERVERS="1:root 2:root 3:root"

VNCSERVERARGS[1]="-geometry 640x480"

VNCSERVERARGS[2]="-geometry 800x600"

VNCSERVERARGS[3]="-geometry 1024x768"

 

三個root,不同的解析度,當然可以設定不能的使用者

 

 

4.建立 xstartup 指令碼,啟動vncserver,再停

service vncserver start

service vncserver stop

vncserver :1

vncserver -kill :1

 

 

5.編輯 xstartup

cd .vnc

vi 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 & #text

gnome-session & #gnome

#startkde & #kde

 

 

6.重啟vncserver

service vncserver start

chkconfig on

 

 

7.使用vncviewer輸入ip:1,輸入vnc密碼成功進入

done

 

 

中文wiki有更詳細的配置:

http://wiki.centos.org/zh/HowTos/VNC-Server

相關文章

聯繫我們

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