CocoaDialog – A handy way of displaying Cocoa dialogs from the shell

While I was working on making the next DDRescue-GUI integrate better with OS X, I stumbled upon something called CocoaDialog (website), which is incredibly helpful. 🙂 CocoaDialog has been written and maintained by a variety of people (Mark A. Stratman, Mark Carver, Alexey Ermakov, Allan Odgaard, Wout Mertens), but I want to say I played absolutely no part in making it at all.

What is CocoaDialog?

It’s a little bit like Zenity (Wikipedia Page) on Linux, but it uses Cocoa  instead of GTK so it works natively on OS X from 10.4 onward.

Anyway, what actually is it and what can it do? It can provide native cocoa dialogs, such as yes/no dialogs, general message dialogs, file selection dialogs and input boxes just to name a few. It also has a set of options for each dialog, as well as a lot of global options that work for everything, so it’s very customisable and powerful. Essentially, you can do whatever you want with it. It’s a simple, great solution for simple scripts on OS X that need a little interaction with the user.

Why is it great?

So then, you might ask, why am I using it in DDRescue-GUI when I have all of wxPython’s great features? I use it because I’ve been looking for ages to try and find a way to show notifications on OS X 10.6, and it’s been really hard finding anything that does this that I can just bundle with my app. It’s also released user the GPL, which allows me to bundle it with DDRescue-GUI.

What’s really cool is the bubble notifications look pretty much like the standard notifications on newer versions of OS X, and you can use your own logo and all that good stuff. It really is a brilliant tool 🙂

Here are some images to show you what it looks like.

A generic CocoaDialog bubble notification

A generic CocoaDialog bubble notification

One of DDRescue-GUI's CocoaDialog bubble notification

One of DDRescue-GUI’s CocoaDialog bubble notifications

A sample CocoaDialog yes/no dialog

A sample CocoaDialog yes/no dialog

I think that about wraps it up! You can download CocoaDialog from here, and the first thing you might notice is that the stable release is from 2006, and the latest development release was made in 2012, but don’t let you put it off, because it still works even on El Capitan, and it sill looks great as you can see 🙂

Cool Apps

About Hamish McIntyre-Bhatty

I’m a programmer, I write in Python, am learning C++, and I will be learning Java soon as well. I have written and maintain 3 open-source programs, hosted on In my free time I also enjoy cycling, acting, photography, and play bass guitar. I go climbing every now and then as well. As you may have guessed, blogging is also a hobby of mine :)

Leave a Reply