Mozilla Firefox under Debian Wheezy

Intro

Mozilla Firefox isn’t available as a package for Debian Wheezy – Debian only offers it’s unbranded version called „Iceweasel“. This Iceweasel is (8. Juni 2013) at the Firefox version 17ESR – which is old compared to Firefox (version 21).

Description

First you need to download Firefox for your system. What version you have – 32 or 64 bit – shows this command:

uname -m

Download the version accordingly:

http://ftp.mozilla.org/pub/mozilla.org/firefox/releases/latest/linux-x86_64/

http://ftp.mozilla.org/pub/mozilla.org/firefox/releases/latest/linux-i686/

All commands, which get described now, are also collected below for easy copy-pasting!

The downloaded package gets extracted to /opt:

cd /opt

sudo tar -xvf ~/firefox-*.tar.bz2

Additionally another library has to be installed:

sudo apt-get install libdbus-glib-1-dev

Firefox get’s started via the script, which was originally installed by Iceweasel under /usr/bin/firefox. Hence it has to be adjusted.

sudo gedit /usr/bin/firefox

It has to include afterwards this:

#!/bin/sh  FIREFOX="$(which $0)" [ -x "$FIREFOX.real" ] && exec "$FIREFOX.real" "$@"  LD_LIBRARY_PATH=/opt/firefox/ exec /opt/firefox/firefox "$@" #exec iceweasel "$@"

The last line has to have a „#“ in front of it and before that this line has to be added:

LD_LIBRARY_PATH=/opt/firefox exec /opt/firefox/firefox "$@"

Now the logos get linked properly:

sudo ln -s /opt/firefox/icons/mozicon128.png /usr/share/icons/hicolor/128x128/apps/firefox.png

sudo ln -s /opt/firefox/icons/mozicon128.png /usr/share/pixmaps/firefox.png

For Firefox to show up in the menu, afirefox.desktop description file has to be made:

sudo gedit /usr/share/applications/firefox.desktop

The content can be copied below.

That’s it already!

Commands in one block:

cd /opt

sudo tar -xvf ~/firefox-*.tar.bz2

sudo apt-get install libdbus-glib-1-dev

sudo gedit /usr/bin/firefox

sudo ln -s /opt/firefox/icons/mozicon128.png /usr/share/icons/hicolor/128x128/apps/firefox.png

sudo ln -s /opt/firefox/icons/mozicon128.png /usr/share/pixmaps/firefox.png

sudo gedit /usr/share/applications/firefox.desktop

Content of /usr/bin/firefox:

 #!/bin/sh

FIREFOX="$(which $0)"
[ -x "$FIREFOX.real" ] && exec "$FIREFOX.real" "$@"

LD_LIBRARY_PATH=/opt/firefox exec /opt/firefox/firefox "$@" 
#exec iceweasel "$@"

Content of firefox.desktop:

[Desktop Entry] Encoding=UTF-8 Name=Firefox Comment=Browse the World Wide Web GenericName=Web Browser X-GNOME-FullName=Firefox Web Browser Exec=/opt/firefox/firefox %u Terminal=false X-MultipleArgs=false Type=Application Icon=firefox Categories=Network;WebBrowser; MimeType=text/html;text/xml;application/xhtml+xml;application/xml;application/vnd.mozilla.xul+xml;application/rss+xml;application/rdf+xml;image/gif;image/jpeg;image/png;x-scheme-handler/http;x-scheme-handler/https; StartupWMClass=Firefox-bin StartupNotify=true