Page 1 of 1

Ubuntu in VirtualBox – Set A High Screen Resolution How to set a high screen resolution in Ubuntu running in a VirtualBox Rate Topic: ***** 1 Votes

#1 Core  Icon User is offline

  • using System.Linq;
  • member icon

Reputation: 773
  • View blog
  • Posts: 5,097
  • Joined: 08-December 08

Post icon  Posted 11 December 2008 - 09:58 PM

Required software:
  • Sun ™VirtualBox™ (available at http://www.virtualbox.org)
  • Microsoft® Windows® XP/Vista
  • Ubuntu 8.10 (used in this tutorial, previous versions compatible) installed in VirtualBox

Virtualization offers you a great opportunity to set a virtual environment to test different operating systems without the hazard of damaging the main (or host) operating system. However, sometimes the installed system acts different in the virtualized environment. For example, the installed Ubuntu in VirtualBox by default sets the 800x600 screen resolution.

Posted Image

Even if the user activates the full screen mode, the resolution still remains the same. Unfortunately, if you open the Screen Resolution dialog (System > Preferences > Screen Resolution) from the Ubuntu menu, you won’t see any suitable high resolution picks.

Posted Image

However, there is a solution for this problem. First of all, before starting the virtual Ubuntu environment, check if there are no images mounted in the virtual CD/DVD drive for the current virtual machine.

Posted Image

Now start the Ubuntu virtual machine. When the Ubuntu OS is completely loaded, make sure the mouse is not being captured by the guest environment (if it is, press the right Ctrl button to release capture). Navigate through the Devices menu to reach the Install Guest Additions option.

Posted Image

After you click on this option, a virtual image will be automatically mounted in the current guest system (Ubuntu in this case) and the user will most likely see a Autorun option.

Posted Image

Click on Cancel, as the mounted image does not contain Autorun files. Now, go to the Terminal (Applications > Accessories > Terminal). When the terminal window opens, type the command:

cd /media/cdrom


Posted Image

Now, depending on your system, type in the terminal (for 32bit systems):

sudo bash ./VBoxLinuxAdditions-x86.run


For 64bit systems, type:

sudo bash ./VBoxLinuxAdditions-amd64.run


You may be asked for your account password. Type it if asked for and press Enter. The installation process shall now begin. After the installation is complete, you should see something similar to this:

Posted Image

Restart your virtual environment. Still, after this process we will not see any additions to the screen resolutions list. We have to do one more thing – edit the xorg.conf file.

NOTE: I am using Ubuntu 8.10 for this tutorial. This system implements an automatic backup feature for the xorg.conf file, so if the file is corrupt, the system will ask the user if he wants to restore the older xorg.conf file. In the previous versions of Ubuntu the auto-backup feature is not present and your system may be irreversibly damaged if the file becomes corrupt. PLEASE, MAKE SURE YOU BACKUP YOUR XORG.CONF FILE BEFORE PERFORMING ANY CHANGES TO IT.

Open the terminal window (Applications > Accessories > Terminal) and type:

sudo gedit /etc/X11/xorg.conf


Remember, that UNIX-like systems are case-sensitive when it comes to entering file path, so X11 is not the same as x11. Make sure you follow the indicated letter case.

After pressing Enter, the gedit window should appear.

Posted Image

Now, we should add some additional configuration information to this file:

Posted Image

The text highlighted with a red frame is the representing the settings you should add to the xorg.conf file. In the Modes section, you can set the resolutions you want to add. I added a 1600x800 resolution (for a wide screen). If you don’t use a wide screen, you can set the standard 1024x768 resolution.

Save the file and restart the virtual environment. Now your virtual Ubuntu environment can work on a high resolution, so you can work in the full screen mode.

- Dennis (Core)

You can download this tutorial in PDF format.
The file is presented as an attachement to this tutorial.

Attached File(s)



Is This A Good Question/Topic? 2
  • +

Replies To: Ubuntu in VirtualBox – Set A High Screen Resolution

#2 eug  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 1
  • Joined: 25-December 08

Posted 25 December 2008 - 09:42 AM

Thank you for the excellent guide.

I did this on VirtualBox 2.0.6 with Ubuntu 8.10 guest running on Vista Home Premium host. First worked perfectly fine. After that Ubuntu downloaded and installed the whole bunch of updates. I restarted Ubuntu. Since then mouse pointer integration does not work.

I couldn't find anything enabling it in the menus. I attempted to rerun VirtualBos Linux Guest Additions, but it started and returned right away (apparently noticing that the additions had been installed already).

What's wrong, and how to enable mouse pointer integration. I will appreciate advice.
Was This Post Helpful? 0
  • +
  • -

#3 wqtc0m  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 1
  • Joined: 14-February 09

Posted 14 February 2009 - 09:26 AM

Thanks for the tutorial. BTW, I don't think it's necessary to add
	DefaultDepth	24
	SubSection "Display"
		Depth	24
		Modes	"1600x800"
	EndSubSection


because Guest Additions will take care of switching to appropriate resolution in Ubuntu whenever you resize VirtualBox's window. Just add
	Driver		"vboxvideo"



After installing Guest Additions, you'll also be able to copy and paste text between host and guest OS or use mouse in a seamless way.
Was This Post Helpful? 0
  • +
  • -

#4 edmond_74  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 1
  • Joined: 17-February 09

Posted 17 February 2009 - 02:26 PM

Mucho thanks from Holland for your exellent guide! :^: :^:
Was This Post Helpful? 0
  • +
  • -

#5 Core  Icon User is offline

  • using System.Linq;
  • member icon

Reputation: 773
  • View blog
  • Posts: 5,097
  • Joined: 08-December 08

Posted 22 January 2010 - 07:12 AM

For the folks who are using Ubuntu 9.10 Karmic Koala inside VirtualBox, you've probably noticed that by default there is no xorg.conf file. This is easily fixable.

First of all, open the terminal and type sudo service gdm stop. The service that controls the graphic UI will be shutdown and you will be working plainly with the terminal now.

Enter the credentials, and then type sudo Xorg -configure. Now, a new xorg.conf.new file will be generated in the active folder. Don't worry about the extension, it will be altered in the next step.

Move it to the etc folder: sudo mv xorg.conf.new /etc/X11/xorg.conf.

Start the GDM service: sudo service gdm start.

Now you can manually configure the graphics settings through xorg.conf in Karmic Koala.
Was This Post Helpful? 0
  • +
  • -

#6 dewhales  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 7
  • Joined: 07-January 10

Posted 23 January 2010 - 10:49 AM

Thank you very much!
Was This Post Helpful? 0
  • +
  • -

#7 Guest_Pat*


Reputation:

Posted 15 April 2010 - 02:34 PM

I am running the newest Ubuntu and I was about to give up because I didn't have the xorg.conf file inside X11 thank god you made a post about it, now I can finally use my machine to it's best resolution!

Thanks again
Was This Post Helpful? 0

#8 Guest_Rafael*


Reputation:

Posted 16 April 2010 - 11:18 PM

View PostCore, on 22 January 2010 - 06:12 AM, said:

For the folks who are using Ubuntu 9.10 Karmic Koala inside VirtualBox, you've probably noticed that by default there is no xorg.conf file. This is easily fixable.

First of all, open the terminal and type sudo service gdm stop. The service that controls the graphic UI will be shutdown and you will be working plainly with the terminal now.

Enter the credentials, and then type sudo Xorg -configure. Now, a new xorg.conf.new file will be generated in the active folder. Don't worry about the extension, it will be altered in the next step.

Move it to the etc folder: sudo mv xorg.conf.new /etc/X11/xorg.conf.

Start the GDM service: sudo service gdm start.

Now you can manually configure the graphics settings through xorg.conf in Karmic Koala.




Thank u man!!!!!
you are a genius ;)
Was This Post Helpful? 0

#9 Guest_eug5ne*


Reputation:

Posted 13 June 2010 - 07:39 PM

I have solved this! Pretty easy. Visit http://jinnyfeb.blog...go-to-full.html
Was This Post Helpful? 0

#10 Guest_Nick*


Reputation:

Posted 27 February 2011 - 10:25 AM

I tried to follow this but I got this error :

nick@Linux:/media/VBOXADDITIONS_2.0.12_53697$ sudo bash ./VBoxLinuxAdditions-x86.run

[sudo] password for nick:

Verifying archive integrity... All good.

Uncompressing VirtualBox 2.0.12 Guest Additions for Linux installation...........................................................................................y

compilation terminated.

make[2]: *** [/tmp/vbox.0/cmc.o] Error 1

make[1]: *** [_module_/tmp/vbox.0] Error 2

make: *** [vboxadd] Error 2




Full text here :
nick@Linux:/media/VBOXADDITIONS_2.0.12_53697$ sudo bash ./VBoxLinuxAdditions-x86.run

[sudo] password for nick:

Verifying archive integrity... All good.

Uncompressing VirtualBox 2.0.12 Guest Additions for Linux installation.............................................................................................................................................................................................

VirtualBox 2.0.12 Guest Additions installation

Building the VirtualBox Guest Additions kernel module...

Unable to build the kernel module.  See the log file /var/log/vboxadd-install.log

for more details.

nick@Linux:/media/VBOXADDITIONS_2.0.12_53697$ cat /var/lo

local/ lock/  log/  

nick@Linux:/media/VBOXADDITIONS_2.0.12_53697$ cat /var/lo

local/ lock/  log/  

nick@Linux:/media/VBOXADDITIONS_2.0.12_53697$ cat /var/log/vboxadd-install.log


Installing VirtualBox 2.0.12 Guest Additions, built Tue Oct 20 15:29:05 CEST 2009


Testing the setup of the guest system


Building a test kernel module...


make KBUILD_VERBOSE=1 -C /lib/modules/2.6.35-22-generic/build SUBDIRS=/tmp/selfgz147016830/module/test SRCROOT=/tmp/selfgz147016830/module/test modules

test -e include/generated/autoconf.h -a -e include/config/auto.conf || (    \

    echo;                                \

    echo "  ERROR: Kernel configuration is invalid.";        \

    echo "         include/generated/autoconf.h or include/config/auto.conf are missing.";\

    echo "         Run 'make oldconfig && make prepare' on kernel src to fix it.";    \

    echo;                                \

    /bin/false)

mkdir -p /tmp/selfgz147016830/module/test/.tmp_versions ; rm -f /tmp/selfgz147016830/module/test/.tmp_versions/*

make -f scripts/Makefile.build obj=/tmp/selfgz147016830/module/test

  gcc -Wp,-MD,/tmp/selfgz147016830/module/test/.test.o.d  -nostdinc -isystem /usr/lib/gcc/i686-linux-gnu/4.4.5/include  -I/usr/src/linux-headers-2.6.35-22-generic/arch/x86/include -Iinclude  -include include/generated/autoconf.h -Iubuntu/include  -D__KERNEL__ -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -Werror-implicit-function-declaration -Wno-format-security -fno-delete-null-pointer-checks -O2 -m32 -msoft-float -mregparm=3 -freg-struct-return -mpreferred-stack-boundary=2 -march=i686 -mtune=generic -maccumulate-outgoing-args -Wa,-mtune=generic32 -ffreestanding -fstack-protector -DCONFIG_AS_CFI=1 -DCONFIG_AS_CFI_SIGNAL_FRAME=1 -DCONFIG_AS_CFI_SECTIONS=1 -pipe -Wno-sign-compare -fno-asynchronous-unwind-tables -mno-sse -mno-mmx -mno-sse2 -mno-3dnow -Wframe-larger-than=1024 -fno-omit-frame-pointer -fno-optimize-sibling-calls -pg -Wdeclaration-after-statement -Wno-pointer-sign -fno-strict-overflow -fconserve-stack -I/lib/modules/2.6.35-22-generic/build/include -I/tmp/selfgz147016830/module/test/ -I/tmp/selfgz147016830/module/test/include -I/tmp/selfgz147016830/module/test/r0drv/linux -D__KERNEL__ -DMODULE -DRT_OS_LINUX -DIN_RING0 -D_X86_ -DIN_RT_R0 -DIN_SUP_R0 -DVBGL_VBOXGUEST -DVBGL_HGCM -DVBOX_WITH_HGCM  -DMODULE -D"KBUILD_STR(s)=#s" -D"KBUILD_BASENAME=KBUILD_STR(test)"  -D"KBUILD_MODNAME=KBUILD_STR(vboxadd_test)"  -c -o /tmp/selfgz147016830/module/test/.tmp_test.o /tmp/selfgz147016830/module/test/test.c

  set -e ; perl /usr/src/linux-headers-2.6.35-22-generic/scripts/recordmcount.pl "i386" "little" "32" "objdump" "objcopy" "gcc" "ld" "nm" "" "" "1" "/tmp/selfgz147016830/module/test/test.o";

  ld -m elf_i386   -r -o /tmp/selfgz147016830/module/test/vboxadd_test.o /tmp/selfgz147016830/module/test/test.o

(cat /dev/null;   echo kernel//tmp/selfgz147016830/module/test/vboxadd_test.ko;) > /tmp/selfgz147016830/module/test/modules.order

make -f /usr/src/linux-headers-2.6.35-22-generic/scripts/Makefile.modpost

  scripts/mod/modpost -m -a -i /usr/src/linux-headers-2.6.35-22-generic/Module.symvers -I /tmp/selfgz147016830/module/test/Module.symvers  -o /tmp/selfgz147016830/module/test/Module.symvers -S -w  -s

  gcc -Wp,-MD,/tmp/selfgz147016830/module/test/.vboxadd_test.mod.o.d  -nostdinc -isystem /usr/lib/gcc/i686-linux-gnu/4.4.5/include  -I/usr/src/linux-headers-2.6.35-22-generic/arch/x86/include -Iinclude  -include include/generated/autoconf.h -Iubuntu/include  -D__KERNEL__ -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -Werror-implicit-function-declaration -Wno-format-security -fno-delete-null-pointer-checks -O2 -m32 -msoft-float -mregparm=3 -freg-struct-return -mpreferred-stack-boundary=2 -march=i686 -mtune=generic -maccumulate-outgoing-args -Wa,-mtune=generic32 -ffreestanding -fstack-protector -DCONFIG_AS_CFI=1 -DCONFIG_AS_CFI_SIGNAL_FRAME=1 -DCONFIG_AS_CFI_SECTIONS=1 -pipe -Wno-sign-compare -fno-asynchronous-unwind-tables -mno-sse -mno-mmx -mno-sse2 -mno-3dnow -Wframe-larger-than=1024 -fno-omit-frame-pointer -fno-optimize-sibling-calls -pg -Wdeclaration-after-statement -Wno-pointer-sign -fno-strict-overflow -fconserve-stack -I/lib/modules/2.6.35-22-generic/build/include -I/tmp/selfgz147016830/module/test/ -I/tmp/selfgz147016830/module/test/include -I/tmp/selfgz147016830/module/test/r0drv/linux -D__KERNEL__ -DMODULE -DRT_OS_LINUX -DIN_RING0 -D_X86_ -DIN_RT_R0 -DIN_SUP_R0 -DVBGL_VBOXGUEST -DVBGL_HGCM -DVBOX_WITH_HGCM  -D"KBUILD_STR(s)=#s" -D"KBUILD_BASENAME=KBUILD_STR(vboxadd_test.mod)"  -D"KBUILD_MODNAME=KBUILD_STR(vboxadd_test)"  -DMODULE -c -o /tmp/selfgz147016830/module/test/vboxadd_test.mod.o /tmp/selfgz147016830/module/test/vboxadd_test.mod.c

  ld -r -m elf_i386 -T /usr/src/linux-headers-2.6.35-22-generic/scripts/module-common.lds --build-id -o /tmp/selfgz147016830/module/test/vboxadd_test.ko /tmp/selfgz147016830/module/test/vboxadd_test.o /tmp/selfgz147016830/module/test/vboxadd_test.mod.o

Inserting the test module module/test/vboxadd_test.ko into the kernel.


Building the VirtualBox Guest Additions kernel module.


Makefile:55: Using BUILD_TYPE='release' from the environment.

make KBUILD_VERBOSE=1 -C /lib/modules/2.6.35-22-generic/build SUBDIRS=/tmp/vbox.0 SRCROOT=/tmp/vbox.0 modules

test -e include/generated/autoconf.h -a -e include/config/auto.conf || (    \

    echo;                                \

    echo "  ERROR: Kernel configuration is invalid.";        \

    echo "         include/generated/autoconf.h or include/config/auto.conf are missing.";\

    echo "         Run 'make oldconfig && make prepare' on kernel src to fix it.";    \

    echo;                                \

    /bin/false)

mkdir -p /tmp/vbox.0/.tmp_versions ; rm -f /tmp/vbox.0/.tmp_versions/*

make -f scripts/Makefile.build obj=/tmp/vbox.0

/tmp/vbox.0/Makefile:55: Using BUILD_TYPE='release' from the environment.

grep: /tmp/vbox.0/include/linux/version.h: No such file or directory

  gcc -Wp,-MD,/tmp/vbox.0/.cmc.o.d  -nostdinc -isystem /usr/lib/gcc/i686-linux-gnu/4.4.5/include  -I/usr/src/linux-headers-2.6.35-22-generic/arch/x86/include -Iinclude  -include include/generated/autoconf.h -Iubuntu/include  -D__KERNEL__ -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -Werror-implicit-function-declaration -Wno-format-security -fno-delete-null-pointer-checks -O2 -m32 -msoft-float -mregparm=3 -freg-struct-return -mpreferred-stack-boundary=2 -march=i686 -mtune=generic -maccumulate-outgoing-args -Wa,-mtune=generic32 -ffreestanding -fstack-protector -DCONFIG_AS_CFI=1 -DCONFIG_AS_CFI_SIGNAL_FRAME=1 -DCONFIG_AS_CFI_SECTIONS=1 -pipe -Wno-sign-compare -fno-asynchronous-unwind-tables -mno-sse -mno-mmx -mno-sse2 -mno-3dnow -Wframe-larger-than=1024 -fno-omit-frame-pointer -fno-optimize-sibling-calls -pg -Wdeclaration-after-statement -Wno-pointer-sign -fno-strict-overflow -fconserve-stack -I/lib/modules/2.6.35-22-generic/build/include -I/tmp/vbox.0/ -I/tmp/vbox.0/include -I/tmp/vbox.0/r0drv/linux -D__KERNEL__ -DMODULE -DRT_OS_LINUX -DIN_RING0 -DIN_RT_R0 -DIN_SUP_R0 -DVBOX -DVBGL_VBOXGUEST -DVBOX_WITH_HGCM -DLOG_TO_BACKDOOR -DRT_WITH_VBOX -DIN_MODULE -DIN_GUEST_R0 -DRT_ARCH_X86  -DMODULE -D"KBUILD_STR(s)=#s" -D"KBUILD_BASENAME=KBUILD_STR(cmc)"  -D"KBUILD_MODNAME=KBUILD_STR(vboxadd)"  -c -o /tmp/vbox.0/.tmp_cmc.o /tmp/vbox.0/cmc.c

In file included from /tmp/vbox.0/r0drv/linux/the-linux-kernel.h:38,

                 from /tmp/vbox.0/cmc.c:21:

/tmp/vbox.0/include/iprt/types.h:87: fatal error: linux/autoconf.h: No such file or directory

compilation terminated.

make[2]: *** [/tmp/vbox.0/cmc.o] Error 1

make[1]: *** [_module_/tmp/vbox.0] Error 2

make: *** [vboxadd] Error 2




Was This Post Helpful? 0

Page 1 of 1