IEs4LinuxIE's popularity has exasperated professional web developers ever since the internet became more than an academic curio in the late 90s. Other than simple dual booting, the first option for those who wanted to test their sites on IE was tatanka's IEs4Linux, which uses wine to run the IE web installer. Just as if it were running under Windows, the installer connects to MS's servers, downloads, and then installs IE on your Linux machine. It's still available, but has for the most part been superseded by the winetricks installation described below.
Running Recent IE VersionsHowever, IE 6 usage has finally shrunk down to a mere couple of percent of web users, and can at last be ignored for the vast majority of web sites. Sure, there are people out there using IE 6, but in most cases they can be safely ignored as such people - with their ancient dusty desktops clunking along - are, to be blunt, unlikely to be big spenders on the internet.
More recent versions however remain popular, and while standards support is much better now than it used to be, there are still gotchas that will destroy your IE-using customers' confidence if allowed to make their way onto a live web site.
winetrickswinetricks can install IE 6, 7 and 8 using the Windows installer in much the same way as IEs4Linux does above. Unfortunately, IE 9 cannot be installed this way, and if you want more than one of IE 6, 7 and 8 available at the same time, you'll need to install each with a different WINEPREFIX (as shown above). During the installation, uncheck the 'Install updates' option when asked and choose 'Restart later' at the end. Installation is straightforward though:
WINEPREFIX=~/.wine32ie7 WINEARCH=win32 winetricks ie7
For IE 8:
WINEPREFIX=~/.wine32ie8 WINEARCH=win32 winetricks ie8 crypt32Note we're also installing crypt32 for IE8 - a workaround for a crash in ntdll that otherwise occurs as soon as you try to interact with the browser. Instead of the crash, you will now see this error:
Click OK, which should bring up IE's 'Manage Add-Ons' dialog, which you can just close and then carry on to do whatever dastardly scheme you'd needed IE 8 for.
You can then run your copy of IE thus, changing WINEPREFIX according to the IE version you want:
WINEPREFIX=~/.wine32ie7 WINEARCH=win32 wine 'C:\Program Files\Internet Explorer\iexplore'You may well encounter stability problems however, and you'll notice some graphical glitchiness, particularly when scrolling. Some people may also have a legal problem installing IE 7/8 this way, because the licences require you have a licence for Windows. This condition sounds a bit anti-competitive to me, and there's debate over whether it would hold up in a non-US court; nevertheless it may rule out the wine solutions for any companies or individuals that do not own a copy of Windows (note that Windows does not need to be installed on the machine in question, or indeed on any machine: you or your company just need to own a Windows licence). The offending passages are highlighted below:
VirtualBoxThis leaves the final and most satisfactory option - running Windows in a Virtual Machine with an image containing the IE version you're targeting. You may think this also requires a paid-for licence from Redmond, but this is not the case. Microsoft itself has made virtual machine images freely available for each of IE 6, 7, 8 and 9 to try and encourage web designers and developers to support their tatty software.
Whilst this is the best option, the downside is that these images contain a full Windows setup, and therefore consume a huge amount of disk-space: around 10 GB for each version you plan to test. Running them is also rather demanding on system resources. VirtualBox is Open Source (GPLv2), and will need to be installed first. Most distros will have it in their package managers. In Ubuntu, the package is virtualbox-4.1:
sudo apt-get install virtualbox-4.1In Arch Linux, it's just virtualbox; however additional packages are needed for the necessary kernel modules:
sudo pacman -S virtualbox virtualbox-modulesNext get the shell script that some very nice fellow has made available on GitHub which handles the downloading and setup of the VHDs.