Growling
Posted by Hans Fugal
growlnotify is a little program that comes with Growl which allows you to submit Growl notifications from the command line or from scripts. Unfortunately, it doesn't seem to work properly in Leopard—the notification only shows up maybe ⅓ of the time. There's a hint in the logs, but I have no idea what it means:
2008-02-13 10:09:15 GrowlHelperApp[17821] *** -[NSMachPort handlePortMessage:]: dropping incoming DO message because the connection or ports are invalid
Apparently the devs are pretty clueless about the problem too, as it's been reported but not yet fixed. The folk(s) over at hasseg.org came up with a workaround, which is all well and good, but I observed a simpler workaround than using the network (which requires configuring growl to allow network connections, if I'm not wrong). This little wrapper script does the trick, at least in my initial tests:
#!/bin/sh
wrappee=/usr/local/bin/growlnotify
exec $wrappee -w "$@" &
Basically we tell it to wait for notification from growl that the message is now off the screen, and then go in the background so we don't have to actually wait for it. This has the side effect of essentially rendering the -w option useless when using the wrapper, so I've decided to wrap it with a different name instead of a transparent wrapper. I call it growl, which is both shorter to type and not nearly as ugly as growlnotify. Enjoy.

Not really related to your issue, but on the topic of Growl...
If you've found yourself hooked by growl but away from OSX (or in a mixed OSX/linux network), Mumble seems to be a pretty useful Growl-clone for linux. It not only clones the functionality, but also the protocol, such that it should be able to receive notifications from your mac boxes, if your mac boxes are sending events to the network.
Disclaimer: I've not actually used it over the network, just with local processes. And the pidgin plugin that it comes with (which listens for pidgin on dbus and rebroadcasts the dbus event as a growl/mumble event, as far as I can tell) is broken, at least on x64. But in general, it's functional and almost as clean looking as growl.
and now, another trouble with leopard. I wish they'd configure it better so we could truly maximize it.
Many thanks! I've been banging my head against this issue for the last couple of hours. You've come up with a really simple, elegant solution.
Update: growlnotify included in Growl version 1.1.3 fixes this problem, so the workaround is no longer necessary.
Hans,
I'm not so sure; I'm using Growl 1.1.4 with growlnotify 1.1.4 and triggering it with autotest. I've experimented with pulling the generated growlnotify command line out of the autotest notification and running that repeatedly.
I got a 33% failure rate -- granted, much better than what I've seen other folks report - but at the beginning of a coding session, its enough to make me wonder if my test code didn't work.
I'll give the workaround a shot
I ended up implementing the workaround from http://hasseg.org/blog/?p=111, which seems to be working reliably.
As of September 8, 2008, the fine folks at growl have acknowledged the defect and logged a new bug against it (https://bugs.launchpad.net/growl/+bug/267767)