School Assignment? Project Due Tomorrow? Chat LIVE With A Programming Expert!

Welcome to Dream.In.Code
Become an Expert!

Join 307,124 Programmers for FREE! Get instant access to thousands of experts, tutorials, code snippets, and more! There are 2,055 people online right now. Registration is fast and FREE... Join Now!




Ubuntu in VirtualBox – Set A High Screen Resolution

 
Reply to this topicStart new topic

> Ubuntu in VirtualBox – Set A High Screen Resolution, How to set a high screen resolution in Ubuntu running in a VirtualBox

Core
Group Icon



post 11 Dec, 2008 - 08:58 PM
Post #1


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.

IPB 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.

IPB 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.

IPB 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.

IPB 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.

IPB 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:

CODE
cd /media/cdrom


IPB Image

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

CODE
sudo bash ./VBoxLinuxAdditions-x86.run


For 64bit systems, type:

CODE
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:

IPB 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:

CODE
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.

IPB Image

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

IPB 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)
Attached File  Ubuntu_ScreenRes.pdf ( 841.67k ) Number of downloads: 752
Go to the top of the page
+Quote Post


Register to Make This Ad Go Away!

eug
*



post 25 Dec, 2008 - 08:42 AM
Post #2
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.
Go to the top of the page
+Quote Post

wqtc0m
*



post 14 Feb, 2009 - 08:26 AM
Post #3
Thanks for the tutorial. BTW, I don't think it's necessary to add
CODE

    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
CODE

    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.
Go to the top of the page
+Quote Post

edmond_74
*



post 17 Feb, 2009 - 01:26 PM
Post #4
Mucho thanks from Holland for your exellent guide! icon_up.gif icon_up.gif
Go to the top of the page
+Quote Post


Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 


Lo-Fi Version Time is now: 11/21/09 02:15PM

Live Help!

Be Social

Dream.In.Code RSS Feed Dream.In.Code LinkedIn Group Follow Us On Twitter Fan Us On Facebook

Tutorials

Programming

Web Development

Reference Sheets

Code Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month