Pages

Showing posts with label IceCat. Show all posts
Showing posts with label IceCat. Show all posts

July 13, 2010

Firefox 3.6 with pretty fonts in Debian Squeeze

[Update 2011-06-25: You should consider this post obsolete. See this post for more info.] 

Iceweasel 3.6 has yet to trickle down to Debian Testing and very well may not make it before the freeze. However, some of us would like to have some 3.6iness in spite of this. If you've tried downloading SwiftFox, IceCat or the Firefox 3.6 binaries, you know that you get a 3.6, but the font rendering looks poopy.

Here's what I did to compile FF 3.6 from sources and get the same smooth font rendering that you get with Iceweasel 3.5 from the Squeeze repo. I'm not an expert, but this seems to have worked.

The following is based mostly on Mozilla's documentation on a Simple Firefox Build and Linux Prerequisites.

Preproduction
First, create a working directory. I called mine firefox-mercurial. The reason for the name will become obvious shortly.

Next, get the tools you need to build stuff. Since there's no firefox package in the Debian repos, I used (as root):

# apt-get build-dep iceweasel

Then install a bunch of other stuff that is supposedly needed:

# apt-get install mercurial libasound2-dev libcurl4-openssl-dev libnotify-dev libxt-dev libiw-dev mesa-common-dev autoconf2.13 yasm

You will also have to add:

# apt-get install libidl-dev

This isn't documented anywhere that I know of. I found this out the hard way after my first attempts to compile failed.

Get sources
With a regular user terminal open in firefox-mercurial, use mercurial to get the sources:

hg clone http://hg.mozilla.org/releases/mozilla-1.9.2/ 192src

This will get you the latest, most update, bleeding edge version of 3.6--which may or may not be the same as the release version. For example, at the time of this writing, the latest version is 3.6.8pre and the latest release is 3.6.6. To specify the exact version you want, use #{tag}, where {tag} is  one of tags listed at http://hg.mozilla.org/releases/mozilla-1.9.2/. For example, to get and build FF 3.6.6:

hg clone http://hg.mozilla.org/releases/mozilla-1.9.2/#FIREFOX_3_6_6_RELEASE 192src

Getting the sources will take a long time, but not nearly as long as compiling will later on.

Next we need to move into the 192src directory and set up the mozconfig file that tells the system how to build firefox:

cd 192src
echo '. $topsrcdir/browser/config/mozconfig' > mozconfig
echo 'mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/objdir-ff-release' >> mozconfig
echo 'mk_add_options MOZ_MAKE_FLAGS="-j4"' >> mozconfig
echo 'ac_add_options --disable-debug' >> mozconfig
echo 'ac_add_options --disable-tests' >> mozconfig
echo 'ac_add_options --enable-optimize' >> mozconfig
echo 'ac_add_options --enable-system-cairo' >> mozconfig


The objdir-ff-release is the name of the directory that built stuff will end up in. You can change this name if you want. The line with --enable-optimize is optional. The last option above, --enable-system-cairo, I found looking through the list of available options, and I'm pretty sure it's what gives you nice font rendering in GTK+ environments.

Build the beast with

make -f client.mk

The build will take forever. Once the compile is done, the binaries will be in
{whatever}/firefox-mercurial/192src/objdir-ff-release/dist/bin/.
Execute the file firefox to make it go.

When you make it go, you'll notice that the app is identified by its code name, Namoroka.

Updating
I have not yet tried this, but according to Mozilla's documentation, to build a new version you'll need to update the sources with

hg pull -r default
hg update


I suspect you do this in the 192src directory and I suspect you'll need to rebuild as above afterward. Also, I suspect that in place of default above you'll want to use a valid tag (as when you first cloned the sources), but until I actually update I won't be able to say for sure.

Extra credit
Once I've done some more testing, I will be move the built files to /opt/firefox and add a *.desktop entry for it. The big question is whether I should call it 'Firefox' or 'Namoroka'.

March 28, 2010

GNU IceCat and file managers


There's no shortage of essentially identical Mozilla-derived browsers in Linuxspace now. Firefox is the official Mozilla product. Two better known variations are Iceweasel--a Debian project that replaces the not-really-covered-by-a-free-license Mozilla branding stuff in Firefox with really-covered-by-a-free-license branding, and Swiftfox--which offers processor-specific optimized compiles of the Mozilla code.

Perhaps a lesser-known variant (as of this writing) is GNU IceCat. IceCat is very similar to Iceweasel in that its main purpose for being is to remove the non-libre Mozilla bits from Firefox. It goes one step further than Iceweasel in its pursuit of libreness in that it redirects its add-ons explorer to a GNU-maintained list of add-ons that are fully-libre. Don't worry--you can still install any add-on that you can in normal Firefox by visiting Mozilla's add-on site. Seems like a winner: promoting libre software without limiting the use of proprietary software.

However, more interesting than the above for me is something I've found to be case with the latest version of IceCat that is not the case with the other three. In any of the other three (or four if you count hand-installing the official Mozilla binaries rather than the Ubuntu and Debian packages), no matter what I've tried, I have not been able to tell the browser in the downloads dialog to "open containing folder" using the file manager of my choice. Whatever I've tried, they all insist on opening folders in Nautilus. However, IceCat has a file: application type with which you can set the desired file manager just as you might with any other type. And there was much rejoicing.

The weird thing is that I seem to recall that the file: application type was present in older versions of Firefox--e.g. as included in Jaunty. So I don't know if the current lack of the file: type is a temporary abnormality or the sign of things to come on all fronts. Whatever the case, IceCat is my default browser on my Debian machines because I tend to use a custom Openbox/Thunar environment most of the time. It not my default on Ubuntu because it--along with Swiftfox and the binaries directly download-able from Mozilla--does not respect your system font rendering settings. (It's always something, isn't it?)

There's a PPA for Ubuntu users and deb packages for 32-bit Debian users if you wanna give it a go.