Friday, October 12, 2007

Run Internet Explorer on Linux

Most Linux users would be appalled by the idea of attempting to contaminate a Linux installation with any Microsoft product, especially Internet Explorer. However, many Web sites don't render properly using regular Linux browsers, such as Firefox or Konqueror. Other sites either require ActiveX controls or are designed to work only with Internet Explorer. Also, how can you test your new Web design and JavaScript for IE if you're an Apache and Linux maven?

For those who may have the need for Internet Explorer without the need to move to another machine or reboot, there is a solution for you: an extremely useful project aptly named IEs4Linux. In this article, I will describe how to install and begin using multiple versions of Internet Explorer using Wine and IEs4Linux.

What's IEs4Linux?

IEs4Linux is a small shell script that can be run via console on any Linux machine with Wine installed. As the title suggests, it allows you to quickly and easily install that most infamous of Microsoft products: Internet Explorer.

The creator of IEs4Linux is Sérgio Luís Lopes Júnior, a 21 year old Brazilian student and self-proclaimed lover of Linux and OpenSource. Naturally, being open source, IEs4Linux is free. However, as with many people working on open source projects, Sérgio's funding comes from the community; if you found IEs4Linux helpful, you can PayPal him a few dollars to continue development of the project.

IEs4Linux relies on the Wine project to supply an implementation of the Microsoft Windows API. The IEs4Linux script actually downloads the required CAB files directly from the Microsoft site; then, using cabextract, copies the files to a new Wine profile. This way, your existing Wine profiles are not affected, and any other software you have running will be just fine. In addition to installing Internet Explorer versions 5, 5.5, and 6, IEs4Linux also can install Flash 9 for you from Adobe.

IEs4Linux is a GPL product; however, Internet Explorer is a copyrighted product of Microsoft. This means that you will need to be in possession of a valid Windows license version greater than 95, although it will not be asked for during the installation process.

Author's note

For the purposes of this article, I'll assume you're running the latest version of Ubuntu as your Linux distribution. IEs4Linux will work with almost every distribution, but the installation routine varies. This article assumes that you already have Ubuntu Desktop installed and operational.

Depending on how you like to install your software, I have included two sets of instructions, first the graphical (GUI) method and lastly the console (CLI) method.

Installing the required packages

To install all the applications required to enable IEs4Linux to run properly, ensure that you have the Universe repositories enabled. Open the Software Sources configuration screen, which can be found under Toolbar | System | Administration | Software Sources.

Next, you need to select all the repositories for the CD-ROM/DVD option. You won't need this option. The online repositories are kept up-to-date, as shown in Figure A. Press the Close button when you're finished.

Figure A

,

Selecting the required repositories to install Wine and cabextract.

Now it's time to begin installation of the required packages. Go to Toolbar | System | Administration | Synaptic Package Manager. Once it opens, search for Wine and cabextract. Once you find them, press Apply, as shown in Figure B.

Figure B

Installing Wine and cabextract.

Kickin' it old school with the console

You can also obtain the files from the console prompt. To begin, open a console. You can do this by going to the toolbar and going to Application | Accessories | Terminal. In the terminal, run the command: apt-get update && apt-get install cabextract wine. The install process will begin after pressing [Enter]. The apt-get process download installs all the files and packages for wine for you.

Getting down to business

Now that you have Wine installed with cabextract, it's time to download the IEs4Linux files. You can either go to the IEs4Linux Web site, or return to a console to enter this command to download the latest IEs4Linux build:

wget http://www.tatanka.com.br/ies4linux/downloads/ies4linux-latest.tar.gz

Figure C shows what this looks like.

Figure C

Downloading the IEs4Linux Installer.

After you have downloaded the latest build tarball, you need to cd to the directory where you downloaded tarball to if you did not do so from the console. This can be done easily with the command cd ies4linux-*. Next, enter the command tar xzvf ies4linux-latest.tar.gz in the console to decompress the tarball and change directories into the build directory. Finally, to launch the IEs4Linux script that will begin the installation process, type ./ies4linux.

You will be lead through a text-based series of screens that will ask you questions about what versions of Internet Explorer you want to install, as shown in Figure D. The first question asked will be if you wish to install version 5 and 5.5 of Internet Explorer; you can make that decision for yourself. In addition to installing Internet Explorer, IEs4Linux will also install the Flash Player plug-in automatically.

Figure D

Running the IEs4Linux Installer.

After a few minutes, the script will download all of the required files and install them on your computer automatically. Additionally, links on your desktop will be created to Internet Explorer making for quick access. The Internet Explorer launch binaries will exist in the newly created directory bin in your home directory. For quick access on command line, run ~/bin/ie6 to launch Internet Explorer version 6. You'll see IE run, as shown in Figure E.

Figure E

You should now have Internet Explorer running in Linux.

Congratulations; you have successfully installed Internet Explorer version 5, 5.5, and 6 on your PC. With the assistance of IEs4Linux, it is possible to have Internet Explorer accessible to you as a tool on any Linux system that can run Wine.

Variations in other distributions

The install process for other distributions will be different according to that distro's package system. But the rest is the same after that. For example, in Gentoo, the series of commands would be:

emerge --sync && emerge wine cabextract.

For Fedora, the commands to install wine and cabextract are:

yum -y install wine*
yum -y install cabextract

For Mandriva, the directions are:

urpmi wine cabextract

For more distributions and instructions, please visit the IEs4Linux site.

Known issues

There are a number of known issues with the Internet Explorer version installed by IEs4Linux. Some of these include:

  • VML does not work.
  • PNG transparency does not work even when using hacks (a consequence of the "CSS filter" bug).
  • Windows Update does not work.
  • JavaScript error dialog does not open.
  • Modified toolbars are not saved.
  • ActiveX may not work with some special cases.

The install of Internet Explorer made by IEs4Linux doesn't have the JavaScript debugging enabled by default, which can be quite frustrating when you know there is a bug on the page, but can't get the error message. To get around this, you will need to enable JavaScript debugging.

In the menu bar, go to Tools | Internet Options to open the Internet Options dialog. Next, press on the Advanced tab and scroll down to the Browsing section. Uncheck the list item Disable Script Debugging.

0 comments: