How to Install GTK in a Mac

by Wolfram Donat

GTK is a free, open-source, cross-platform software package that can be used for developing GUIs (Graphical User Interfaces). The version that can be installed on Mac OS X is now separate from the Windows and Linux versions and uses a Python program called "jhbuild" to install all of the dependencies. It has its own site, support platform and wiki. GTK-OSX (the Mac version) and jhbuild are installed using the terminal.

Step 1

Download and install "git," the free version tracker for OS X, from the Google code Web page. Git is pre-installed on Mac Snow Leopard, but may require download for earlier versions of OS X. Once the .dmg file has been downloaded, double-click the file to mount the disc image. Open the disc image and drag the application to the Applications folder to install git.

Step 2

Install the current version of Python to enable jhbuild to run. From "", download the installer for your version of OS X. Double-click the downloaded .dmg file to mount the disc image. Open the disc image and drag the Python file to the Applications folder to install Python.

Step 3

Download GTK's installer shell script from the SourceForge website.

Step 4

Open a terminal. In the Applications folder, click "Utilities," followed by "Terminal." Navigate to the location of the downloaded script (most likely the Downloads folder) by typing: cd Downloads

Step 5

Run the installer script. In your terminal, type: sh and watch it run.

Type "jhbuild bootstrap" followed by "jhbuild build meta-gtk-osx-bootstrap" and "jhbuild build meta-gtk-osx-core" to build and install GTK-OSX.


  • GTK-OSX requires Mac's Developer Tools to work. Developer Tools are available to download free from Mac's Developer site. Developer Tools are also included on all OS X installation DVDs, but are not automatically included with standard installations.


About the Author

Wolfram Donat is an information technology professional and writer currently finishing a degree in computer systems engineering. He has had success writing for both on- and offline audiences, and moonlights as a professional copywriter as studies permit. He is currently shopping his first novel to agents and publishers, and is hard at work on his second.

More Articles