April 29, 2004 Edition

By Stephan Windischmann (mailto:windi@arslinux.com), Adam Israel (mailto:stone@arstechnica.com)


A meeting of the foundations

We're back from chilling at Penguicon 2.0 (http://www.penguicon.org/) in Novi, Michigan a couple of weeks ago. In this issue, we talk about the meeting between the GNOME and Mozilla foundations on better collaboration, and we show you how to use OS X icons with GNOME or KDE.


GNOME and Mozilla Foundations meet

On April 21st, representatives from GNOME (http://foundation.gnome.org/) and the Mozilla Foundation (http://www.mozilla.org/press/mozilla-foundation.html) met and talked on how they could collaborate better. Brendan Eich from mozilla.org originally had some ideas (http://groups.google.com/groups?as_umsgid=40724396.1000303@meer.net) on how such a synergy could work. While they discussed working together more closely and forming some sort of alliance, it is too early to definitively describe what this kind of collaboration will mean for users. One item on the agenda is the need for innovation and evolution of the Linux/GNOME platform into a cost-effective, standards-compliant, open-source platform.

The web, while it is stagnant currently, is likely to change once Longhorn is released and gains a sizable following. For that reason, Mozilla and the Gecko rendering engine, which is the standard for the GNOME desktop, cannot stagnate; it needs to adapt and support up-and-coming technologies such as XAML. Both foundations would like for the GNOME/Mozilla platform to become a viable competitor on the desktop market, and with Microsoft combining the web and desktop rendering teams into one, Nat Friedman of GNOME believes that the options are:

Both foundations believe that due to the delayed Longhorn release, now is the right time for Linux to establish a push into the desktop market.

Other things discussed where methods to make sure that technology is not worked on in parallel by both groups, and to make sure that technology, as well as code libraries and APIs, can be used portably. Firefox was discussed as well. Work done on that browser by IBM, Sun Microsystems, as well as others, will be merged with the codebase, and Jeff Waugh entertained the idea that Epiphany could serve as the Linux port of Firefox.

For those interested, the detailed minutes (http://mail.gnome.org/archives/foundation-list/2004-April/msg00008.html) of the meeting are available on foundation-list.


A new way to find bugs

Bugs plague all software, no matter whether big or small, open-source or closed. Reporting bugs is a great way to help your favorite software project. However, many users including people that should know better (me), fail to report many bugs they encounter, because the process is often an annoyance.

This is where the Berkeley's Cooperate Bug Isolation Project (http://www.cs.berkeley.edu/~liblit/sampler/) comes in. The project provides specially-modified RPM packages of software which monitor their operation and report successful operations as well as failures back to the developers. The project provides RPM packages for Red Hat 9, which are available from their page (http://www.cs.berkeley.edu/~liblit/sampler/downloads/). Check there for yum and Red Carpet information. Currently, these instrumented RPMs are available for Evolution, GAIM, gnumeric and rhythmbox, as well as some older packages for Ximian Desktop 2.

Ensure that you check out the project's Privacy (http://www.cs.berkeley.edu/~liblit/sampler/learn-more/#privacy) section if you're worried about what data is being collected. In order for the project to be more successful, they need more users. Projects like Rhythmbox (http://mail.gnome.org/archives/rhythmbox-devel/2004-March/msg00132.html) have already been able to use this data to fix several critical bugs in their software.


TTT: Tools, Tips and Tweaks converting Macintosh icons to PNG for a prettier desktop

I like eye candy, especially in icon form. That's why I was excited to see that The Icon Factory (http://www.iconfactory.com/news.asp) released some Matrix icons (http://www.iconfactory.com/Preview.asp?type=show&id=200) to celebrate the release of the Matrix Revolutions DVD. Unfortunately, the only available icon formats were standard Windows icons (.ico) and Mac OS X-specific formats. Neither of these were useful to me, so I set out to convert these icons to a more portable format PNG.

I chose to use the standard Macintosh Icons available from the Icon Factory. They turned out to be the easiest format for me to convert and still retain the alpha transparency.

You will need to download and install a few programs in order for this conversion to work. For those of you morally opposed to using close-source software, shame on you for even considering using Macintosh icons on your Linux desktop. Begone with you! (Just kidding, we still love you.)

First, you need to get a trial version of StuffIt for Linux (http://www.stuffit.com/unix/). This is the closed-source software I mentioned above. As far as I know, this is the only package that will extract the Macintosh .bin files under linux. I'd love to be proven wrong, though.

Next, download yourself a copy of icns2png (http://www.bearca.com/software/icon2png-linux.php)|mirror (http://www.freewebs.com/linux-storage/icon2png-0.5.tar.gz). This handy little tool is the key to success.

I've written a small shell script that will do all of the manual work that goes into successfully converting the Macintosh icons to PNG. You can skip ahead and download the final product or keep reading to see the process in action.

Extracting the .bin/.hqx

The first step in the process is to extract the data to disk so we can work with it. Unstuffing the data is actually a two-step process. The first time we unstuff the file, it deflates into a .data and .info file. I'm not sure what specifically is contained in the .info file, but we can disregard it. The second step will actually extract the icon data to a temporary directory.

tmp="`mktemp -d -t "XXXXXX"`"
unstuff -q -d=$tmp $1
cd $tmp
sit=`find . -type f -maxdepth 1 -name '*.data' -printf '%f'`
unstuff -q -e=unix -m=auto -t=on "$sit"

Fixing the filename

When unstuff extracts the icon files, it leaves a carriage return (\r) embedded within the filename. Whoops. Our next step is to find all of the icon files and strip the control codes from the filename.

find "$tmp" -type f -name '*' -print  | while read name ; do
  if echo "`file "$name"`" | grep 'MacBinary' > /dev/null 2>&1; then
newname="`echo $name | tr -d [:cntrl:]`" # Strip control codes from the name
    if [ ! -f "$newname" ]; then
  mv "$name" "$newname"

Converting to PNG

Now that the filenames are fixed, we can get to our ultimate goal, converting the icons to png. This is a straightfoward process. Just tell icns2png what icon to convert and it will create the PNG . You may see a segmentation fault as you run icns2png. That just means that the file it tried to convert was not a valid icon.

icns2png "$newname" > /dev/null 2>&1

The final step will move the converted PNG to a new directory, based on the name of the archive holding the icons. The naming convention of the icons changes between icon sets, so coming up with a common naming theme is a more complex task. I decided to simply name the new icons numerically to prevent duplicate files from being created.

stone@durin:~/icons/woad_icn$ ls
1.png   11.png  13.png  2.png  4.png  6.png  8.png
10.png  12.png  14.png  3.png  5.png  7.png  9.png

And you're done. All of the OS X Icons have now been converted to PNG. You can download the complete script here (http://stonetable.org/projects/osx2png/convert). Happy theming!