Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I have read many posts about screen resolutions for Ubuntu as VirtualBox guest. May be I failed to read the good one... So.

I "just" want to make more screen resolutions available WITHOUT installing/modifying anything requiring superuser access in the Ubuntu guest VM (then WITHOUT guest additions). This requirement is a mandatory security issue for my project.

I am quite confident that it must be somehow possible, because setting "GRUB_GFXMODE=1280x1024" in /etc/default/grub uses 1280x1024 in grub boot menu only. This shows that the Virtual Box virtual graphic card does support it.

PS: please don't reply anything involving guest additions..

share|improve this question
    
forums.virtualbox.org/… says "Then you need to adjust the framebuffers of the guest. Since you are negating the guest additions it is all up to you and the guest OS. Custom xorg.conf would help too depending on the OS. But this is all out of the scope of this forum since it does not deal with VirtualBox." –  user539484 May 9 '13 at 16:46

3 Answers 3

You will need to boot in EFI mode and install Ubuntu in EFI mode for this to work.

VBoxManage modifyvm "VM name" --firmware efi
VBoxManage setextradata "VM name" VBoxInternal2/UgaHorizontalResolution 1440
VBoxManage setextradata "VM name" VBoxInternal2/UgaVerticalResolution 900

Without guest additions there is no way to randomly change resolutions from the guest. You will have to pick one resolution and stick with it, though you can change resolutions between reboots. For example, power down, change resolution, boot.

You would be much better off making an image with Guest Additions already installed, and just using that as your locked down base image. However the commands above will work.

There is a lot of data about running without guest additions here.

You may wish to use a resolution of 1920x1080 and enable "scaling mode" so the window can be re-sized. It's not the same as changing resolutions but it is a good start at it.

share|improve this answer

Run

xrandr

You get similar to

Screen 0: minimum 320 x 200, current 800 x 600, maximum 1280 x 1280

VGA connected 800x600+0+0 (normal left inverted right x axis y axis) 376mm x 301mm
       1280x1024      60.0 +   75.0  
       1280x960       59.9  
       1152x864       75.0     74.8  
       1024x768       75.1     70.1     60.0  
       832x624        74.6  
       800x600        72.2*    75.0     60.3     56.2  
       640x480        75.0     72.8     66.7     60.0  
       720x400        70.1

    * item is current.

It is list of resolutions you can set. Now you can change by using

xrandr -s Index

index is number starting from 0 as the first line.

OR

xrandr -s widthxheight

share|improve this answer
    
thx for your reply. xrandr displayq only two rows for the the low basic screen resolutions (800x600 & 640x480) looking a way to make virtualbox tell ubuntu other rscreen resolutions :) –  svert Apr 25 '13 at 13:07

I found this. It may help/work for you:

Close virtualbox, open a terminal and type:

VBoxManage setextradata global GUI/MaxGuestResolution HORIZANTALAMOUNTOFPIXELSHERE,VERTICALAMOUNTOFPIXELSHERE

Replace HORIZANTALAMOUNTOFPIXELSHERE with the horizontal amount of pixels and VERTICALAMOUNTOFPIXELSHERE with the vertical amount of pixels. This will set the resolution for virtual machines without guest additions.

It, unfortunately, only worked with openSUSE for me (haven't tried with Ubuntu yet), but you can try it and hopefully it works for you.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.