2009-04-06

【Linux】KVM 環境下 CentOS 5 設定 XWindows

公司的 CentOS 5 Linux server 是和其他 Win server 共住於機櫃內, 使用的是 15 吋的 LCD, 之前以 KVM 切換時, 一直會有螢幕顯示 "Out of Range" 的情形, 無法改善.

在鳥哥的網站得到了啟發, 有此困擾的朋友可以試試, 但此是以 CentOS 5 為例, 我不確定其它 distro 版本有沒有類似 CentOS 5 的 XWindow 精靈的功能.

KVM 切換到 CentOS 5, 螢幕因會顯示 "Out of Range", 那當然, 因為 XWindow 設定還沒解決, 但這只是 LCD 無法顯示罷了, 鍵盤是正常的, 所以按下 Ctrl + Alt + Backspace(倒退鍵), 重新啟動 XWindow, XWindow 會因為設定不適當而進入文字模式, 並問您是否要讓它幫您設定, 選 "是".

螢幕選擇 "General LCD", 選擇您希望的解析度(老灰鴨選的是 1024x768), 選好一切自己要的設定後, XWindow 會幫您產生出 /etc/X11/xorg.conf 設定檔, 而原設定檔則命名為 /etc/X11/xorg.conf.backup.

其實我們主要就是要那個有關 Monitor Section 的設定, 讓 XWindow 產生 xorg.conf 後, 我們再自行調整其它的設定. 像我就將 Screen Section 的 DefaultDepth 設為 16, 以下是我的設定值, 供朋友參考 ----

Section "Monitor"
    Identifier "Monitor0"
    ModelName "LCD Panel 1024x768"
    HorizSync 31.5 - 48.0
    VertRefresh 56.0 - 65.0
    Option "dpms"
EndSection

Section "Screen"
    Identifier "Screen0"
    Device "Videocard0"
    Monitor "Monitor0"
    DefaultDepth 16
    SubSection "Display"
        Viewport 0 0
        Depth 16
        Modes "1024x768" "800x600" "640x480"
    EndSubSection
EndSection

Section "ServerLayout"
    Identifier "single head configuration"
    Screen 0 "Screen0" 0 0
    InputDevice "Keyboard0" "CoreKeyboard"
EndSection

沒有留言:

張貼留言