Wednesday, July 24, 2013

Installing official Mozilla builds of Firefox and Thunderbird on Debian

The Debian GNU/Linux distribution includes their own versions of Firefox and Thunderbird, rebranded as Iceweasel and Icedove, which are maintained with security updates for the life of the release. However, some people prefer to use the official Mozilla releases to get the most up-to-date versions. They come in a simple archive file that you can unpack and run right from your home directory, but what if you want to install them system-wide and have them included in the applications menu? Here is how I do it.

First, download the appropriate tarball for your system. The 32-bit builds are easy enough to find (see links above), but if you want to get a 64-bit build they can be found at https://download.mozilla.org/?product=firefox-latest&os=linux64&lang=en-US and https://download.mozilla.org/?product=thunderbird-latest&os=linux64&lang=en-US (note the locale at the end). Simply place the unpacked directories in /usr/local/bin.

The easiest way to keep Firefox and Thunderbird up-to-date is to use the built-in automatic update feature. In order for this to work, Firefox and Thunderbird need to be owned by a user who will actually run them on a regular basis. In my case, they are owned by my user account. Other users who have an account on my machine can use them, but all of the updates get installed by my user. You can just chown -R user /usr/local/bin/firefox, etc.

Now we just need to get them put into the applications menus. For this, we just need to put .desktop files in /usr/local/share/applications.

firefox.desktop should look something like:

[Desktop Entry]
Type=Application
Name=Firefox
GenericName=Web Browser
Exec=/usr/local/bin/firefox/firefox %u
Icon=/usr/local/bin/firefox/browser/icons/mozicon128.png
Comment=Browse the World Wide Web
Terminal=false
X-MultipleArgs=false
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


thunderbird.desktop should look something like:

[Desktop Entry]
Type=Application
Name=Thunderbird
GenericName=Mail Client
Exec=/usr/local/bin/thunderbird/thunderbird %u
Icon=/usr/local/bin/thunderbird/chrome/icons/default/default256.png
Comment=Read/Write Mail/News with Thunderbird
Terminal=false
X-MultipleArgs=false
Categories=Network;Email;News;GTK;
MimeType=message/rfc822;x-scheme-handler/mailto;
StartupWMClass=thunderbird-bin
StartupNotify=true


For KDE 4, you may need to run kbuildsycoca4 to update the menus. Now you should see the official builds of Firefox and Thunderbird in the applications menus.

 Firefox icon on Gnome 3 menu on Debian Wheezy

Firefox and Thunderbird icons on KDE 4 menu on Debian Wheezy

Update: I now have a video on DailyMotion demonstrating these steps.

No comments:

Post a Comment