Follow the Australian Telecommunications scene NEWSLETTER- FREE TRIAL
The Linux distillery
Bringing the world of Linux to you, David cuts through the tech and shows you how it works and how to use it, in terms that apply to any distro. RSS
Technology news and Jobs arrow The Linux distillery arrow Make Firefox fly: building from a minefield of source
Make Firefox fly: building from a minefield of source E-mail
by David M Williams   
Monday, 30 June 2008
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



 
< Next story in category   Previous story in the category >
iTWire user statistics Visitors last 30 days
694,279
Subscribers 15,210
#1 independent technology news advertise here
  •   *  
  • Search
  • AdvSeach
  • Login
  • Events
  • FreeStuff

- Advertisement -

Featured Whitepapers

Follow iTWire on Twitter

About iTWire

iTWire is all about technology news, information, jobs and community for the IT and telecommunications industry professional. Subscribe to our free ICT daily newsletter