CLASS="sect1" BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#0000FF" VLINK="#840084" ALINK="#0000FF" >

4. Patch the Source

Unpatched Mozilla is not a very good X citizen. For example, it does not allow one to specify X and Y geometry position as a command-line option. This is not a big problem on a typical end-user desktop, but in a corporate or public computing environment, it is a killer. In order to fix this, we need to apply a patch to the C++ source code at embedding/components/windowwatcher/src/nsWindowWatcher.cpp. The first step is to obtain and apply the patch written by Robert Riches. This patch has been tested in Mozilla versions 1.0 through 1.2.1.

To apply the patch, simply paste it into embedding/components/windowwatcher/src/nsWindowWatcher.cpp, in your Mozilla source tree. The notation uses "+" symbols to denote the code that needs insertion. Those symbols need to be removed before saving the nsWindowWatcher.cpp text file.

To use the patch, set an environment variable called MOZILLA_SCREEN_POS with the proper coordinates. For example, in Bash, type export MOZILLA_SCREEN_POS='screenx=1,screeny=1' will set the top left corner of your browser to the top left corner of your screen.