VirtualBox Tips

By Dai

I thought I'd pass on some tips on using VirtualBox to make life a little easier for you. Here are two tips on resolution and shared folders for getting a better experience using VirtualBox.

  1. Resolution

    The resolution for my computer is 1274 x 876 (host OS).

    To get the guest OS to fit nicely and still see my host, I've changed the resolution in xorg.conf (guest OS) to look like the following:

    Section "Screen"
        Identifier "screen1"
        Device "device1"
        Monitor "monitor1"
        DefaultColorDepth 24
        Subsection "Display"
            Depth 8
            Modes  "1272x896" "1152x864""1024x768" "832x624" "800x600" "640x480" "480x360" "320x240"
        Subsection "Display"
            Depth 15
            Modes "1272x896" "1152x864" "1024x768" "832x624" "800x600" "640x480" "480x360" "320x240"
        Subsection "Display"
            Depth 16
            Modes "1272x896" "1152x864" "1024x768" "832x624" "800x600" "640x480" "480x360" "320x240"
        Subsection "Display"
            Depth 24
            Modes "1272x896" "1152x864" "1024x768" "832x624" "800x600" "640x480" "480x360" "320x240"

    In the terminal type:


    then your password

    gnome users type:

    gedit /etc/X11/xorg.conf

    kde users type:

    kwrite /etc/X11/xorg.conf

    add "1272x896" to your xorg.conf file. This will give a nice fit to the guest OS and still give you access to your host at the top and bottom of the screen.

  2. Shared Folders

    When setting up shared folders so that you can share resources between your host and guest, you must do this in two parts.

    Part 1

    Configuring VirtualBox:

    Settings>Shared folders

    Click on the folder with a plus. In the dialog box that pops up click on the little arrow in the folder path and choose other.

    It should open up an image of your home directory. If so click the Choose button.

    Part 2

    Now access your shared folder in your guest OS.

    In terminal (guest OS) type in:


    This should give you the output of your group id and user id.

    Create a new folder on your desktop as this is where you are going access your host OS home folder. (My host OS is Ubuntu so I called the folder ubuntu).

    In the terminal type in the following as root (based on your user name, user id, and group id):

    mount -t vboxsf -o gid=501,uid=501,defaults dai /home/dai/Desktop/ubuntu

    From the line of code this part corresponds to the setup in Virtualbox:

    mount -t vboxsf -o gid=501,uid=501,defaults dai

    This part corresponds to the folder on your desktop of your guest OS:


    If you go the the folder on your desktop and open it up you should see your host home folder and all it's contents.

    If all has gone successfully you will be accessing your home folder of your host OS.

  3. distrowatch