Linux – How to change resolution of CentOS 6.5 Resolution on virtualbox (Host: Win7)

centoslinuxresolutionvirtualboxxorg

So I'm trying to configure the resolution of my CentOS 6.5 virtualbox. Here are the steps I have taken:

Installed guest additions
Changed virtualbox preferences > Display > Maximum Guest Screen Size: Hint (Width 1920, height 1080)
Restarted VirtualBox
System > Preferences > Display only shows 1024×768 and lower as possible resolutions.

I had also tried editing /etc/X11/xorg.conf to include the following:

Section "Screen"
Depth 24
SubSection "Display"
Depth 24
Modes "1920x1080"
EndSubSection
EndSection

However changing this caused box to crash to a black window with "CentOS 6.5" printed. It would let me type but would not let me run commands; hitting enter returned a newline but no actions. There was no prompt.

I've also seen instructions to run a command changing the MaxGuestOSResolution (or something) in my host terminal, but I'm hosting on windows so that isn't an option.

Is there something I'm overlooking? I've done a lot of google searching but nothing has given me the option to increase the resolution. I've also taken a couple steps that I didn't list here, but I can't remember them all.

Thanks in advance.

Best Answer

More steps to add 1920x1080 Screen resolution. Just make sure that you "reboot" after you uncomment X11's xorg.conf file before you run the automated scripts further down below.

sudo mv /etc/X11/xorg.conf /etc/X11/xorg.conf.unused

You can use the following scripts. Also credit to Adam Prax's Answer How to change resolution of CentOS 6.5 Resolution on virtualbox (Host: Win7)

#!/bin/bash
Diplay_Name=`xrandr | grep connected | cut -d' ' -f1`
Display_Spec=`cvt 1920 1080 | grep Modeline | cut -d' ' -f2 |cut -d '"' -f2`
Display_Params=`cvt 1920 1080 | grep Modeline | cut -d' ' -f2-18`
xrandr --newmode $Display_Params
xrandr --addmode $Diplay_Name $Display_Spec
xrandr --output $Diplay_Name --mode $Display_Spec

You should have something commands execution like below.

xrandr --newmode "1920x1080_60.00"  173.00  1920 2048 2248 2576  1080 1083 1088 1120 -hsync +vsync 
xrandr --addmode VGA-0 1920x1080_60.00 
xrandr --output VGA-0 --mode 1920x1080_60.00

Then, you can use VirtualBox’s “View -> Auto-resize Guest Display” to let VirtualBox automatic resize work for you.

Related Question