VBOX安装Centos设置分辨率为1366x768[已解决]

时间:2023-08-14 21:01:14

最近想了解下GTK+,但是对于直接在系统上搭建环境有点心里阴影,怕又把桌面玩挂,所以打算在虚拟机中先试试

本来打算使用Fedora的,怕gnome太吃资源所以下了个xfce的,不过貌似有BUG,无法安装。所以安了gnome版的,果然运行吃力,看了看移动硬盘里躺着的一堆ISO,还是Centos吧。

很快安装完,但是分辨率只有800x600的,并且不可调。想了下应该是没安装VBOX的增强功能,所以在界面左上角“设备 - 安装增强功能”,自动就安装好了,重启后分辨率可选,不过都是4:3的分辨率的,并没有1366x768的笔记本分辨率的,侧边的黑框实在是无法忍受。

还好找到了方法:修改/etc/X11/xorg.conf文件

以下是我的文件内容,需要修改Section "Screen",添加字段Modes "800x600" "1366x768"

注意!不能只添加1366x768,需要添加800x600

[code]
# 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"
SubSection "Display"
Depth 24
Modes "800x600" "1366x768"
EndSubSection
Device "Device[0]"
Identifier "Screen[0]"
Monitor "Monitor[0]"
EndSubSection
[/code]

OK,重新启动,可以选择1366x768,再使用快捷键“右Ctrl+F”调至全屏幕模式。

VBOX安装Centos设置分辨率为1366x768[已解决]