Home > English, Linux & Programming > Embedding Windows in Linux with VirtualBox

Embedding Windows in Linux with VirtualBox

I am obviously a big fan of Linux and use it at home as well as in my office. But in both places I still require Windows for two reason:

  • At home I require it for gaming. Wine is ok, but can still be a major pain in the ass with configuration and lesser known games.
  • In the office I am obliged to use Microsoft Office. I prefer LaTeX, but compared to OpenOffice the 2007 version of MsOffice is the big winner in my opinion.  But since working under Windows otherwise is out of question for me (I am way more productive with Linux/Gnome), a dual-boot like I use for gaming is no option.

So, in my office, I use VirtualBox to embed Windows inside my Linux desktop. Formerly I used VMware, which admittedly is more powerful, but provides a less appealing user interface and, at that time, did not provide the seamless mode, which I will make use of. To give an impression, here is a screenshot of my desktop:

Using VirtualBox to embed Windows inside Gnome

Using VirtualBox to embed Windows inside Gnome

I will not go through the installation process, as it’s pretty self-explanatory. But what VirtualBox additionally offers is the aforementioned seamless mode (default combination: Right-CTRL + L), which gives you the taskbar over your normal gnome panel. This is really nice, since it allows easy access and switching between Windows and Linux applications. While Alt-Tab is not used optimally (it only lets you access applications of one OS at a time), you can switch between Windows and Linux applications by pressing Right-CTRL before using Alt-Tab.

Another great feature is embedding any host folder (e.g. your home folder) directly inside the Windows explorer as seen on the screenshot. This is achieved by setting a shared folder in Devices->Shared Folders and then adding a network drive. This is as simple as right-clicking on My Computer (unsure about the name, I only have German Windows 😉 ) and adding the drive. From now it’s possible to modify and share files between host and virtual machine without any hassle.

Also, I configured cups to allow web access to the printers configured in Linux, so the Windows VM could easily print by using these. But I haven’t configured this yet since my last installation, so I cannot give a howto right now 😉 .

I hope you enjoy the progress of free VMs like VirtualBox as much as I do, as it allows Windows apps, that are sadly still required, to be used inside your Linux without a hassle and with nice integration. I hope that Alt-Tab is improved, then the whole thing would feel like a natural part of your Linux desktop. Additionally, VirtualBox now has Direct3D support (which I haven’t tested yet), so maybe one day we will be able to even do gaming inside our Linux distributions without any more need for a dual boot.

Update:

For all this, you need to install the Guest additions. You can find these in the menu devices.

  1. February 11th, 2009 at 17:36 | #1

    So, let me take the first comment on this 😉

    You really come to the point with the two reasons using windows: gaming and office-enforcement. For the moment i´m still not finished “configuring” my new (ok, not so new) notebook with the needed windows tools, but with time i´ll finally switch and use your how-tos 😉

  2. ArchitecTonic
    October 13th, 2009 at 17:29 | #2

    Stimme :
    So, let me take the first comment on this
    You really come to the point with the two reasons using windows: gaming and office-enforcement. For the moment i´m still not finished “configuring” my new (ok, not so new) notebook with the needed windows tools, but with time i´ll finally switch and use your how-tos

    Hey I finally switched! and I feel relieved, I am on the right side now.. 😉
    I have followed this great tutorial and found some unmentioned focal points:
    When mapping a network drive from the guest windows, you can’t find the server in the “Network” so map manually, assuming your shared folder is called “myshare” map this:
    \\vboxsvr\myshare
    Another noteworthy issue is that Windows 7 doesn’t accept (easily) to run applications from a network drive, so copy your MS Office setup folder locally before you try to run it, or better, mount the MS Office iso using VirtualBox!
    Seamless mode will not activate until you Devices->install guest additions, and restart the virtual machine.
    Other than that, it is a great experience to see windows tricked so bad into running inside such a small box!!

  3. October 13th, 2009 at 18:05 | #3

    @Architectonic
    Congratulations for the change! Once you get used to linux, you will hate working with Windows. Well, at least I do ;).
    Thanks for the hints. I think, I will write a new, more comprehensive how-to for the upcoming version of Ubuntu and the new VirtualBox. Maybe we can work on that together then, including the 3D-support.

  1. No trackbacks yet.
*