As a web developer, I am constantly aware of the problem that every browser seems to have a mind of its own when rendering a webpage. Especially earlier versions of Internet Explorer are a big problem for a lot of developers as these browsers were not updated with new options and/or visual fixes (only security updates). As a result, most web developers want to test their creations in various versions of Internet Explorer to make sure that everyone can experience their website as intended. Earlier, I wrote an article that explained how you can run Internet Explorer 7 under Ubuntu 10.04 Lucid Lynx. However, the package provided by PlayForLinux seems to be broken now and I had to find a new way to test websites before putting them online. In this blog I will explain a new method that actually runs Windows within Ubuntu enabling developers to exactly mimic the conditions of real users. Before starting, I should note that the files required for this method are somewhat large (3x 700Mb & 1x 553Mb), so you might want to download the files first (step 1) before continuing with the rest of these steps.
1. For this method, you need to download a ‘Internet Explorer Application Compatibility VPC Image’ provided by Microsoft. You can pick any VPC image you like, but in this blog I will make use of the Windows 7 Internet Explorer 8 image which consists out of four files. You can download your image of preference directly from the Microsoft website.
2. We need two pieces of software from the Ubuntu Software Center before we continue. Open the Ubuntu Software Center and search for the package ‘VirtualBox OSE’. Install it and search for the package ‘Wine Microsoft Windows Compatibility Layer’. Also install this package before you continue.
3. We will use the WinRAR archiving tool from RARLAB to extract the images from the first step. You should download the Windows (32-bit) trial version from the RARLAB website.
4. Navigate to the directory containing your WinRAR download and select WinRAR. Now righclick on the icon and pick the option ‘Properties’ from the menu. In the new Windows make sure that the file is set to be executable (third tab ‘Permissions’, as shown below). Click ‘Close’ when you are done to close the window.
5. Now rightclick again on the icon and pick the option ‘Open with Wine Windows Program Loader’ to start the installation process of WinRAR. You can now install WinRAR by following the wizard and using the default options.
5. After installation, you can start WinRAR as a normal program. Once started, click ‘File -> Open archive’ (Ctrl + O) and select one of the image files you downloaded in first step (note that one of the downloaded files will not show up; this is expected behavior from WinRAR). Click ‘Ok’ to open the archive in WinRAR.
8. Click ‘Next’ in the wizard to continue to the second page. On the new page you can give your test environment a name and you have to select the type of environment that you want to set up (this of course depends on your image of choice from the first step). Afterwards, click ‘Next’ to continue.
9. The third page allows you to allocate working memory (or RAM) to your environment. I usually allocate 1024Mb of RAM to my test environment as this allows me to run more programs in it and I have enough spare memory to continue my normal work while my test environment is active (NOTE: it is recommend to not dedicate more than half your total working memory to an environment). After you have allocated your working memory, click ‘Next’ to continue.
10. The next page allows you to either create a new empty environment or create an environment using an existing image. Select the second option which will enable you to select your downloaded VPC image. After you have selected your image you can click ‘Next’ to review your choices. Finally, click ‘Finish’ to create your new test environment.
11. Your new environment is now almost ready for you to use! However, due to a configuration ‘error’ made by VirtualBox your environment needs one more change in order to work. In the VirtualBox window select your new environment (left click on it) and click the button ‘Settings’. A new window should appear that looks like the one shown below.
12. Navigate to your Storage devices in the list on the left. You should now see a screen similar to the first screenshot below. Select the ‘SATA Controller’ and hit your [Delete]-key to remove this item from the list. Now click on the small ‘Add Hard Disk’-icon next to the ‘IDE Controller’ (it’s the second icon) and add your hard disk again like you have done in step 10. The final result should look like the second screenshot below.
12. Click ‘Ok’ to close the ‘Settings’-window. Your new environment is now ready to be used for the first time! Select it (left click) and click the ‘Run’-button to start up your Windows test environment with Internet Explorer.
Your test environment will have ‘Password1’ as a default password for all accounts available. If you use the administrator account, you can temporarily ‘activate’ your test environment for 30 days using the command
slmgr –rearm. More information on this is also available on the Microsoft website.