Fun with GIMP

While at work this past week and was helping a user figure out how to measure something in an image. We both knew Adobe’s Photoshop a measure tool built in, but that software is hundreds of dollars and overkill for the users purpose. I then thought of GIMP, the GNU Image Manipulation Program. It had many of the same features of Photoshop and was free. All of this eventually led to me going back home this week and playing around with GIMP… Again…

For what it is, GIMP is a great application: a complete image editing program with the ability to rival Adobe Photoshop. On top of that GIMP is free, open source, and available for many different operating systems. Personally, I have one issue with the current version of GIMP. Because I use OS X on my PowerBook GIMP has to be rendered in X11. That wouldn’t be a big problem if it wasn’t for the fact GIMP breaks the toolbox, image window, and layers/channel/paths into individual windows. The File, Edit, View menus also exist within the main window, which breaks the OS X GUI standards for having a unified menu bar at the stop of the screen. See the example of what I’m talking about below.

Screenshot of GIMP on OS X

Some would argue that OS X is the primary problem because its interface does not follow conventions used by other operating systems. While that may be true I do not want to get into the debate of the reasoning behind interface design. That’s something like the people at Ubuntu are thinking about as they decide which corner of a window the Exit button is placed. Rather, I would like to look at the three options available for Mac users who want to use GIMP and help with a few of the annoyances.

1. GIMP 2.6 + X11 hack

The simplest way to use GIMP is to download the binary package available from This is the latest stable version of GIMP and is a self-contained application with all of the library and support files bundled. All the user has to do is download the correct version of GIMP for their OS and install. As I mentioned earlier GIMP separates everything into separate windows. Because of the design of X11 for OSX when a user wants to change the tool in use they must first click on the toolbox window to activate it and then click the tool they want to use. So that’s an extra click for every tool change, layer change, etc. The solution is to enable a preference setting for X11 that follows the focus of the mouse. So if the user moves their mouse pointer over the toolbox window, that window will become active and they can choose the desired tool. Here are the steps
1. Open Terminal
2. Copy, paste the following setting into the Terminal window

a. Tiger: defaults write wm_ffm -bool true
b. Leopard/Snow Leopard: defaults write org.x.X11 wm_ffm -bool true

3. Press Enter

2. GIMP 2.6 with Quartz Rendering

An alternative to the standard version of GIMP is to build custom version and have Quartz support. Quartz is the built in screen renderer of OS X. Everything you see on the Mac desktop, from the icons and text, to the menu bar and windows, are all drawn using Quartz. So if GIMP uses Quartz then many of the GUI problems should go away. There is one problem though. Getting GIMP to use OS X’s built in Quartz renderer instead of X11 is no easy feat. There is no precompiled binary or bundle of this “variant” so the only option is to compile the software yourself. Back in the day before there were installation managers for OS X and GNU/Linux distros, a user would need to find out what libraries and programs were needed to compile a specific application. Today that is automated with tools like MacPorts of OS X. The result is a version of GIMP that uses the menu bar of OS X and the tools on any window are one click away. Here are the steps for building GIMP with quartz support

1. Go to
2. Follow the instructions for installing MacPorts, and Xcode tools
3. Follow the instructions for updating MacPorts
4. Run the following command: sudo port install gimp2 –x11 +quartz +no_x11
5. Wait for the next 12-48 hours for MacPorts to download and compile the 194 support applications/libraries required to build GIMP
6. Once the compilation and installation is complete, execute the following command to start GIMP: gimp

Screenshot of GIMP using Quartz

*Note: If you have trouble compiling or starting GIMP, see the appendix below

3. GIMP 2.7

The final option, and probably the best long term solution, for making GIMP work better on OS X is actually being integrated directly into the application by the developers. In the current development build of GIMP there is an option to make exist inside one single window. With one window the issues currently plagued by the GUI implementation for OS X should go away. The Toolbox and Layers window should be easily accessible without the currently required workarounds. Again, there is no precompiled, ready to use package of GIMP 2.7 for Mac. The software will have to be compiled using MacPorts using the steps below. GIMP 2.7 coupled with being compiled to use Quartz instead of X11 would be a very combination. Sure it won’t unseat Photoshop as the king of photo manipulation applications, but would give Mac users, like myself, a free alternative.

1. Go to
2. Follow the instructions for installing MacPorts, and Xcode tools
3. Follow the instructions for updating MacPorts
4. Run the following command: sudo port install gimp2-devel
5. Wait for the next 12-48 hours for MacPorts to download and compile the 195 support applications/libraries required to compile GIMP
6. Once the compilation and installation is complete, execute the following command to start GIMP: gimp

Arstechnica has a good article discussing the new single window interface available for GIMP as well as screenshots

*Note: I have been able to compile GIMP 2.7 on my PowerMac G4, but not start the. I am plagued with a “segmentation fault” error message.


After I compiled GIMP I ran into the following error message, “Dynamic session lookup supported but failed. launchd did not provide a socket path, verify that org.freedesktop.dbus-session.plist is loaded”. Based on the comments made in the MacPorts bug tracker the solution is to restart the computer. If that doesn’t work then running the following command should resolve the problem

sudo launchctl load –w /Library/LaunchAgents/org.freedesktop.dbus-session.plist

While buildng GIMP 2.7 I also ran into an issue with compiling the support program ATLAS. The problem was caused by the fact my PowerMac G4 has an aftermarket processor and sometimes is mis-identified by applications. When ATLAS tried to configure the following error message was the result.

It appears you have CPU throttling enabled, which makes timings unreliable and an ATLAS install nonsensical. Aborting. See ATLAS/INSTALL.txt for further information

With the processor I have, the GigaDesigns PowerPC 7447 dual 1.8GHz CPU, there is no option to turn off CPU throttling. I doubt there is even a way to enable it. So instead I had to force ATLAS to ignore the error message, go ahead, and compile. This was the first time I ever had to do a custom build of MacPorts package. Here is what I did.

1. Created a new folder on my computer and named it “MacPortsFiles”
2. Found the portfile and custom files used to compile ATLAS from Macports:
3. Downloaded all of the files and folder structure to the MacPortsFiles folder (example: /MacPortsFiles/math/atlas)
4. Edited the file /opt/local/etc/macports/sources.conf

a. Added the following line about the source list: file:///MacPortsFiles/

5. Ran the following command. touch /MacPortsFiles/math/atlas/portfile
6. Ran the following command. portindex
7. Edited the file /MacPortsFiles/math/atalas/portfile

a. Found the following block of text and added the flag -Si cputhrchk 0

if {[string equal "${os.arch}" "powerpc"]} {
configure.args-append -D c -DWALL
} else {
configure.args-append -D c -DPentiumCPS=${cpufreq}


if {[string equal "${os.arch}" "powerpc"]} {
configure.args-append -D c -DWALL -Si cputhrchk 0
} else {
configure.args-append -D c -DPentiumCPS=${cpufreq} -Si cputhrchk 0

8. Compile GIMP again. It will pickup where the error occurred.

Have fun.