close
Warning:
Can't synchronize with repository "(default)" (Unsupported version control system "svn": /usr/lib/python2.7/dist-packages/libsvn/_repos.so: failed to map segment from shared object: Cannot allocate memory). Look in the Trac log for more information.
- Timestamp:
-
Oct 8, 2009, 5:06:36 AM (16 years ago)
- Author:
-
rider
- Comment:
-
--
Legend:
- Unmodified
- Added
- Removed
- Modified
-
|
v2
|
v3
|
|
| 194 | 194 | ---- |
| 195 | 195 | = 【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 |
| 207 | 217 | # Desgin for lightweight X support |
| 208 | 218 | |
| … |
… |
|
| 212 | 222 | ---- |
| 213 | 223 | = 【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 | {{{ |
| | 230 | rider@cloud:~$ stub-daemon |
| | 231 | }}} |
| | 232 | * 檢查 stub-daemon 所對應的 port(7000) 有無開啟. |
| | 233 | {{{ |
| | 234 | $ netstat -tunlp |
| | 235 | }}} |
| | 236 | {{{ |
| | 237 | #!sh |
| 222 | 238 | Active Internet connections (only servers) |
| 223 | 239 | Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name |
| … |
… |
|
| 231 | 247 | ---- |
| 232 | 248 | = 【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 |
| 236 | 255 | # FontPath: |
| 237 | 256 | |
| … |
… |
|
| 240 | 259 | /usr/share/fonts/X11 |
| 241 | 260 | }}} |
| 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 |
| | 271 | GLSTUB=IP:7000 |
| 248 | 272 | LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib/vmgl |
| 249 | 273 | LD_PRELOAD=/usr/local/lib/vmgl/libGL.so |
| 250 | 274 | export GLSTUB LD_LIBRARY_PATH LD_PRELOAD |
| 251 | 275 | }}} |
| 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 |
| 257 | 286 | X11Forwarding yes |
| 258 | 287 | }}} |
| 259 | | rider@guest:~$ sudo vim /etc/ssh/ssh_config [[BR]] |
| 260 | | {{{ |
| | 288 | {{{ |
| | 289 | $ sudo vim /etc/ssh/ssh_config |
| | 290 | }}} |
| | 291 | {{{ |
| | 292 | #!sh |
| 261 | 293 | ForwardX11 yes |
| 262 | 294 | ForwardX11Trusted yes |
| 263 | 295 | }}} |
| 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 |
| 270 | 310 | xauth: creating new authority file /home/gtd/.Xauthority |
| 271 | 311 | |
| … |
… |
|
| 275 | 315 | Starting applications specified in /home/gtd/.vnc/xstartup |
| 276 | 316 | Log 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 |
| 283 | 328 | # xrdb $HOME/.Xresources |
| 284 | 329 | }}} |
| 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 |
| 290 | 340 | (Not all processes could be identified, non-owned process info |
| 291 | 341 | will not be shown, you would have to be root to see it all.) |
| … |
… |
|
| 301 | 351 | }}} |
| 302 | 352 | |
| 303 | | '''# 將 VNC Server:1 export 出來.''' [[BR]] |
| 304 | | rider@guest:~$ export DISPLAY=:1 [[BR]] |
| | 353 | * 將 VNC Server:1 export 出來. |
| | 354 | {{{ |
| | 355 | $ export DISPLAY=:1 |
| | 356 | }}} |
| 305 | 357 | ---- |
| 306 | 358 | = 【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 |
| 313 | 370 | name of display: localhost:10.0 |
| 314 | 371 | display: localhost:10 screen: 0 |
| … |
… |
|
| 392 | 449 | # Note: please do not run stub-daemon with "root" |
| 393 | 450 | }}} |
| 394 | | '''# DomU 上的 glxgears 效能測試.''' [[BR]] |
| 395 | | rider@guest:~$ glxgears [[BR]] |
| 396 | | {{{ |
| | 451 | * DomU 上的 glxgears 效能測試. |
| | 452 | {{{ |
| | 453 | $ glxgears |
| | 454 | }}} |
| | 455 | {{{ |
| | 456 | #!sh |
| 397 | 457 | 47819 frames in 5.0 seconds = 9563.678 FPS |
| 398 | 458 | 46064 frames in 5.0 seconds = 9212.566 FPS |
| … |
… |
|
| 402 | 462 | }}} |
| 403 | 463 | ---- |
| 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 | | ---- |