Goodbye Adium: Pidgin on Mac OS X… with native GTK!
So you’re on Mac OS X, and want to use Pidgin on it.
First: Why not use Adium? Adium is a Free multi-protocol IM client for Mac OS X that uses libpurple, the IM library that was developed as part of Pidgin. It has several popular features such as message styles, and uses the Cocoa API native to Mac OS X, and all round looks pretty. Being a native Cocoa application, it is more well-integrated with the Mac desktop than a GTK-using application like Pidgin can ever be.
On the other hand, if you, like me, have tried Adium and have reasons for finding it unusable, then it is possible to install Pidgin on OS X too. There are two ways of doing this:
[Edit: Note that this post is from 2007. Probably a lot has changed since then.]
- Install Pidgin to run inside X11. Any default distribution of Pidgin should build fine on this, as long as you have all the dependencies installed. However, using an X11 app on OS X is really like entering another universe entirely… it’s like having two entirely disjoint OSes that just happen to run simultaneously. It is cumbersome, and I would not recommend it unless you are already doing much of your work inside X11 for some reason.
- Install Pidgin to run on the Mac desktop directly (without X11), using native GTK+ for Mac OS X and some minor modifications to Pidgin. This is very simple to do and requires only one step, described below.
Installing Pidgin on Mac OS X is now as simple as installing any other Mac OS X application, thanks to a train of effort from many people, starting with Anders Hasselqvist (“nevil”) for writing the patch with the gtkstatusicon implementation, Thomas Reifferscheid (reiffert) for including it on MacPorts, and finally Albert Zeyer for building it with Xcode and the GTK framework and making a .app out of it. (And of course, the Pidgin developers for writing Pidgin, and Richard Hult from Imendio AB for GTK+OSX. And maybe I can take a little credit for small improvements here and there, and nagging people into making certain changes :-))
One-step simple way: All you have to do is download the .dmg file from pidgin-macosx on Sourceforge, and double click on the Pidgin application. That’s all!
If you’re using MacPorts: For something which has had fewer changes from the original Pidgin, you can install it through MacPorts:
Step 0: Install MacPorts, if you haven’t got it already.
sudo port install pidgin +quartz +no_x11
(Note: The pidgin-macosx from Sourceforge may be at a older version than the MacPorts version. It also may have a few bugs. If you would like to help debug them, checkout the project from svn—svn checkout https://pidgin-macosx.svn.sourceforge.net/svnroot/pidgin-macosx I think—and/or file bugs/patches at the bug tracker.)
If you plan to script Pidgin using D-Bus, you could also do, before Step 1:
sudo port install dbus-python25
— The end —
Old instructions follow, mainly because I’m too lazy to delete them, but also in case someone does not want to use MacPorts or something:
Get GTK+ OS X:
[Follow the build instructions]:
svn co http://svn.gnome.org/svn/jhbuild/trunk jhbuild cd jhbuild make -f Makefile.plain install
Note that this installs jhbuild in ~/bin. It is possible to change this, but I remember having run into trouble during an earlier attempt doing so, so I didn’t touch anything this time.
Download this file, and save it as ~/.jhbuildrc. Then, make sure ~/bin is in your $PATH, and:
jhbuild bootstrap jhbuild build jhbuild build meta-gtk-osx-core meta-gtk-osx-python meta-gtk-osx-themes gossip
Of course, most of that is redundant, but I had disk space to spare, and pygtk to try out. I suspect I built a couple of modules more than once; feel free to remove meta-gtk-osx-core from the second build command, for example.
In my case, everything went fine (except for one minor error, where I picked “ignore error and continue” from the options it gave).
You should now have “GTK+ Mac OS X” installed. To test this, try the following:
/opt/gtk/bin/gtk-demo /opt/gtk/bin/gossip jhbuild run /opt/gtk/bin/pygtk-demo
All should work. Wow, GTK on the Mac, natively… thanks, folks who brought us Gtk+ for Mac OS X!
Now for pidgin.
jhbuild run ./configure --prefix=$HOME/.local --without-x --enable-gtkstatusicon --disable-gestures jhbuild run make jhbuild run make install
Of course, the “–prefix” is optional; it will install Pidgin in /usr/local/bin otherwise.
[Extra information for D-Bus: If you have D-Bus through Fink and want to use it, note that configure uses
pkg-config --libs "dbus-1 >= 0.35 dbus-glib-1 >= 0.35"
for checking for D-Bus. Make sure that works from within jhbuild shell (even if it works in your shell). You might want jhbuild buildone dbus and jhbuild buildone dbus-glib before doing configure etc.]
Now you can just run Pidgin directly (as ~/.local/bin/pidgin), and it works fine! It even has the tray icon!
Thanks, nevil, for making that patch!
Things that can be improved:
- Fonts suck. To fix this, put
gtk-theme-name = "Raleigh" gtk-font-name = "Lucida Grande 12"
in your ~/.gtkrc. (I also have gtk-key-theme-name = "Emacs" there.)
- Some exotic unicode characters aren’t displayed properly.
- There is a way to integrate Pidgin with an OSX menubar. It would be cool if someone did this.
- Pidgin crashes when I try to drag-and-drop buddies into contacts. You can use Finch for this :)
- Copying is a bit strange — I use Command-C in the other app to copy, and Ctrl-V in Pidgin to paste. It works, though!
- Trying to copy from Pidgin crashes it, if you’re running Quicksilver’s Clipboard history module, apparently. (Not with Jumpcut, though.) I can, however select the text and drag it into other applications (or drag it into one and copy from there into the clipboard).
Good luck, and tell me how this works for you!