95

I have been trying this for a while but no luck. I installed ubuntu-11.10-desktop-i386 twice. Also installed guest additions. However I always get maximum screen resolution as, 1024 x 768.

Do I need to change anything in /etc/X11/xorg.conf file (example)? Presently there is no such file in that path. Also, would you be able to advise me what the contents of the file for 11.10 version should be?

Flyk
  • 1,480
iammilind
  • 2,247

17 Answers17

88

This worked for me and I am running VirtualBox 4.1.8 and Ubuntu 11.10.

sudo apt-get install virtualbox-guest-utils virtualbox-guest-x11 virtualbox-guest-dkms

Found it on this site under a slightly different question Higher screen resolution in VirtualBox?

wfudge
  • 896
  • 1
    This worked for me. After installing the packages specified above and restarting VirtualBox the screen resolution in Ubuntu would adjust whenever I resized VirtualBox. – shanewwarren May 07 '12 at 20:54
  • This worked for me too. I experienced the same thing with @shanewwarren – mauris Sep 19 '12 at 14:42
  • same here. I also increased the video memory to 32 MB before that (may be unrelated). – zonksoft Mar 22 '13 at 21:28
  • 3
    After doing this (and I saw it in other places too) with Ubuntu 12.04 guest, it stops booting – Christian Vielma Sep 25 '13 at 15:52
  • Note, these package names - containing 'ose' - are out of date, VirtualBox doesn't have an Open Source Edition any more. The packages are called e.g. virtualbox-guest-utils. – Air May 22 '14 at 01:58
  • 1
    worked for me with ubuntu 14.04 on virtualbox 4.3.6 – masterweily May 25 '14 at 13:36
  • My system got stuck at login screen and mouse and keyboard both are not working at that point..i am using debian 7.6.0 on virtual box 4.3.14 – Tejendra Aug 06 '14 at 10:58
  • Tried this after installing manually, failed with some error about "held broken packages". Ran with aptitude instead of apt-get and it figured out a "solution" that allowed it to remove and re-install some things. The VM failed to boot after that, but just an FYI. – Pie21 Sep 16 '15 at 23:09
31

I was able to reproduce this issue repeatedly on Windows 7 host with Ubuntu 11.10 guest. Installing ubuntu from an iso image.

This issue happens when the either the Guest Additions are not installed or installed from ubuntu sources.

To fix this install guest additions from the virtual machine's Devices > Insert Guest Additions CD image option and running the autoprompt. If you already have the guest additions installed from a different source it will prompt you about removing the existing one and installing new guest additions, just say 'yes'. This will remove the guest additions if they are already installed from ubuntu sources and build from sources that came with your virtualBox installation.

This should fix the issue.

PizzaFrog
  • 103
Sai Puli
  • 311
14

I just installed Ubuntu 12.04 on VirtualBox 4.1.4, but couldn't get it to work on higher resolution, even after installing and reinstalling the VBOXAdditions. Desperate, I installed the VBOX 4.1.14 and reinstalled many times the VBOXAdditions, but without any success. Finally, the solution that solved the problem, was to increase the video memory (in VBOX setting for Ubuntu) from starting 12 MB, to 48 MB (which still did not enable resolution 1366x768), and than to 128 MB. After restarting Ubuntu everything works perfect, 1366x768 is my default resolution. I hope this will help in your problems. Cheers!

10

I was troubled with the screen resolution on Virtual Box on Windows 7 x64 as host and Ubuntu 12.04 LTS desktop as guest. I had raised the video memory to 128 MB, installed the VirtualBox Linux Additions, but it was still a no go. When checking the display setting in Ubuntu I could only choose between 800x640 (4:3) and 1024x768 (4:3).

Ticking the checkbox Enable 3D Acceleration in the virtual machine settings made it work. After that, when the guest window was resized, the size was reflected in the Ubuntu display settings. By turning on full screen mode I could use the full 1600x900 resolution in Ubuntu.

Hopes this might save someone's hair.

UPDATE: After enabling 3D acceleration Ubuntu became extremly sluggish. So I unticked the 3D acceleration and I could still enjoy full screen resolution.

John P
  • 201
7

My system is 64bit Windows 7 SP 1 running Ubuntu 12.04 LTS 32 bit (i386). I had to do almost everything for it to work. To summarise:

  1. With the virtual machine shutdown, change the 'Settings' of the pertinent virtual machine. Under 'Display' -> 'Video' move the video memory slider to '128mb' and also tick 'Enable 3D Acceleration'.

  2. Now load up your Ubuntu virtual machine. Under 'Devices' click on 'Insert Guest Additions CD Image'. Wait for it to do its thing.

  3. Restart the virtual machine. You should now be able to achieve the higher resolutions. If not, it may be because the virtual machine's window isn't large enough. Drag the corner to make it larger or simply do: 'View'->'Switch to Fullscreen'

Hope this helps someone. Thanks to all the other answers for helping me out.

Joshua T
  • 311
  • 3
  • 5
7

This is likely a VirtualBox issue, rather than an Ubuntu issue.

I have had the same problem repeatedly before. Sometimes removing and re-installing the Additions solves this. Or simply forcing VirtualBox to actually load them, and not just download them.

Unfortunately, this issue recurs. I have found that updating VirtualBox (to a newer build) sometimes makes this worse AND sometimes solves this. This is a recurring issue ..

Flimm
  • 41,766
david6
  • 14,499
2

Entering the game lately, not sure this answer will help, but having a similar resolution issue (Mac host, Ubuntu as vbox), and after playing with xrandr, xorg.conf etc... I tried the following

  • close Virtual Box
  • enter the host terminal command VBoxManage setextradata Linux CustomVideoMode1 1152x680x32 where Linux is the vbox name, CustomVideoMode1 is a name you give with 1 for one new resolution, 1152x680x32 for a 1152 x 680 x 32 bits colors resolution (VBoxManage.exe on Windows)
  • start your vbox
  • re-install the Guest additions

worked immediately after a vbox reboot.

more info

Déjà vu
  • 969
2

Using VirtualBox 4.3 on Windows 8 and guest Ubuntu 12.04

I installed virtualbox guest additions from the iso file provided in the virtualbox install directory (used autorun.sh) + restart guest.

I first thought it didn't work: the resolution was still low and screen parameters didn't show any higher resolution

Then I realised the guest screen was in "scale mode" (host+c), I switched to full screen (host+F) and resolution was fine!

mniess
  • 10,546
ceco
  • 21
1

Just run ubuntu on virtual machine and install "VirtualBox Guest Additions" (Devices -> Install Guest Additions). After the installation reboot your guest system.

Now resolution will change automaticaly depending on window size.

*I use Ubuntu 13.04 on VirtualBox 4.2.12 for Mac OS

Good luck.

1

Had problem with screen not full size after updates. Running Ubuntu 12.04. In the VBOXADDITIONS media I simply ran the autorun.sh - this uninstalled and reinstalled guest additions and then I rebooted and everything was back to normal.

Richard
  • 11
  • 1
  • The reason for losing the guest additions after updates is because you haven't installed the dkms package prior to installing them. DKMS will take care of rebuilding the kernel modules when you install updates. – gertvdijk Jun 27 '13 at 07:22
1

With Ubuntu 12.04 as host and guest I followed wfudge answer.

This requires other packages to be installed:

sudo apt-get xserver-xorg-core

After that, executed this modified line from wfudge hinted by apt-get:

sudo apt-get install virtualbox-ose-guest-utils virtualbox-ose-guest-x11 virtualbox-ose-guest-dkms virtualbox-guest-x11

After that Ubuntu guest didn't boot into GUI, so with Ctrl+Alt+F1, logged in a console and executed:

sudo apt-get install ubuntu-desktop

Reboot and done. Now I can get higher resolutions up to 1600x1200. Still not 1920x1080 (host), so it's not full screen, but at least is much better than what I had before.

I guess is a VirtualBox problem, but when used a Windows host didn't have this problem...

1

For me (Host: Mac El-capitan, Guest: Ubuntu 14.xx LTS, VirtualBox: 5.0.12) the Ubuntu won't reboot (black or the default purple screen frozen) after guest installations via apt-get as described in most posts in this thread.

Finally I used the official instructions from VirtualBox. On a fresh Ubuntu installation. Worked!

Installing Guest Additions on Ubuntu

  1. Follow these steps to install the Guest Additions on your Ubuntu virtual machine:
  2. Login as ubuntu;
  3. Click on Applications/System/Terminal (or on Applications/Terminal, if you are using the 6.06.1 Dapper Drake release);
  4. Update your APT database with sudo apt-get update, and typing your password, if requested;
  5. Install the latest security updates with sudo apt-get upgrade;
  6. Install required packages with sudo apt-get install build-essential module-assistant;
  7. Configure your system for building kernel modules by running sudo m-a prepare;
  8. Click on Install Guest Additions… from the Devices menu, then choose to browse the content of the CD when requested.
  9. Run sudo sh /media/cdrom/VBoxLinuxAdditions.run, and follow the instructions on screen.

I did a sudo reboot now at the end just to be safe. On restart it started changing it's resolution according to window size.

Kashyap
  • 351
  • 3
  • 10
0

I have same problem on my notebook DELL M6600 with Ubuntu 12.10. I had to install quest additions in windows safe mode. After that, desktop screen resolution was done by size of the window with guest OS.

jafan
  • 247
0

Sometimes it is very simple (refering to 12.03/4) On the virtual machine window, hit the maximize button and it will fill screen, and cause Ubuntu to re-detect the screen resolution from the VM.

Else, Christian Vielma's answer, doing all three steps one after the other, will enable this option.

0
  1. Close VirtualBox.

  2. Paste this on Host Terminal:

    sudo VBoxManage setextradata NAME CustomVideoMode1 1152x680x32
    

    where NAME can be found in SettingsGeneralBasicName.

  3. Restart VirtualBox.

Ajay
  • 1
  • 1
0

Using plain X11 without a heavy desktop client, ratpoison in my case, the following package is all that is needed:

virtualbox-guest-x11

I understand other packages might make your kernel aware that it is running in a virtual environment for some benefits, but this package seems to handle the resolution issues.

0

The only solution that worked was downloading the latest VBoxAdditions ISO from the Oracle website since the old ones don't work properly with DKMS.