Display Screen Resolution

Discussions about using Linux guests in VirtualBox.
Post Reply
CountyPyr
Posts: 11
Joined: 25. May 2007, 04:47
Location: Seattle, Washington, USA

Display Screen Resolution

Post by CountyPyr »

Hi All

The Host OS is Win XP Pro SP2, and the Guest OS is SimplyMEPIS 6.5. I have a VESA compliant graphics adapter and a 20-inch (50.8 cm) LCD display.

In the Guest OS, which application controls the resolution of the display. Is it VirtualBox, or in my case, SimplyMEPIS? Or, do they somehow work together? For example in Microsoft Windows I can set my display at the VESA resolution of 1280 X 1024, and I believe that I can set the same resolution in SimplyMEPIS. Can I set that resolution in SimplyMEPIS when it is running inside VirtualBox, or does VB restrict the available resolutions to 640 X 480, 800 X 600 and 1024 X 768? Or does the current resolution of the Host OS somehow establish the available parameters?
bodhi.zazen
Volunteer
Posts: 180
Joined: 17. May 2007, 16:02

Post by bodhi.zazen »

VirtualBox provides the "virtual hardware". Think of virtual box as supplying the video card and monitor. You can improve the available interaction between host and guest by installing the Additions .iso.

INSTALL THE Additions .iso ON THE GUEST OS.

http://doc.gwos.org/index.php/VirtualBox#Additions_.iso

Then the Guest OS must be configured to take advantage of the available "virtual hardware" provided by Virtualbox.

This means configuring xorg (/etc/X11/xorg.conf).

I do this by directly editing /etc/X11/xorg.conf. BUT ... this is an art and is hard to describe in a post like this.

So, try this :

In Mepis, open a terminal, enter this code :

Code: Select all

sudo dpkg-reconfigure -phigh xserver-xorg
This will select the defaults for a number of things, all except resolution. When you get to the resolution screen, scroll up and down with the up-down arrow keys, select a resolution with the space bar, use the tab key to navigate to the "OK" or "Done" box, hit enter ...

If that fails, manual edit of xorg.conf :

Code: Select all

sudo nano -B /etc/X11/xorg.cong
nano is an editor that is worth while learning. The -B flag makes a backup (/etc/X11/xorg.conf~).

OK

Now xorg is in several sections.

You want the monitor and screen sections. It may help to copy these sections from a version of Lnux with a working resolution (DSL, Wolvix).
Section "Monitor"
...
HorizSync 30-96 <-- Enter the correct values here
VertRefresh 50-160 <-- and here
Section "Screen"
...
DefaultDepth 24 <-- You may need to reduce this to 16

Subsection "Display"
Depth 16
Modes "1600x1200" "1280x1024" "1024x768" "800x600"
EndSubsection

Subsection "Display"
Depth 24
Modes "1600x1200" "1280x1024" "1024x768" "800x600"
EndSubsection
Enter your desired resolution in the Modes line.

You can also genererate a mods line, but I am going to leave that for now ...

http://xtiming.sourceforge.net/cgi-bin/xtiming.pl


Whew ... Talk about "down and dirty" Linux resolution :)

HTH
If is a virtual machine, is it still broken ?
CountyPyr
Posts: 11
Joined: 25. May 2007, 04:47
Location: Seattle, Washington, USA

Post by CountyPyr »

Hi bodhi.zazen

Thank you for your very informative post. I shall be away from the computer with the VirtualBox/SimplyMEPIS installation for, approximately, the next 2 weeks. When I return, I shall utilize your instructions to reset the display screen resolution, and then I shall post the results in this thread.

Again, thank you for your help; it is much appreciated.
CountyPyr
Posts: 11
Joined: 25. May 2007, 04:47
Location: Seattle, Washington, USA

Post by CountyPyr »

Hi All

VirtualBox: Version 1.4
Host OS: Windows XP Pro SP2 - Fully Patched
Guest OS: Linux' SimplyMEPIS 6.5.32
Linux Kernel: 2.6.15-27-desktop
Display: DELL 20.1" (51 cm) LCD Screen

I utilized bodhi.zazen's instructions in a successful effort to increase the number of different Display Resolutions available to my VM. In my Guest OS, Linux's SimplyMEPIS 6.5 (It is forked from Ubuntu), I encountered 3 issues. The first issue occurred after I completed the procedure that begins with this step: "sudo dpkg-reconfigure -phigh xserver-xorg". After I "powered off" the VM, and then re-booted, the "Guest Additions" were NOT active. I had to re-install the "Guest Additions" to make them active. Please note: fortunately, I did NOT need to reinstall the Linux kernel-headers.

The second issue could be specific to SimplyMEPIS 6.5 or perhaps it is because I installed VirtualBox in a location on the Win XP Host OS other than c:\program files\. The location of the iso file is G:\Program1\INNOTE~1\VBoxGuestAdditions.iso. The problem occurs during the installation of the "Guest Additions". I follow the procedure of mounting the CD drive: Devices --> CD/DVD-ROM --> CD/DVD-ROM Image --> VBoxGuestAdditions.iso --> "Select" button. However, when I use either the command line or Kongueror to navigate to /media/cdrom to run VBoxLinuxAdditions.run, the cdrom folder is empty. In Konqueror, I must open and close several other folders, such as /etc to somehow get the contents of the virtual CD-ROM to be "seen". Once the file is "seen", I can easily change to "root", and run the file.

NEWBIES, please note: VBoxLinuxAdditions.run does NOT display an installation progress bar, nor does it advise you when it is finished running. You won't find out if the installation was successful until you "power off" and re-boot the VM. For me, VirtualBox pops up an Info-Box over top of the SimplyMEPIS login box. The Info-Box states that the VM reports that the Guest OS supports "mouse pointer integration" .... etcetera, etcetera.

The third issue occurs sporadically. When I boot the SimplyMEPIS Guest OS, the SimplyMEPIS graphical login screen sometimes does not appear. Instead, there is what looks like an old-time MS-DOS window that asks me to login from the command line. After some experimentation, I found that the easiest course of action is to click on the X in the window's top-right corner to close this sick puppy. Next, just to be thorough, I close the "innotek VirtualBox" program, and after waiting a few seconds, I restart VirtualBox and then the VM.

Until the Linux "Guest Additions" were installed and activated, and until more display resolutions were established in SimplyMEPIS, my choices were limited to 1024 X 768 and 800 X 600. And, even then, the display would NOT reset to 800 X 600. After rebooting, I right-clicked on the MEPIS desktop and selected "Configure Desktop" in the pop-up menu. In the "Configure-KDesktop window, I selected "Display" icon --> "Size & Orientation" tab --> "Screen size:" row.

Earlier, when I ran "dpkg-reconfigure -phigh", I selected the following resolutions:
640 X 480; 800 X 600; 1024 X 768; 1152 X 864, and all of these screen sizes were available to me. The really odd detail is that the "Refresh rate:" row shows "0 Hz" (That is the number zero and not the letter O). In xorg.conf, I had manually replaced the incorrect scan ranges for both the HorizSync and VertRefresh with the correct ones so I don't understand why this is happening. Anyway, the LCD display appears to be working correctly in the VM, so there doesn't appear to be a direct negative effect.

Here is the "Monitor" section from xorg.conf:
Section "Monitor"
Identifier "Generic Monitor"
Option "DPMS"
HorizSync 31-80
VertRefresh 56-76
EndSection

Here is the "Screen" section from xorg.conf:
Section "Screen"
Identifier "Default Screen"
Device "Generic Video Card"
Monitor "Generic Monitor"
DefaultDepth 16
SubSection "Display"
Depth 1
Modes "1152x864" "1024x768" "800x600" "640x480"
EndSubSection
SubSection "Display"
Depth 4
Modes "1152x864" "1024x768" "800x600" "640x480"
EndSubSection
SubSection "Display"
Depth 8
Modes "1152x864" "1024x768" "800x600" "640x480"
EndSubSection
SubSection "Display"
Depth 15
Modes "1152x864" "1024x768" "800x600" "640x480"
EndSubSection
SubSection "Display"
Depth 16
Modes "1152x864" "1024x768" "800x600" "640x480"
EndSubSection
SubSection "Display"
Depth 24
Modes "1152x864" "1024x768" "800x600" "640x480"
EndSubSection
EndSection

Here is the "Commented-Out" segment from the beginning of xorg.conf:
# /etc/X11/xorg.conf (xorg X Window System server configuration file)
#
# This file was generated by dexconf, the Debian X Configuration tool, using
# values from the debconf database.
#
# Edit this file with caution, and see the /etc/X11/xorg.conf manual page.
# (Type "man /etc/X11/xorg.conf" at the shell prompt.)
#
# This file is automatically updated on xserver-xorg package upgrades *only*
# if it has not been modified since the last upgrade of the xserver-xorg
# package.
#
# If you have edited this file but would like it to be automatically updated
# again, run the following command:
# sudo dpkg-reconfigure -phigh xserver-xorg

BTW, I tried to access the manual as stated in the # Type "man /etc/x11/xorg.conf" line listed above, but I got the following rejection notice:
Stephen@1[~]$ man /etc/x11/xorg.conf
man: /etc/x11/xorg.conf: No such file or directory
No manual entry for /etc/x11/xorg.conf
Stephen@1[~]$

Anyway, it is time to terminate my endless rambling, and move on. Much thanks to bodhi.zazen for his help. Since I am a complete newbie to both Linux and VirtualBox, it is a mortal-lock that this project would not have happened without his help.
\/E|
Posts: 2
Joined: 7. Aug 2007, 20:11

Post by \/E| »

Thank you too bodhi.zazen.
grahamt
Posts: 7
Joined: 12. Aug 2007, 23:38
Primary OS: MS Windows XP
VBox Version: PUEL
Guest OSses: Windows 7 RC; Ubuntu 9.04
Location: UK

Post by grahamt »

I have discovered that dpkg-reconfigure -phigh xserver-xorg not only enables you to set the desired additional screen resolutions, select the "vboxvideo" device instead of the default "vesa" but also resets the mouse device back to "mouse" from "vboxmouse".

The unfortunate result is that the mouse pointer disappears. What you have to do, after running dpkg-reconfigure, is manually edit xorg.conf to put the mouse device back to "vboxmouse", then everything works properly.
Post Reply