Changes between Version 2 and Version 3 of Xen_Lab8


Ignore:
Timestamp:
Oct 8, 2009, 5:06:36 AM (15 years ago)
Author:
rider
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Xen_Lab8

    v2 v3  
    194194----
    195195= 【Step 5: 在 DomU(Guest) 上安裝輕量級桌面環境(LXDE)】 =
    196 rider@client:~$ sudo su [[BR]]
    197 '''# 加入 LXDE 的 source.''' [[BR]]
    198 root@client:/home/rider# echo "deb !http://ppa.launchpad.net/lxde/ubuntu hardy main" >> /etc/apt/sources.list [[BR]]
    199 root@client:/home/rider# echo "deb-src !http://ppa.launchpad.net/lxde/ubuntu hardy main" >> /etc/apt/sources.list [[BR]]
    200 root@client:/home/rider# exit [[BR]]
    201 '''# 安裝 LXDE .''' [[BR]]
    202 rider@client:~$ sudo apt-get install lxde openbox-themes gnome-settings-daemon gnome-settings-daemon-dev gnome-icon-theme [[BR]]
    203 '''# 預設 LXDE 為VNC桌面環境 .''' [[BR]]
    204 rider@client:~$ echo "startlxde &" >> .vnc/xstartup [[BR]]
    205 '''# 基本桌面環境.''' [[BR]]
    206 {{{
     196 * 切換身份為 Super user.
     197{{{
     198$ sudo su
     199}}}
     200 * 加入 LXDE 的 source.
     201{{{
     202$ echo "deb !http://ppa.launchpad.net/lxde/ubuntu hardy main" >> /etc/apt/sources.list
     203$ echo "deb-src !http://ppa.launchpad.net/lxde/ubuntu hardy main" >> /etc/apt/sources.list
     204$ exit
     205}}}
     206 * 安裝 LXDE.
     207{{{
     208$ sudo apt-get install lxde openbox-themes gnome-settings-daemon gnome-settings-daemon-dev gnome-icon-theme
     209}}}
     210 * 預設 LXDE 為VNC桌面環境.
     211{{{
     212$ echo "startlxde &" >> .vnc/xstartup
     213}}}
     214 * 基本桌面環境.
     215{{{
     216#!sh
    207217# Desgin for lightweight X support
    208218
     
    212222----
    213223= 【Step 6: VMGL 使用說明: 在Dom0 上的設定】 =
    214 '''# 將 X-Windows 桌面 export 出來.''' [[BR]]
    215 rider@cloud:~$ export DISPLAY=:0 [[BR]]
    216 '''# 啟動 VLGL stub-daemon.''' [[BR]]
    217 rider@cloud:~$ stub-daemon [[BR]]
    218 '''# 檢查 stub-daemon 所對應的 port(7000) 有無開啟.''' [[BR]]
    219 rider@cloud:~$ netstat -tunlp [[BR]]
    220 
    221 {{{
     224 * 將 X-Windows 桌面 export 出來.
     225{{{
     226$ export DISPLAY=:0
     227}}}
     228 * 啟動 VLGL stub-daemon.
     229{{{
     230rider@cloud:~$ stub-daemon
     231}}}
     232 * 檢查 stub-daemon 所對應的 port(7000) 有無開啟.
     233{{{
     234$ netstat -tunlp
     235}}}
     236{{{
     237#!sh
    222238Active Internet connections (only servers)
    223239Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name
     
    231247----
    232248= 【Step 7: VMGL 使用說明: 在DomU 上的設定】 =
    233 '''# 設定 DomU 上的字型路徑對應.''' [[BR]]
    234 rider@guest:~$ sudo ln -sf /usr/share/fonts/X11/ /usr/X11R6/lib/X11/fonts (if necessary - fix font path) [[BR]]
    235 {{{
     249 * 設定 DomU 上的字型路徑對應.
     250{{{
     251$ sudo ln -sf /usr/share/fonts/X11/ /usr/X11R6/lib/X11/fonts (if necessary - fix font path)
     252}}}
     253{{{
     254#!sh
    236255# FontPath:
    237256
     
    240259/usr/share/fonts/X11
    241260}}}
    242 '''# 確認 rgb 存在於對應路徑.''' [[BR]]
    243 rider@guest:~$ less /usr/X11R6/lib/X11/rgb.txt (if necessary - rgb path confirmation) [[BR]]
    244 '''# 設定 DomU 上的 VMGL 環境變數.''' [[BR]]
    245 rider@guest:~$ sudo vim /etc/profile [[BR]]
    246 {{{
    247 GLSTUB=Cloud_IP(host_IP):7000
     261 * 確認 rgb 存在於對應路徑.
     262{{{
     263$ less /usr/X11R6/lib/X11/rgb.txt (if necessary - rgb path confirmation)
     264}}}
     265 * 設定 DomU 上的 VMGL 環境變數.
     266{{{
     267$ sudo vim /etc/profile
     268}}}
     269{{{
     270#!sh
     271GLSTUB=IP:7000
    248272LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib/vmgl
    249273LD_PRELOAD=/usr/local/lib/vmgl/libGL.so
    250274export GLSTUB LD_LIBRARY_PATH LD_PRELOAD
    251275}}}
    252 rider@guest:~$ source /etc/profile [[BR]]
    253 '''# 設定 DomU 上的 X forwarding.''' [[BR]]
    254 '''Using X forwarding''' [[BR]]
    255 rider@guest:~$ sudo vim /etc/ssh/sshd_config [[BR]]
    256 {{{
     276{{{
     277$ source /etc/profile
     278}}}
     279 * 設定 DomU 上的 X forwarding.
     280 * Using X forwarding.
     281{{{
     282$ sudo vim /etc/ssh/sshd_config
     283}}}
     284{{{
     285#!sh
    257286X11Forwarding yes
    258287}}}
    259 rider@guest:~$ sudo vim /etc/ssh/ssh_config [[BR]]
    260 {{{
     288{{{
     289$ sudo vim /etc/ssh/ssh_config
     290}}}
     291{{{
     292#!sh
    261293    ForwardX11 yes
    262294    ForwardX11Trusted yes
    263295}}}
    264 '''# 重新啟動 DomU 上的 SSH Service.''' [[BR]]
    265 rider@guest:~$ sudo /etc/init.d/ssh restart [[BR]]
    266 '''# 設定 VNC server 使用者密碼.''' [[BR]]
    267 rider@guest:~$ vncpasswd [[BR]]
    268 {{{
    269 ~$ vncserver
     296 * 重新啟動 DomU 上的 SSH Service.
     297{{{
     298$ sudo /etc/init.d/ssh restart
     299}}}
     300 * 設定 VNC server 使用者密碼.
     301{{{
     302$ vncpasswd
     303}}}
     304 * 啟動 VNC server.
     305{{{
     306$ vncserver
     307}}}
     308{{{
     309#!sh
    270310xauth:  creating new authority file /home/gtd/.Xauthority
    271311
     
    275315Starting applications specified in /home/gtd/.vnc/xstartup
    276316Log file is /home/gtd/.vnc/guest:1.log
    277 
    278 ~$ vncserver -kill :1
    279 }}}
    280 '''# 設定 VNC server 啟動參數.''' [[BR]]
    281 rider@guest:~$ vim .vnc/xstartup [[BR]]
    282 {{{
     317}}}
     318 * 關閉 VNC server.
     319{{{
     320$ vncserver -kill :1
     321}}}
     322 * 設定 VNC server 啟動參數.
     323{{{
     324$ vim .vnc/xstartup
     325}}}
     326{{{
     327#!sh
    283328# xrdb $HOME/.Xresources
    284329}}}
    285 '''# 開啟 DomU 上的第一台VNC Server.''' [[BR]]
    286 rider@guest:~$ vncserver -geometry 1024x768 -depth 24 :1 [[BR]]
    287 '''# 檢查 VNCserver 有無開啟對應之 port(5901開始).''' [[BR]]
    288 rider@guest:~$ netstat -tunlp [[BR]]
    289 {{{
     330 * 開啟 DomU 上的第一台VNC Server,並指定解析度為 1024 x 768.
     331{{{
     332$ vncserver -geometry 1024x768 -depth 24 :1
     333}}}
     334 * 檢查 VNCserver 有無開啟對應之 port(5901開始).
     335{{{
     336$ netstat -tunlp
     337}}}
     338{{{
     339#!sh
    290340(Not all processes could be identified, non-owned process info
    291341 will not be shown, you would have to be root to see it all.)
     
    301351}}}
    302352
    303 '''# 將 VNC Server:1 export 出來.''' [[BR]]
    304 rider@guest:~$ export DISPLAY=:1 [[BR]]
     353 * 將 VNC Server:1 export 出來.
     354{{{
     355$ export DISPLAY=:1
     356}}}
    305357----
    306358= 【Step 8: 在 Dom0 上 透過 X forwarding 登入 DomU 】 =
    307 '''# 使用 X forwarding 的方式登入 DomU.''' [[BR]]
    308 '''Using X forwarding''' [[BR]]
    309 rider@cloud:~$ ssh -X guest [[BR]]
    310 '''# 檢查 direct rendering 有無起來.''' [[BR]]
    311 rider@guest:~$ glxinfo [[BR]]
    312 {{{
     359 * 使用 X forwarding 的方式登入 DomU.
     360 * Using X forwarding.
     361{{{
     362$ ssh -X guest
     363}}}
     364 * 檢查 direct rendering 有無起來.
     365{{{
     366$ glxinfo
     367}}}
     368{{{
     369#!sh
    313370name of display: localhost:10.0
    314371display: localhost:10  screen: 0
     
    392449# Note: please do not run stub-daemon with "root"
    393450}}}
    394 '''# DomU 上的 glxgears 效能測試.''' [[BR]]
    395 rider@guest:~$ glxgears [[BR]]
    396 {{{
     451 * DomU 上的 glxgears 效能測試.
     452{{{
     453$ glxgears
     454}}}
     455{{{
     456#!sh
    39745747819 frames in 5.0 seconds = 9563.678 FPS
    39845846064 frames in 5.0 seconds = 9212.566 FPS
     
    402462}}}
    403463----
    404 = 【Step 9: 使用 VNC Viewer 登入 DomU 】 =
    405 '''# 透過 VNC Viewer(TurboVNC Viewer or Tightvnc viewer)登入 DomU 的 VNC Server,登入後便可以透過 rxvt 來下指令跑相關3D應用了.''' [[BR]]
    406 @ !ClientUser [[BR]]
    407 rider@PC:~$ vncviewer guest:1 [[BR]]
    408 '''# 檢查 direct rendering=yes?.''' [[BR]]
    409 @ VNC viewer 登入 :1 後 [[BR]]
    410 rider@guest:~$ glxinfo [[BR]]
    411 ----