Showing posts from July, 2010

Firefox 3.6 with pretty fonts in Debian Squeeze (easier version)

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

If all the Mercurial and Namoroka in my previous posts about building and installing Firefox 3.6 in Squeeze has your head spinning a bit, here's a simplified version that gets the sources via FTP. As was the case in the previous build, this version enables cairo so you get nicer font rendering. This version also configures the build to use official Mozilla Firefox branding so you don't get Deer Park icons and such.

1) Create a working directory. Use a file manger or whatever you are comfortable with to do this. I called mine ~/firefox-release.

2) Get all the tools and things you need to build Firefox. In a terminal as root (using su):

# apt-get build-dep iceweasel
# apt-get install libasound2-dev libcurl4-openssl-dev libnotify-dev libxt-dev libiw-dev mesa-common-dev autoconf2.13 yasm
# apt-get install libidl-dev

Get and build
1) Get the source code. Open a web browser or ftp…

Fixing font rendering in Debian Squeeze

I guess I'm on a roll with font rendering improvements...

After patching libcario2 in Squeeze, I noticed font rendering in was really awful. It may have been equally awful before and I never noticed. In any case, it's now something that needs attention.

Ugly fonts in have been reported under Ubuntu and other distributions as well. A good explanation of the problem (in Ubuntu, at least) and a workable solution is offered by Mike Kasic about halfway down the bug report at I tried his suggestions on my Squeeze installation, and it worked. If you don't want to be bothered filtering through the bug report, here's the executive summary.

Fixing just the session
Open a terminal and do:
echo "Xft.lcdfilter: lcddefault" | xrdb -merge

Making the fix persist across sessions
echo "Xft.lcdfilter: lcddefault" >> ~/.Xresources

Apply the fix for all users all the time
As root:
# s…

"Installing" handmade Firefox 3.6 in Debian Squeeze

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

Yesterday we saw how to build Firefox 3.6 from sources. This post shows you how to "install" it.

The reason I put "install" in quotes is because it's arguable that what we're going to do is a real installation. In a real Linux installation, you splay the various bits and pieces of your app into /usr/local/bin, /usr/local/share, /usr/local/lib, and various other places (or /usr/bin, /usr/share, /usr/lib if it's an official distribution package). What we are going to do here is take the easy way out--but a way that lots of "packages" take. We're going to dump stuff into /opt.

If you open up {whatever}/firefox-mercurial/192src/objdir-ff-release/dist/bin/ (or wherever you built your sources), you'll see that quite a few of the items in the bin directory are relative links to resources outside bin. If we try a conventional copy of the bin directory to …

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.

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 ic…

Ubuntu font rendering in Debian Squeeze

[Update 2011-06-25: Confirmed. Updating Iceweasel from fixes fonts. See this post for more info. So there's no longer any real need to do what's below.]
[Update 2011-06-24: This whole business may be unnecessary as it appears installing a recent version of Iceweasel from also installs new libcairo2 with decent font rendering. I've yet to do careful comparisons, but it's possible that this solves both "ugly rendering in general" as well as "ugly rendering in Firefox" issues.]
[Update 2011-03-08:]  Reader datSilencer points out that the location of the Arch patch has moved. Therefore, the process for extracting and applying the Arch patch won't work. I am updating the script but I won't be updating this post. If you want to do things manually, please consult the script for the needed changes.]
[Update 2010-09-23: I made a script to semi-automate a lot of the following.]

I love Debian. I r…

Debranding Firefox in PCLinuxOS

I'm not a huge fan of third-party branding. One of my (minor, when put into perspective) gripes about PCLinuxOS is that they sorta go nuts with it. One of the apps that's the target of their branding is Firefox. If you are equally bugged by this, debranding the default profile used as the template for new profiles isn't that hard.
Download the official firefox-3.{whatever}.tar.bz2 archive from Mozilla's servers. Be sure to download the version that's the same as the one that is already installed on your machine.As root, deflate the archive. I am pretending we're in /opt and got a /opt/firefox directory:
# tar -jxvf firefox-3.{whatever}.tar.bz2Again as root, replace /usr/lib/firefox-3.{whatever}/defaults/profile with /opt/firefox/defaults/profileNow you can delete the profiles in ~/.mozilla/firefox. (This will of course wipe out all your old bookmarks, etc. Jump through the needed hoops now if you want to save anything.) When you restart Firefox you'll now get…

Fixing ugly fonts in Sabayon Firefox

I've been taking the Gentoo-based Sabayon rolling release distribution for a spin. One of the things that you'll notice is that some fonts in Firefox look ghastly horrible. Luckily, there's an easy fix. The problem involves the rendering of Helvetica, Lucida, and Times fonts and is discussed (and solved) on the Gentoo mailing list.

Instead of editing /etc/fonts/local.conf, I changed my ~/.fonts.conf file. I got better results using "Sans" than "DejaVu Sans" and in a similar spirit I used "Serif" instead of "DejaVu Serif". My entire .fonts.config looks like: <?xml version="1.0"?> <!DOCTYPE fontconfig SYSTEM "fonts.dtd"> <fontconfig> <!-- see --> <!-- Replace Helvetica with DejaVu Sans --> <match target="pattern" name="family">         <test name="family" qual="any">…