How to integrate the latest Firefox in Gnome 3 on Debian Jessie

Debian Jessie and Firefox and Gnome may sound like an odd threesome, but Jessie can run Firefox as a native Gnome 3 application. And why would you want to do that? Debian already comes with a perfectly good web browser --- Iceweasel, a rebranded version of Firefox. Why? Because of updates. Firefox updates much more often than Iceweasel. If you want the latest features and the latest bug fixes and security updates, you want Firefox.

Firefox Installation

First download Firefox from the Mozilla site.

Be sure you have the proper version (32 or 64 bit) for the computer you will be installing it on.

We will now install Firefox in /opt. (Where Optional packages go.)

sudo mv Downloads/firefox*bz2 /opt
cd /opt
sudo tar -xvjf firefox*bz2

You will now have a directory called 'firefox'. Close Iceweasel and start Firefox by hand:


(You may see an odd message about GLib, but you can ignore it.)

Ok? Good! If not, have a look at the Firefox Help site.

While we are here, check where Firefox keeps its main icon:

find firefox |grep mozicon

It's probably


Integrating Firefox in the Gnome Desktop

For Gnome to see Firefox, it must have a firefox.desktop file in /usr/share/applications. We will make use of the fact that Iceweasel is basically Firefox wearing a funny hat. The iceweasel.desktop file will serve as our template.

cd /usr/share/applications
sudo cp iceweasel.desktop firefox.desktop

Edit firefox.desktop, changing 'Iceweasel' to 'Firefox'. Well, maybe not all of them. You may want to first strip out the languages that don't apply to you. Suddenly the file gets much smaller!

[Desktop Entry]
Comment=Browse the World Wide Web
GenericName=Web Browser
X-GNOME-FullName=Iceweasel Web Browser
Exec=iceweasel %u

These are the two lines we are most interested in:

Exec=iceweasel %u

Change them to

Exec=/opt/firefox/firefox %u

Reboot your computer so that Gnome will be aware of the changes. You should now be able to find Firefox in the search box, add it to the dork and run it like a normal Gnome application. And you can still run Iceweasel if you like. (Just not both at once.)

Install Firefox updates

Check the menu 'Help | About Firefox'. When there is an update, it will say 'Updates available'. Close Firefox and restart it by hand with root privileges:

sudo /opt/firefox/firefox

The new version will download. After it finishes, click 'Restart Firefox to Update'. Check the menu 'Help | About Firefox' and you will be assured that Firefox is up to date. Close this instance of Firefox and use it normally until the next update. Your web browser is a favorite target for criminals. You are much safer when only Root can make changes to Firefox.

And now...

Now that you know about desktop files... What other applications would you like to make Gnome-aware?

Share this page:

2 Comment(s)