7/1/2008

Change Screen Resolution For Ubuntu Running Under VirtualBox

Filed under: — By Aviran Mordo @ 5:37 am

I’m experimenting with VirtualBox, and having Ubuntu 8.04 running on it I could not find an easy way to increase the screen resolution higher than 800X600.

Note: Although this guide was originally written for Ubuntu 8.04 it also works on Ubuntu 8.10, Ubuntu 9.04, Ubuntu 9.10

Luckily I found this great tip that shows how to configure the screen resolution in Ubunto 8.04 running as a virtual machine under VirtualBox.


Start up your Ubuntu 8.04 guest. In VirtualBox, click Devices->Install Guest Additions and your virtual Ubuntu should recognize a new CD. Open a terminal and run this command:
sudo /media/cdrom/VBoxLinuxAdditions.run

The installer should prompt you that it’s time to restart the virtual machine once it’s done. Just logging out and back in should work.

This is where things get sticky. For Ubuntu 8.04 guests, the VirtualBox video driver will not be enabled because of the minimalistic xorg.conf file.

Open your guest machine’s xorg.conf file:
gksu gedit /etc/X11/xorg.conf

Find the device section, which should look like this:

Section "Device"
  Identifier "Configured Video Device"
EndSection

And replace it with this to enable the VirtualBox driver:


Section "Device"
   Identifier   "Configured Video Device"
   Driver    "vboxvideo"
EndSection

Changing screen resolutions in Ubuntu 8.04 is done with RandR, which is not supported by VirtualBox. So you’ll also need to set a resolution manually. Find the screen section, which should look like this:


Section "Screen"
   Identifier    "Default Screen"
  Monitor    "Configured Monitor"
  Device    "Configured Video Device"
EndSection

And replace it with this, but change 1024×768 to your preferred resolution:


Section "Screen"
   Identifier    "Default Screen"
   Device    "VirtualBox graphics card"
   Monitor    "Generic Monitor"
   DefaultDepth    24
   SubSection "Display"
     Depth    24
     Modes      "1024x768"
   EndSubSection
EndSection

Save, exit the editor, and log out. You should now have a large virtual machine window, as well as mouse pointer integration.


 

49 Responses to “Change Screen Resolution For Ubuntu Running Under VirtualBox”

  1. kderby2000 Says:

    Worked like a champ. Thanks!

  2. Gopal Says:

    Worked like a charm. Thanks!!

  3. kongkoro Says:

    Best instructions on the net. THANKS!!!

  4. Frenchy Says:

    Doesn’t work for me

    i’ve got virtual box 1.6.2 and the last ubuntu version 8.x.x
    i’ve loaded the guest addition and updated the xorg.conf file
    but no result it’s the same 800*600 resolution again
    why me?

  5. remik Says:

    Awesome! It works. XP host, Ubuntu studio guest, vbox 2.0.2. I’m bookmarking this page.

  6. Vit Says:

    Same as Frenchy - nothing changed :-(

  7. zzack3 Says:

    It works for a virtualized Kubuntu 8.10 too!!!
    Thank you!

  8. posicionamiento web Says:

    thanks for the advice…

  9. noiseberg Says:

    Really good tip, it worked perfect with my Vbox running on win xp SP3, and ubuntu 8.10

  10. Rajesh Says:

    Vista host
    Ubuntu guest
    Problem low resolution
    Even after following above, there is no success. After logout one message appears which says
    “Ububtu is running in low-graphics mode”
    “the following error was encountered. you may need to update your configuration to solve this”
    “(EE) failed to load module “vboxvideo”(module does not exist, 0)”
    “(EE) No drivers available”

    Please help to resolve the issue

    9

  11. zer0sIx Says:

    works like charm! thanks man! definitely bookmark this page!

  12. amit Says:

    U r gr8 man.
    ppl like u motivate newbies of Linux

    thanks a lot……..

  13. Viraj Says:

    thanks a ton
    it worked wonders

  14. jojo Says:

    excellent. thanks a lot!!!

  15. markfried Says:

    Today I tried the howto, written above. There was no need for editing anything. Exeot that for me the mounted .iso was ../cdrom0/ and I had to choose the *x86.run command.
    After installing the VirtualBox started in maximum available 1200 + resolution. I changed to 16:9 and adjusted the font size and symbol size. Ubuntu works smooth :-)

  16. cricke Says:

    Thanks, worked great on XP host, Ubuntui guest after changing resolution in the Ubuntu menu.

  17. Ralph Says:

    Thanks!

    It worked like a charm. :D

    /ralph
    /sweden
    /brr, it’s cold….

  18. mezhaka Says:

    thanks a lot. like markfried said there where no need to edit anything. just inserted the Guest Additions, ran it for my architechture, log out, log in. and here am i with a resolution i need.

    thanks.

  19. Najmuddin Ahmed Says:

    Thanks a lot for the help.
    In my case the command “sudo /media/cdrom/VBoxLinuxAdditions.run” did not work instead the following worked

    sudo /media/cdrom/VBoxLinuxAdditions-x86.run

    the rest was dream run.
    Regards and thanks a lot.
    Najmuddin

  20. Sam Says:

    Thanks!!! It work great. I spend 1.5 hours but fix this with your help within 5 min

  21. Tony Says:

    Note: If you usually run VBox full screen - on a second monitor - you won’t see the menu option to “Install Guest Additions”. Simply go windowed to see the menu option.

  22. Kumar Says:

    Ahh, I have been trying to fix this for the last couple of hours and finally found a solution. This works great. It was not automatic for me after I logged back in. I just had to select it from the Display menu.

    Thanks a ton!

  23. autonomic1 Says:

    I don’t really get this. I’m a newbie at this and it seems really hard for me. Is there an easier way?

  24. prem Says:

    I have been searching for a solution for this problem for quite a while now… This is the only one that worked… Thanks a ton…

  25. mihai Says:

    the only thing I have to do was to run
    sudo /media/cdrom/VBoxLinuxAdditions-x86.run
    After that, restart the machine and everything worked perfectly. Even mouse capture works as expected now :)

    Thanks Aviran Mordo and Najmuddin

  26. Maik Says:

    Tips not work for me….

    Also - Vista host & Ubuntu guest
    Problem low resolution
    Even after following above, there is no success. After logout one message appears which says
    “Ububtu is running in low-graphics mode”
    “the following error was encountered. you may need to update your configuration to solve this”

    Guest Additions installed :(

  27. Mike Says:

    Re-make and all work!!! Thank you!!

  28. Tarek Gamil Says:

    Work very well. Host Vista 64 Guest ubuntu 9.04 Sun VirtualBox 3.06 I changed the resolution to “1280×768″ and ubuntu started very well without any problem

    Thanks for your effort a lot.

  29. rem Says:

    thanks for the tip… curiously, I have a vbox configuration at home and another at home. At home, I only had to install the additions and was able to change the resolution. At the office, I had to follow your whole process and change the xorg.conf. Worked perfectly. Thanks for your post. rem

  30. freddy Says:

    Excelente, logre solucionar mi problemas de video. Ubuntu me funciona perfecto.
    Gracias amigos.
    Freddy de Chile

  31. Varadharajan Says:

    Thanks a lot for the information. I had this problem for a long time and now the screen resolution is good.

  32. Computer File Recovery Says:

    I use Vista 64 ubuntu 9.04 along with a virtual box 3.06 and this problem has been plaguing me for a long time. I tried doing what you said and it worked flawlessly on one machine, but not my other two. I tried to see if there was anything different I accidentally did or something I changed and it turned out when I copy and pasted I ended up leaving out one of the quotes after vboxvideo. Just thought I say this in case anyone out there might have done the same thing..

  33. bigmarck Says:

    thanks!
    it works with a virtualbox in w7 and xubuntu 9.10 @1280×1024 inside the virtualbox 3.1.2

  34. Subrat Says:

    Great!! It worked fine, thanks!!

  35. Siver Says:

    same as others, about 2 hours trying to solve this issue but finally I fix it tnx a lot.

    I’M RUNING UBUNTU ON VISTA, AND IT WORKET tnx a lot!!!

  36. Mottramdo.com Says:

    awesome, thanks for the great guide

  37. thedude Says:

    awesome this worked

  38. linuxer Says:

    Hey thanks dude. That is just what i needed….

    Cheers

  39. sriks Says:

    thank you!!!!!!!!!!!!!!!!!!!!!!

  40. Tokamak Says:

    thank you!!! Worked like a charm!!! Running virtualbox 3.2.8 under Windows 7 Pro as host and Ubuntu 10.04 as guest.

  41. Imad Abdeljaouad Says:

    Worked like a charm, thanks for the share !!!

  42. Jack Says:

    YOU ROCK! :-)
    I was playing around with the xorg.conf file for days and couldn’t figure out that it was a virtualbox issue as much as a kubuntu issue.
    THANK YOU THANK YOU THANK YOU!

  43. Rustin Says:

    Thanks for the tutorial. I am completely new to any form of linux. In case anyone else has a similar situation as me I will post my experience.

    I couldn’t figure out how to do the long version. Good thing I re-read the top. Somehow I had an .iso file in the same folder as my linux called vboxguestadditions.iso and just placed that as my secondary master. Clicked on Devices then cd/dvd devices, then the vbox.iso. Then clicked on Install guest additions under the Devices tab. Opened the file, clicked the version then autorun prompt. Easy Squeasy. Rebooted Ubuntu. I am using Vista Home and Ubuntu 10.04.1. Again thanks.

  44. Rafael Says:

    It has worked perfectly!

    Thank you

  45. Kamyk Says:

    This advice is great… :)

    Today I tried the howto, written above. There was no need for editing anything. Exeot that for me the mounted .iso was ../cdrom0/ and I had to choose the *x86.run command.
    After installing the VirtualBox started in maximum available 1200 + resolution. I changed to 16:9 and adjusted the font size and symbol size. Ubuntu works smooth

  46. Balu Says:

    Thanks and it worked like a charm. I am using virtualbox 4.2 and Ubuntu 9.04 as a guest on the host Win XP. For full screen mode, it seems like it is not necessary to edit the xorg.conf file. But for scaling mode in virtualbox, without editing the file, it doesn’t seem to work.

    Thanks once again for this wonderful tip.

  47. Forkoff Says:

    Install Guest Additions - This works best.

  48. zhy Says:

    thanks, it’s a good tip

  49. glerant Says:

    True!
    Just open up the Ubuntu Software Centre and search for “guest additions” then install.

    Thanks!

Leave a Reply

You must have Javascript enabled in order to submit comments.

All fields are optional (except comment).
Some comments may be held for moderation (depends on spam filter) and not show up immediately.
Links will automatically get rel="nofollow" attribute to deter spammers.

Powered by WordPress