Linux Format forums Forum Index Linux Format forums
Help, discussion, magazine feedback and more
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

How To Increase Screen Resolution with VirtualBox and Ubuntu

 
Post new topic   Reply to topic    Linux Format forums Forum Index -> Hardware
View previous topic :: View next topic  
Author Message
udroomla



Joined: Sun Jul 29, 2007 5:16 pm
Posts: 7

PostPosted: Mon Jul 30, 2007 5:14 pm    Post subject: How To Increase Screen Resolution with VirtualBox and Ubuntu Reply with quote

I have solved the problem of lack of usable choices of screen resolution when operating "Ubuntu" inside "virtual box" (which is running on your windows PC - as rolled out with the DVD from Linux Format Mag "Building a great website"). It was annoying to not be able to operate the Virtual Box window at my 1680x1050 resolution.

The clue was in reading the pdf that came with VirtualBox (or view the help file contents in Virtual box). Reading section 4 talks about "guest additions" which need to be installed to enable better video resolutions and other stuff. It seems hard at first if you don't know linux (like me) but here are some simple instructions.

1. Start Virtual box and log into Ubuntu.

2. Hit the right ctrl key so you can get your mouse pointer outside the virtual machine.

3.Go to top of virtual window, click on devices then select "Install Guest Additions"
You will see a window pop up inside Ubuntu showing you that there are some new files mounted in a virtual CDROM drive. One of those files should be VBoxLinuxAdditions.run

You must run the file with some admin permissions so do that this way...

4. Click inside the Ubuntu screen again then go to Applications - Accessories then Terminal. The terminal window is where you will run the file from, but first we must navigate to the correct directory.

5. type this... cd /media/cdrom0 (then hit enter, there is a space after cd!)

6. next type... dir (You should see amongst the files displayed VBoxLinuxAdditions.run)

7. now type... sudo sh ./VBoxLinuxAdditions.run (yes, that is a full stop before the slash!)

after you hit enter and it has done its stuff, the files are now accessable from Ubuntu.

8. You now need to reboot the virtual machine or press Ctrl+Alt+backspace.

9. Log onto the Ubuntu desktop and this time go to System - Preferences then Screen Resolution. You should now have more options than the three low res options you had at the beginning of the day!

If you are happy then H.A.N.D (have a nice day)... otherwise...

Still not happy because your favourite resolution is not one of the newly listed ones then follow these steps...

1. Open the terminal window again (Applications - Accessories then Terminal)

2. Type... sudo gedit /etc/X11/xorg.conf (space after gedit and X11 must be capital X)

3. It will ask you for a password which is the same as you log in with.

4. The text editor loads and you should see a lot of text in the window. First make a backup of this file by going to "file" then "save as" and changing the filename to xorgbak.conf

5. You now need to hunt through the text until you see the display resolutions listed. The ones you will be concerned about will be listed under bit depth 24 or bit depth 16 (as these depths are the ones that give you a large amount of colors.)

6. The idea here is to have your favorite screen resolution included in this list. Do this by either inserting it before the other listed resolutions in the exact same manner or typing it over one of the others. (you will only need to do this for the ones under bit depth 24 and 16)

7. You must now do a "save as" but be careful here as this time we need to call the file xorg.conf again. If you just hit save here you would have saved the changes over the backup file you created!

8. You are done. Hit Ctrl+Alt+Backspace to restart your virtual box, log in and enjoy your new screen resolution options!


Addendum..."Whoops I broke my Ubuntu install and it won't load again!"

If you broke your virtual machine follow these instructions:

1. Start Ubuntu loading and hit escape as soon as you see the "grub" loading screen.

2. Select one of the recovery options and wait for it to load to the prompt.

3. type... mv /etc/X11/xorg.conf mv /etc/X11/xorg1.conf (space after each mv) This is moving and renaming the file xorg.conf

4. You are done (almost). Ubuntu will boot properly next time you try, but you need to follow step 2, 3 and 4 from above, but remember, this time you will be loading the file called xorgbak.conf into the editor and when you go to save, use "save as" and call it xorg.conf Very Happy
Back to top
View user's profile Send private message
pjhk



Joined: Thu Jun 11, 2009 12:57 am
Posts: 1

PostPosted: Thu Jun 11, 2009 12:58 am    Post subject: RE: How To Increase Screen Resolution with VirtualBox and Ub Reply with quote

udroomla thanks for your post, very helpful!
Back to top
View user's profile Send private message
Wolwy



Joined: Thu Jun 18, 2009 2:41 pm
Posts: 1

PostPosted: Thu Jun 18, 2009 2:45 pm    Post subject: Reply with quote

Hello,

Thanks for explain that with such details. However I have still a problem. When installing Guest Additions, nothing happens ... and there is not the "VBoxLinuxAdditions.run" on cdrom0, so I can't open it.
My computer is a MacBook, OS 10.5 . Can you help me ?
Back to top
View user's profile Send private message
pkohler01



Joined: Thu Jun 25, 2009 3:25 am
Posts: 1

PostPosted: Thu Jun 25, 2009 3:25 am    Post subject: Reply with quote

Thanks for the information.

These instructions worked for a 64bit Ubuntu 9.04 virtual machine run on a Windows 7 RC 64bit PC.
Back to top
View user's profile Send private message
philgons



Joined: Sun Jul 05, 2009 1:31 am
Posts: 1

PostPosted: Sun Jul 05, 2009 1:36 am    Post subject: Reply with quote

This doesn't work with VirtualBox 3 on Vista 64-bit running Ubuntu 9.10. The options have been removed. However, it's now much easier. Just resize the VirtualBox window and it will automatically resize to the appropriate resolution.
Back to top
View user's profile Send private message
rusto



Joined: Fri Aug 21, 2009 1:08 am
Posts: 1

PostPosted: Fri Aug 21, 2009 1:11 am    Post subject: Reply with quote

Since you are on a Mac, you need to use "VBoxLinuxAdditions-x86.run" instead.

Wolwy wrote:
Hello,

Thanks for explain that with such details. However I have still a problem. When installing Guest Additions, nothing happens ... and there is not the "VBoxLinuxAdditions.run" on cdrom0, so I can't open it.
My computer is a MacBook, OS 10.5 . Can you help me ?
Back to top
View user's profile Send private message
JenC



Joined: Sun Oct 25, 2009 8:36 am
Posts: 1
Location: Brisbane Oz

PostPosted: Sun Oct 25, 2009 9:02 am    Post subject: Re: How To Increase Screen Resolution with VirtualBox and Ub Reply with quote

udroomla wrote:
I have solved the problem of lack of usable choices of screen resolution when operating "Ubuntu" inside "virtual box" . . .


Thank you, udroomla, you have both cleared a usage bottleneck for me (the tiny default screens) and taught me some basics of Linux-ing with your clearly written prompts.

Because you were so precise, and because nothing that you wrote was working as advertised, I finally realised the problem was me (surprise!) which led to this Win/Lin/Ubu/tyro finally discovering that on a Mac the enter~Return (new para) key is not the same as the enter key.

It only took 25 years of Mac-ing to discover that, but I think I am finally at lift-off speed for Ubuntu.

FWIW, in the 9.10 x86 rc release the xorg.conf file was quite empty, and after installing the additions just one extra resolution has been added, 1024 x 768, but that is more than large enough to go on with. Even now, there are only very general comments there, and no sizes to modify, but I'll keep poking at things.

Thanks again for your time & care.

Jen
Back to top
View user's profile Send private message
sulman



Joined: Wed Jul 07, 2010 9:48 am
Posts: 1
Location: Ireland

PostPosted: Wed Jul 07, 2010 9:50 am    Post subject: Nice Reply with quote

Worked a charm, very much appreciated.
Back to top
View user's profile Send private message
arielgenesis



Joined: Tue Aug 10, 2010 2:59 pm
Posts: 1

PostPosted: Tue Aug 10, 2010 3:05 pm    Post subject: Reply with quote

This is a very good post but it is slightly outdated unfortunately. I specifically created an account to reply to this thread because it is the 1st on google search.

I am having the same problem, Vista guest, Ubuntu Host, virtualbox, screen resolution.

The problem is, after extensive google searching is that most of the Xorg nowdays does not have xorg.config file anymore. So please if any educated person out there would be very kind to update this piece of very valuable information for the better world, please.
Back to top
View user's profile Send private message
nelz
Site admin


Joined: Mon Apr 04, 2005 12:52 pm
Posts: 8375
Location: Warrington, UK

PostPosted: Tue Aug 10, 2010 6:33 pm    Post subject: Reply with quote

Xorg still uses an xorg.conf file if it is present[1], it just doesn't need it. Anything you put in this file overrides anything automatically detected, so you can still force the resolution you want in this way.

(1) The current version uses separate files in /etc/X11/xorg.conf.d making it easy to separate the sections of your config.
_________________
"Insanity: doing the same thing over and over again and expecting different results." (Albert Einstein)
Back to top
View user's profile Send private message
bobthebob1234
LXF regular


Joined: Thu Jan 03, 2008 9:38 pm
Posts: 1368
Location: A hole in a field

PostPosted: Tue Aug 10, 2010 8:25 pm    Post subject: Reply with quote

I found that if you install the guest additions on the virtual computer, the resolution adjusts to the window size.
_________________
For certain you have to be lost to find the places that can't be found. Elseways, everyone would know where it was
Back to top
View user's profile Send private message
tir38



Joined: Thu Dec 15, 2011 9:54 pm
Posts: 1

PostPosted: Thu Dec 15, 2011 9:58 pm    Post subject: If it doesn't seem like this is working Reply with quote

This is kinda stupid but I spend a long time trying to get the screen resolution to increase. The way Guest Additions works is that it scales the screen resolution based on your window size. So if you are not viewing your Guest Virtualbox in full screen then your Ubunutu list of available screen resolutions won't increase. It wasn't until I put the Virtualbox on full screen before the full screen resolution came up. When I had virtualbox as a small window, I could only ever see 800x600 and 400x300 as screen resolution options.

Silly me.
Back to top
View user's profile Send private message
evanjones246
Guest





PostPosted: Thu Feb 16, 2012 9:48 am    Post subject: Re: If it doesn't seem like this is working Reply with quote

There was a recent update that should have solved this issue. you should try updating your software. Smile
tir38 wrote:
This is kinda stupid but I spend a long time trying to get the screen resolution to increase. The way Guest Additions works is that it scales the screen resolution based on your window size. So if you are not viewing your Guest Virtualbox in full screen then your Ubunutu list of available screen resolutions won't increase. It wasn't until I put the Virtualbox on full screen before the full screen resolution came up. When I had virtualbox as a small window, I could only ever see 800x600 and 400x300 as screen resolution options.

Silly me.
Back to top
View previous topic :: View next topic  
Display posts from previous:   
Post new topic   Reply to topic    Linux Format forums Forum Index -> Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Linux Format forums topic RSS feed 


Powered by phpBB © 2001, 2005 phpBB Group


Copyright 2011 Future Publishing, all rights reserved.


Web hosting by UKFast