一般Virtualbox安装CentOS安装完成后默认是800x600的分辨率。
安装Guest additions。安装完成后,分辨率可以修改为1024x768,还有一些更高的分辨率,但是没有1366x768。
修改/etc/X11/xorg.config
安装完Guest additions后,文件默认内容为(或者类似)
# VirtualBox generated configuration file
# based on /etc/X11/xorg.conf.
Section "Monitor"
Identifier "Monitor[0]"
ModelName "VirtualBox Virtual Output"
VendorName "Oracle Corporation"
EndSection
Section "Device"
BoardName "VirtualBox Graphics"
Driver "vboxvideo"
Identifier "Device[0]"
VendorName "Oracle Corporation"
EndSection
Section "Screen"
SubSection "Display"
Depth 24
EndSubSection
Device "Device[0]"
Identifier "Screen[0]"
修改Section "Screen",添加字段Modes "800x600" "1366x768" (可添加需要的任意分辨率)
Section "Screen"
SubSection "Display"
Depth 24
Modes "800x600" "1366x768"
EndSubSection
Device "Device[0]"
Identifier "Screen[0]"
注意:Modes要添加在SubSection之间,而且不能只添加1366x768,要同时添加800x600。