25 June 2011

Fixing ugly LibreOffice UI in Squeeze

I removed OpenOffice.org from my recently Lenny-to-Squeeze updated machine and installed LibreOffice from backports instead. A succinct how-to for doing that is available here.

The installation went without a hitch, and LibreOffice started just fine. But the UI was ghastly, horribly, I would-rather-look-at-and-smell-a-garbage-bin ugly.

Easy fix:

# apt-get -t squeeze-backports install libreoffice-gtk

Aaah.

There is a libreoffice-gnome package as well. I don't know what the difference is yet, but I suspect it would be a good idea to go through all the libreoffice backports for Squeeze to see if there's anything else I missed.

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.]

11 June 2011

Colorful GNOME-colors

One of my favorite icon sets is the GNOME-colors series. The shapes, contrast, perspectives, and luster (not too shiny) are all just right. One thing that wish it had a bit more of though was color diversity. When you use gnome-brave, for example, things become just a bit too blue for my taste. And I don't mean from just an aesthetic perspective--it impacts usability for me as well.

So, I wrote a little (translation: longish) script that will make a new hybrid icon set from all the icon sets in the whole GNOME-colors pantheon. The script was written for Ubuntu/Debian and is I hope self explanatory. The basic idea is that it makes a copy of one of the sets (I chose gnome-brave because it's closest to what I want) and then selectively copies over the bits from the other sets. Hacking the script for other distributions and/or local installations should be pretty straight forward. The script includes a full list of the icons that are part of the Ubuntu package; ones that do not deviate from the default are commented out.

After running the script, you will have to move the directory it generates to ~/.icons or to /usr/local/share/icons.

Odd and pesky details:
  • Requires at least bash 4.  
  • Assumes you have the gnome-colors package installed.
  • Don't try running this from within Geany. For some reason, Geany chokes on declare -A statements. It works just fine if you run it inside a terminal.
You can download the script from http://download.tuxfamily.org/skinny/misc/make-gnome-colors-hybrid.sh. I would show it here except that I'm tired of fighting Blogger's inability to properly implement pre and code tags or provide some other means of sharing code without messing it up.