Linux HOWTOs

About | Home | Search


ERROR: Slooooow dooooown... this page load was delayed.

HOWTO: firefox
Description: Web browser from the Mozilla project
Click here for ChangeLog
NOTE: I use GNU tar >= 1.13.25 so it's -j for .tar.bz2 files,
it's safe to assume that make, gcc, binutils, fileutils/coreutils, gawk, sed, and grep are prerequisites for almost everything


# Firefox 1.0.1
# =============
# Source instructions are provided below.
#
# The binary download is smaller and it takes A LOT less time to set it up.
# If your primary concern is the time/effort it takes to install Firefox,
# go with a binary installation.  There's a seperate howto covering the
# binary installer.
#
# If you'd like features that the binary doesn't offer, want Firefox built
# specifically for your system, and don't mind the extra time, go for the
# source.

# Using the instructions below, I was able to build Firefox 1.0 from source
# with the following environment:
# Slackware 10.0 (_severely_ modified)
# Linux kernel 2.6.10
# gcc 3.4.3
# X.org X11 6.7.0
# gtk+ 2.4.14
# ...and the latest stable version of the other listed prerequisites

# Prerequisites:
# make
# gcc
# binutils
# fileutils and sh-utils or coreutils
# gawk
# perl
# autoconf
# infozip
# findutils
# XFree86 or X.org
# freetype >= 6.1.0
# libiconv
# libjpeg
# zlib
# libpng
# glib >= 1.2.0
# gtk >= 1.2.0
# pkg-config
# xft (included with X)
# libidl >= 0.6.3

# Back up the plugins that were installed for your previous version of Firefox.
# Make sure this catches everything, and that you don't have any other files
# that need to be backed up.  The howto will "uninstall" the old version of
# Firefox as the developers suggest.
test -d ~/backup/firefox-plugins &&
 mv -f ~/backup/firefox-plugins ~/backup/firefox-plugins-old
test -d /usr/local/firefox/plugins &&
 mkdir -p -m 0700 ~/backup/firefox-plugins &&
 cp -af /usr/local/firefox/plugins/* ~/backup/firefox-plugins/
test -f ~/backup/firefox-plugins/libnullplugin.so &&
 rm ~/backup/firefox-plugins/libnullplugin.so

# Now make sure that Firefox is not running.  Run this to remove the old
# version:
killall firefox firefox-bin
removepkg firefox firefox-plugins jre-symlink mozilla-firefox
test -d /usr/local/firefox && rm -r /usr/local/firefox

# I also have Mozilla, a bunch of plugins, etc., etc. so I just throw all
# of it into ~/installed/mozilla/ and /usr/local/src/mozilla/ so it's easier
# to find.  Feel free to not do that if that's not the case for you.

cd
test -f installed/mozilla/firefox-1.0-source.tar.bz2 &&
 mv installed/mozilla/firefox-1.0-source.tar.bz2 .
test ! -f firefox-1.0-source.tar.bz2 &&
 wget http://ftp.mozilla.org/pub/mozilla.org/firefox/releases/1.0/source/\
firefox-1.0-source.tar.bz2

# Verify tarball w/ md5sum:
# (this came from my gpg-verified tarball)
echo "49c16a71f4de014ea471be81e46b1da8" ; md5sum firefox-source-1.0.tar.bz2

# Verify tarball w/ gpg:
( gpg --list-keys 6D1ECD07 > /dev/null 2>&1 || gpg --recv-keys 6D1ECD07 ) &&
 wget -nc http://ftp.mozilla.org/pub/mozilla.org/firefox/releases/1.0/source/\
firefox-1.0-source.tar.bz2.asc &&
 gpg --verify firefox-1.0-source.tar.bz2.asc &&
 rm firefox-1.0-source.tar.bz2.asc

mkdir -p /usr/local/src/mozilla
cd /usr/local/src/mozilla
find -type d -maxdepth 1 -name "firefox-*-source" -exec rm -r {} \;
tar xjvf ~/firefox-1.0-source.tar.bz2
mv mozilla firefox-1.0-source
cd firefox-1.0-source
chown -R root.root .

# If you use freetype >= 2.1.9 like I do, apply this patch:
wget -nc http://englanders.cc/pub/linux/patches/notmine/\
mozilla-1.7.5-FreeType-2.1.9.patch &&
 patch -p0 < mozilla-1.7.5-FreeType-2.1.9.patch

# You have two common choices for installing Firefox.  Create a tarball
# without the development files that you can unpack into /usr/local/firefox
# (like the installer) or run 'make install' to install binaries in
# /usr/local/bin, libraries in /usr/local/lib/firefox-1.0, includes in
# /usr/local/include/firefox-1.0, etc.  If you're going to use the tarball
# method, change --with-default-mozilla-five-home below to /usr/local/firefox
# (or wherever you're going to unpack the tarball).

cat <.mozconfig
. \$topsrcdir/browser/config/mozconfig
mk_add_options MOZ_CO_PROJECT=browser
mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/obj-@CONFIG_GUESS@
ac_add_options --with-java-include-path=/usr/local/java/include
ac_add_options --with-java-bin-path=/usr/local/java/bin
ac_add_options --with-system-jpeg=/usr
ac_add_options --with-system-zlib=/usr
ac_add_options --with-system-png=/usr
ac_add_options --enable-default-toolkit=gtk2
ac_add_options --with-qtdir=/usr/lib/qt
ac_add_options --enable-application=browser
ac_add_options --enable-strip
ac_add_options --with-default-mozilla-five-home=/usr/local/lib/firefox-1.0
ac_add_options --enable-xft
EOF
mkdir -p mozilla
make -f client.mk build

## If you want to go with the tarball method, run this instead of
## 'make install' below:
# cd obj-i686-pc-linux-gnu/browser/installer
# make
# cd /usr/local
# tar xzvf src/mozilla/firefox-source-1.0/dist/mozilla-i686-pc-linux-gnu.tar.gz

make install
cd
mkdir -p -m 0700 installed
rm -f installed/mozilla/firefox-*-source.tar.*
mv firefox-1.0-source.tar.bz2 installed/mozilla/

# If you ran 'make install' above, add /usr/local/lib/firefox-1.0 to
# /etc/ld.so.conf so apps will be able to find the firefox libraries:
test -d /usr/local/lib/firefox-1.0 &&
 egrep -q "^/usr/local/lib/firefox-1.0$" /etc/ld.so.conf ||
  echo "/usr/local/lib/firefox-1.0" >> /etc/ld.so.conf && ldconfig

# I wrote a small wrapper script for Firefox so other programs can run it
# without trouble.  For example, sometimes apps will run "firefox
# http://whatever/", but that will fail if Firefox is already running.  The
# script will open up the URL in a new tab if Firefox is already running, and
# it will start Firefox normally if not.  If you installed Firefox using
# 'make install' this will rename /usr/local/bin/firefox to firefox.sh and my
# script will run that to start Firefox.  If you installed Firefox from the
# tarball, it will run /usr/local/firefox/firefox instead.
test ! -d /usr/local/firefox &&
 ( cd /usr/local/bin
   test ! -f firefox.sh && test -f firefox && mv -f firefox firefox.sh
   test -f firefox.sh && test -f firefox && mv -f firefox firefox.old &&
    chmod -x firefox.old )
test -d /usr/local/firefox &&
 ( cd /usr/local/bin ; mv -f firefox firefox.old ; chmod -x firefox.old )
cd /usr/local/bin
wget -O firefox http://englanders.cc/pub/linux/misc/firefox.sh
chmod +x firefox

# If you don't use the script, if you installed Firefox with 'make install',
# you can just run firefox (in /usr/local/bin).  If you installed it from a
# tarball, either add /usr/local/firefox to your PATH, symlink
# /usr/local/firefox/firefox to /usr/local/bin/firefox, or make sure that
# you run it with the full path every time: /usr/local/firefox/firefox.

# Make sure you start Firefox once as root before any other users use it

# /usr/local/src/mozilla/firefox-1.0/widget/src/gtk/mozicon50.xpm (or
# /usr/local/firefox/icons/mozicon50.xpm) can be used as a desktop icon.
# I converted it to a png and put it here if you'd rather use that:
# http://englanders.cc/pub/linux/misc/mozicon50.png


# Plugins
# =======
test -d /usr/local/firefox/plugins && cd /usr/local/firefox/plugins
test -d /usr/local/lib/firefox-1.0/plugins &&
 cd /usr/local/lib/firefox-1.0/plugins

# Restore your plugins (or reinstall them again) if you upgraded from an
# older version of Mozilla:
test -d ~/backup/firefox-plugins && cp -a ~/backup/firefox-plugins/* .

# If you have Sun's Java SDK installed.  I've only tried it with Sun's JDK
# version 1.4.2_01 but it should be the same for other versions and for
# Blackdown's port too.  If you use gcc 3.x, do this:
test -f /usr/local/java/jre/plugin/i386/ns610-gcc32/libjavaplugin_oji.so &&
 ln -sf /usr/local/java/jre/plugin/i386/ns610-gcc32/libjavaplugin_oji.so
## and if not, do this:
# test -f /usr/local/java/jre/plugin/i386/ns610/libjavaplugin_oji.so &&
#  ln -sf /usr/local/java/jre/plugin/i386/ns610/libjavaplugin_oji.so

# If you have Adobe Acrobat Reader installed, do this to enable it's plugin:
test -d /usr/local/Acrobat5 &&
 ln -sf /usr/local/Acrobat5/Browsers/intellinux/nppdf.so

# If you have RealPlayer installed:
test -d /usr/local/RealPlayer8 &&
 ( ln -sf /usr/local/RealPlayer8/rpnp.so
   ln -sf /usr/local/RealPlayer8/raclass.zip )

# See the flash player howto if you'd like to install it

# See the mozplugger howto to install it

# See the mplayerplug-in howto if you'd like to install it

Back to the list


Last updated: Tue, 07 Aug 2018 12:06:17 -0400
Jason Englander <jason at englanders dot us>