本节内容:
修改linux的分辨率
针对虚拟机用户适用。
要求:
虚拟机已经安装过VMwareTools
方法:
重新运行一下,
复制代码 代码示例:
vmware-config-tools.pl
在出现:Do you want to change the display size that X starts with?
回答:yes 回车
即可重新选择分辨率了。
以下分享网上找到的方法:
方法一:
gtf命令是一种
复制代码 代码示例:
[root@localhost ~]#gtf 800 600 75
方法二:
直接修改/etc/X11/xorg.conf文件
修改内容:
复制代码 代码示例:
Section "Screen"
Identifier "Screen0"
Device "Videocard0"
Monitor "Monitor0"
DefaultDepth 16
SubSection "Display"
Viewport 0 0
Depth 16
Modes "800x600" "640x480"
EndSubSection
SubSection "Display"
Viewport 0 0
Depth 24
Modes "800x600" "640x480"
EndSubSection
EndSubSection
补充实例:
在linux系统安装完成后,默认情况下系统的分辨率是800*600,要修改成1024*768的分辨率,需要做如下的操作:
#vi /etc/X11/xorg.conf
将HorizSync修改为30 - 70
复制代码 代码示例:
VertRefresh 50.0 - 160
Modes "1024x768" "800x600" "640x480"(有两处)
内容如下:
复制代码 代码示例:
Section "Monitor"
Identifier "Monitor0"
VendorName "Monitor Vendor"
ModelName "Unknown monitor"
# HorizSync 31.5 - 37.9
HorizSync 30 - 70
# VertRefresh 50.0 - 70.0
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
说明:
HorizSync指水平同步率
VertRefresh指垂直刷新率
如果不修改以上两个指标,仅修改modes是达不到显示器分辨率的。