Pages

Showing posts with label Iceweasel. Show all posts
Showing posts with label Iceweasel. Show all posts

June 25, 2011

Squeeze, Fonts, Firefox update

This is good.

This morning I finished upgrading a Lenny installation to Squeeze. (For those of you who might know what's coming next, this installation had the plain old standard libcairo2 -- no patches of any sort.) So far things seem to be just fine. But it's Debian and so this is no big surprise. This is not why I'm writing this post.

The reason for writing this post is to let you know that indeed the rumors are true. Installing Iceweasel 5 from http://mozilla.debian.net/ solves three problems that have plagued lots of Linux users:
  1. Obsolete Iceweasel/Firefox.
  2. Ugly font rendering with official Firefox binaries.
  3. Ugly font rendering everywhere on the system.
You heard it right, folks. Installing Iceweasel 5 in Squeeze brings in a version of libcairo2 with all the yummy Ubuntu font rendering goodness. Like I said, this is good.

But there are a couple small gotchas:

Confusing instructions
The directions given at http://mozilla.debian.net/ are complete, but the order in which the info is given is confusing. So here is what you need to do, in the order in which you need to do it.
  1. Add the following entry to /etc/apt/sources.list or a new file in /etc/apt/sources.list.d/:
    deb http://mozilla.debian.net/ squeeze-backports iceweasel-release
  2. Add the archive key to your apt keyring:
    # wget -O- -q http://mozilla.debian.net/archive.asc | gpg --import

  3. Import it into the APT keyring:
    # gpg --export -a 06C4AE2A | sudo apt-key add -

  4. Update the repository database:
    # apt-get update

  5. Install Iceweasel 5 with the following command:
    # apt-get install -t squeeze-backports iceweasel

Configuring fonts
After I did the above, fonts were still not quite right. So I added the ~/.fonts.conf  file posted here here*. (Blogger, please make it possible to post code with angled brackets!!)

I don't know which is the magic setting responsible for letting the fonts come out all pretty (I suspect lcdfilter), but I'm happy enough with the results now that I'll just be using the setup for a while. It's only a process of elimination to figure out which setting is the key, and once it's found it should be an easy matter to make these the system default so you don't need the ~/.fonts.conf file.

[update 2011-07-11: Changed sources.list addition to reflect changes at http://mozilla.debian.net/.] 
*[update 2011-07-01: I added rgba settings for completeness.]

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.