September 09, 2003

Enabling the Gecko Engine

This is an ambitious post for a new blog, but I thought it was worth sharing:

The Mozilla web browser is a great alternative to Internet Explorer -- especially since Microsoft has stated future IE versions may only come with each new Windows version. That's a long wait. Mozilla is moving along nicely, and looks to be more standards-based than IE.

So what's Gecko? It's Mozilla's and Netscape's HTML rendering engine. IE also installs its own HTML rendering engine, which is used by many other programs to display HTML (i.e., web-based) content on your PC. That's why some programs require IE to be installed on your PC to work.

However, while the current Mozilla 1.4 release installs the Gecko engine, it doesn't actually enable it for other programs to use. The good news is that after you manually enable it, some newer programs will let you choose between the two rendering engines. And having choices is a good thing in this MS-dominated era.

Two such programs I use are:
HTML-Kit: A free, yet fully-featured web editor used to design this blog, and
NewzCrawler: My favorite RSS news aggregator.

In particular, HTML-Kit will let you preview your web pages within the program using both IE's and Mozilla's engines, so you can compare them literally side-by-side on the screen. A very handy feature indeed when doing web design. However, there's not too much reliable documentation available on the web, so I created my own.

It's a bit techie in nature, just to warn you. If you're not comfortable tweaking your Windows settings, then find someone who is, or make sure you fully back up your PC before trying this. I don't want to anyone to muck up their PC, even though most of these steps are pretty benign.

Note: These steps are specific to Mozilla 1.4, as the path Mozilla uses in step 4 has changed between version releases.

After installing Mozilla 1.4 in Windows:

1) Download the Mozilla 1.4 ActiveX zip file from the Mozilla ActiveX Project.

2) Unzip the files to the proper location:

Using WinZip (or your favorite Zip program), unzip the files contained in the above Zip file to C:\Program Files\Common Files\\GRE\1.4f_2003062408. Make sure to check the options for using the folder paths in the zip file -- otherwise they won't be unzipped into the proper subdirectories, and it won't work.

3) Register the Mozctlx.dll file in Windows:

Launch the command prompt:

In Windows 9.x and ME:
Click on Start, Run. Then type "command" without the quotes and press ENTER.

In Windows NT, 2000, and XP:
Click on Start, Run. Then type "cmd" without the quotes and press ENTER.

Next, for all Windows versions:
In the black command window, type in the following line exactly as follows, and press the ENTER key:

regsvr32.exe "C:\Program Files\Common Files\\GRE\1.4f_2003062408\mozctlx.dll"

You should see a message dialog stating that the file was successfully registered within Windows.

4) Edit the windows path statement to append the following text to the path:

"C:\Program Files\Common Files\\GRE\1.4f_2003062408"

In Windows 9.x and ME:

Edit the Autoexec.bat file in the root directory, and add this path to the end of the Path line. Don't forget to put a semicolon immediately before and after this path text. If you don't have a Path line, add one by typing:
Path="C:\Program Files\Common Files\\GRE\1.4f_2003062408";
Note that you need to add the quotes above due to the long directory names.

In Windows NT, 2000, and XP:

You don't edit the Autoexec.bat, but you'll need to add a user environment variable to Windows. The exact steps vary slightly between these three Windows versions, and I was able to document them for NT and XP:

On the Windows desktop, right-click on the "My Computer" icon, and left-click on "Properties".

- In Windows NT, click on the "Environment" tab.
- In Windows XP, click on the "Advanced" tab, and then on the "Environment Variables" button at the bottom.

In the "User Variable" section, look for a "Path" variable and select it. Add the path in quotes and separate it with a semicolon.

If the "Path" variable doesn't exist in the user variables, click on the "New" button, and type in "Path" (no quotes) for the variable name, and "C:\Program Files\Common Files\\GRE\1.4f_2003062408" (with the quotes) in the "variable value" field. Click on each of the OK buttons to close all of the dialog boxes. You might need to reboot for the changes to be effective.

You're now done with the hard stuff.

5) Set your other programs to use Gecko:

This varies with each compatible program, so I've provided some examples:


- Launch the program.
- Click on Edit, Preferences, Startup tab.
- Check these two boxes: Detect browsers and Detect programs
- Click on OK to save.


- Launch NewzCrawler.
- Click on Tools, Preferences.
- With "General" highlighted in the left pane, click on the "Use render engine" pull-down menu under "HTML Render engine" section on the right.
- Click on "Mozilla (Gecko)" to select it and click on OK.
- Close and re-launch NewzCrawler to make it effective.

That's it!

Topic(s):   Web Wizardry
Posted by Jeff Beard