转自:
http://bbs.chinaunix.net/thread-1923187-1-1.html
http://blog.csdn.net/haiong0707/article/details/8049235
在VirtualBox中安装完了CentOS(带界面的),发现最大只能支持到800x600的分辨率,于是安装guest additions,方法如下:
- 菜单 -> 设备 -> 安装增强功能,然后会在CentOS界面中弹出一个文件夹,目录类似 /media/VBOXADDITIONS_4.3.12_93733
- 命令行下执行该目录下的 ./VBoxLinuxAdditions.run(必须以root身份运行)
- 执行完了以后 reboot
重启以后的CentOS就可以设多种分辨率了,比如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]"
然后再尝试修改桌面分辨率为1366x768(注意,新加的1366x768可能会排在所有可选的分辨率的下拉框的末尾)。如果还不行,就reboot。最终可以设置成1366x768的桌面分辨率。