Warning this article may contain opinions of the author that you and iTWire don't agree with.
Visit the last page to have your say in our forum.

No. 1 Story

Telstra adds one million mobile services, but Sensis plummets

Telstra has revealed the addition of almost one million new mobile services in the six months to December 2011, but Sensis revenues plummeted 24 percent in 12 months.

read more

Make Firefox fly: building from a minefield of source

Opinion and Analysis

Scroll through the script; although you may not understand what it is doing, the key points are that an environment variable MOZ_LIB_DIR is set based on your processor type as just shown. This forms the basis for all else that follows. At the end of the script you will see the line

exec $MOZ_LAUNCHER $script_args $MOZ_PROGRAM $MOZARGS "$@"

What this command does is invoke a launcher script, passing in arguments from the user on the command line (the $script_args), the name of the binary program to execute, followed by any arguments worked out by the script we're in now ($MOZARGS) which dictate any region-specific settings.

$MOZ_LAUNCHER is $MOZ_LIB_DIR/firefox-3.0/run-mozilla.sh and $MOZ_PROGRAM is $MOZ_LIB_DIR/firefox-3.0/firefox. So, for people with 32-bit i686 laptops like mine, these are the files /usr/lib/firefox-3.0/run-mozilla.sh and /usr/lib/firefox-3.0/firefox respectively. Let's take a closer look:

[david@dmw ~]$ cd /usr/lib/firefox-3.0
[david@dmw firefox-3.0]$


In this directory you will find, predictably, run-mozilla.sh and firefox. It's the latter, firefox, which is the actual raw binary file that makes up the Firefox web browser. When you invoke 'firefox' from the terminal window or from your window manager's app launcher, it actually runs the shell script in /usr/bin, which in turn runs a shell script here (run-mozilla.sh) which in turn fires up this executable. Phew!

While here, you can also view run-mozilla.sh to see what it does; it's fairly straightforward. It merely sets Firefox running but also turns on debugging options if required and sets the regional settings according to parameters passed in.

You can satisfy yourself that the firefox binary here really is the end of the line by starting it up:

[david@dmw firefox-3.0]$ ./firefox &
[1] 4939


This time, you'll see the browser kick into life, perhaps opening the tabs you were at last time. One of the nice new features in Firefox 3.0 is that it will ask you if you want to save its state when you close down, allowing you to resume a browsing session from that point later on.

Please read on; we'll now check out how big a footprint this takes up and finally get the source code for ourselves.

CONTINUED



- sponsored feature -

The Death of Traditional BI: What’s Next?

How to Make Business Discovery Work for Your Business IP PABX BUYING GUIDE

Business Discovery takes its cues from consumer apps. Like Google, it encourages us- ers to hunt for and explore data without worrying about or even noticing the underly- ing technology. Their entire experience is working within an intuitive interface to get real-time, self-service results with only minimal training. ...more