Linux 分辨率问题

在虚拟机安装好 Red Hat Enterprise 5 后,分辨率只能调整为 800*600 或 640*480。以下方法可以弄到 1024*768。

修改 /etc/X11/xorg.conf,增加以下配置:

Section "Monitor"
Identifier "Monitor0"
VendorName "Monitor Vendor"
ModelName "Unknown monitor"
# HorizSync 31.5 - 37.9  /*HorizSync:水平同步率*/
HorizSync 30 - 70
# VertRefresh 50.0 - 70.0  /*VerRefresh:垂直刷新率*/
VertRefresh 50.0 - 160
Option "dpms"
EndSection

Section "Device"
Identifier "Videocard0"
Driver "vesa"
VendorName "Videocard vendor"
BoardName "VESA driver (generic)"
EndSection

Section "Screen"
Identifier "Screen0"
Device "Videocard0"
Monitor "Monitor0"
DefaultDepth 24
SubSection "Display"
Viewport 0 0
Depth 16
Modes "1024x768" "800x600" "640x480" /*修改第一处*/
EndSubSection
SubSection "Display"
Viewport 0 0
Depth 24
Modes "1024x768" "800x600" "640x480"  /*修改第二处*/
EndSubSection
EndSection

保存配置,注销系统,再次登录就 OK 了。