Tony's ramblings on Open Source Software, Life and Photography

Running IE7 in Linux

As a web developer, you need to be able to test multiple browsers. As a Linux web developer, it can be hard to do that without having a Windows machine around.

With the latest edition of Wine (Windows emulator for Linux) it's not that hard to do. There are a couple of downsides, like transparent images sometimes don't render properly, and there's a bit of a problem with the background around the control buttons, but it works and it renders pages using IE7, which is the entire point, anyway. The biggest downside is the lack of HTTPS or SSL support.

I'm going to make the assumption you are using Ubuntu Jaunty, so you might need to adapt a few things if you aren't.

First, I'd recommend using the latest edition of Wine, instead of the one packaged with your system. This is especially important if you plan on running any recent games in Wine. You can compile your own copy from the sources, or just use the provided repositories from winehq. The package provided with Ubuntu is very old in Internet days, so I don't recommend using it.

Once you have Wine installed, the first thing we want to do is add a few special Windows libraries that will make IE7 work properly. Download "winetricks" from this link by right clicking on the link and saving it to disk. This is an executable script that will make your life much easier. Once you've downloaded it, right click on the file and pick Properties.
On the Permissions tab check the box for "Execute".

Now, double click winetricks and install the following packages:

comctl32
comctl32.ocx
gdiplus
msls31
msxml3
msxml4
msxml6
riched20
riched30
tahoma
fontfix
liberation
mfc40
mfc42
msls31
pdh
riched20
riched30
urlmon
wininet
native_mdac
vcrun2005sp1
vb6run

Once these are installed, open up Wine Config (either from your applications menu or by typing "winecfg" at a console.) On the Libraries tab make sure you have the following overrides set:

browseui (native, builtin)
comctl32 (builtin)
crypt32 (native, builtin)
gdiplus (native)
hhctrl.ocx (native, builtin)
hlink (native, builtin)
iernonce (native, builtin)
iexplore.exe (native, builtin)
itircl (native, builtin)
itss (native, builtin)
jscript (native, builtin)
mlang (native, builtin)
mshtml (native, builtin)
msimtf (native, builtin)
msvcrt (builtin)
mscml3 (native, builtin)
odbc32 (native, builtin)
odbccp32 (native, builtin)
oleaut (builtin)
riched20 (native, builtin)
riched32 (native, builtin)
secur32 (native, builtin)
shdoclc (native, builtin)
shdocvw (native, builtin)
url (native, builtin)
urlmon (native, builtin)
usp10 (native, builtin)
uxtheme (native, builtin)
wininet (native, builtin)
wintrust (native, builtin)

Now, download Internet Explorer 7 from Microsoft's site. After it's downloaded you should be able to double-click it to run it with Wine. During installation, uncheck the box to download updates, and after installation tell it to go ahead and reboot (Linux will not reboot, don't worry.)

With any luck you should now have an Internet Explorer icon under your Wine menu. If it doesn't show up, you can create a starter icon to it that does this:

wine "~/.wine/drive_c/Program Files/Internet Explorer/iexplore.exe"

One last tip to make things look a bit better - go into the Wine Configuration panel and under "Desktop Integration" set the "Controls Background" color to be the same as your Linux theme window backgrounds.


To install flash is easy as well. Download the flash archive zip file from Macromedia. Open this archive, look in the 10r32_18 folder and extract the flashplayer10r3218_winax.ece.exe file. Run this file (which should automatically run with Wine now) and it will install Flash into IE7 for you. It runs a bit slow, but it works.




PLEASE NOTE: Some of the above packages installed by winetricks require that you own an actual copy of Windows to be able to use them. Since most new computers come with Windows anyway, it shouldn't be a problem... but you should be aware that what I'm listing above does NOT rely entirely on open-source software but uses software that is copyrighted by one or more companies.


Categories:
Tim's picture

Without having a windows

Without having a windows machine around, (as claimed at the top of the page), this installation is just NOT possible.

Some of the libraries, we should install with winetricks, require a valid visual c++ license. A pure Linux user won't have this.

Then installing msie7 (from m$, this couldn't come out well...) requires a valid XP or server 2003 license. Again a pure Linux user won't have this.

Thus this article is crap that can't be legally applied. The only solution for pure Linux users would be an msie clone NOT made my m$. As long as such a thing is not available, we will have to tell our visitors that our pages are not tested with msie and that they should use a better browser.

tony's picture

Did you even...

Did you even read the text above highlighted in yellow about licenses?

Post new comment

The content of this field is kept private and will not be shown publicly. If you have a Gravatar account associated with the e-mail address you provide, it will be used to display your avatar.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd> <br> <p>
  • Lines and paragraphs break automatically.

More information about formatting options

CAPTCHA
This question is for preventing automated spam submissions. It is case sensitive.
Image CAPTCHA
Enter the characters shown in the image.