Growl 2.1.3 and GNTP: What is the proper syntax for icon path?

205 views
Skip to first unread message

ToddA

unread,
Nov 7, 2013, 4:29:10 AM11/7/13
to growl-de...@googlegroups.com
Hello,

Growl 2.1.3 on Mac OS X 10.9 (Mavericks). I'm not an Xcode developer.

I'm implementing an integration between NCID (http://ncid.sourceforge.net/) and Growl. The NCID app is running on a Unix/Linux box and executes a simple shell script that passes GNTP requests via cURL. The shell/cURL combo is used to accommodate lower-powered boxes; this is why I'm not using any of the bindings listed at http://growl.info/documentation/developer/bindings.php.

According to the GNTP spec:

Notification-Icon: <url> | <uniqueid>

Optional - The icon to display with the notification.


Under GfW I'm used to specifying the path to the notification icon as a "file" URL like this and it works perfectly:
     Notification-Icon: file:///"C:/Program Files (x86)/Growl for Windows/ncid-gntp-images/outgoing-call-48x48.png"

On the Mac I'm attempting to do:
     Notification-Icon: file:////Users/taa/ncid-gntp-images/outgoing-call-48x48.png

But instead of using the specified icon, it's using some default icon that I don't recognize (and that I don't want to use anyway).

To keep the network traffic to a minimum (and again this implementation can be on lower-powered devices) I will have users install the icons manually on their Windows PC and Mac. This way I don't have to try to put binary image data in the shell script using <uniqueid>. I also did some testing with encoding the binary icon data in the shell script with base64, but that required more overhead processing and delayed the notification being sent to Growl. Not a good thing when phone calls happen in real time.

QUESTIONS:

1) Does Growl for Mac's implementation of GNTP support file:/// URL's? If not, can it be made to do so?

2) Is there some other simple method I can use to provide Growl with the path name to the icon files? (I know I could probably use an http URL to the user's local machine, but having the user set up a web server on their machine seems like overkill and unnecessarily complex.)

3) Is there some other way to pre-populate on the user's machine the Growl icons I want to use?

4) Is there a log file I can check somewhere that might tell me what Growl is doing with, or rejecting, the file:/// URL?

Daniel Siemer

unread,
Nov 7, 2013, 8:36:29 PM11/7/13
to growl-de...@googlegroups.com
Growl for Mac is sandboxed, and as such we cannot touch arbitrary file:// URL's on the local system (I believe we silently ignore them, but it may generate sandboxd errors in Console.app).  Generally sending us the image data using the uniqueid system is most reliable/fastest
You might look at our command line utility on the mac, growlnotify, it can take file URL’s and send the data from the file in the GNTP packet directly, since it isn’t sandboxed.

We can take http:// images and get them since we have entitlements for network access, but indeed this would be ugly.  

--
You received this message because you are subscribed to the Google Groups "Growl Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to growl-developm...@googlegroups.com.
To post to this group, send email to growl-de...@googlegroups.com.
Visit this group at http://groups.google.com/group/growl-development.
For more options, visit https://groups.google.com/groups/opt_out.

ToddA

unread,
Nov 11, 2013, 12:23:38 PM11/11/13
to growl-de...@googlegroups.com
Hi Daniel,

Thanks for the reply. Ultimately, I'm looking to simplify/automate the app and notification icon registration steps as much as possible -- from the Linux box. gntp-send on Linux appears to only register notification icons. I'm thinking this means that if I want to automate the app registration under Growl for Mac, from a Linux box, my only choice is to use the uniqueid system.

Could you also let me know, for my own curiosity and possible use, where in the Growl documentation it talks about the location of the log file enabled by the checkbox (see attached screen capture). I looked in the SDK and the online documentation and can't seem to find the answer.
mac-growl-application-screen-showing-log-options.png

Daniel Siemer

unread,
Nov 11, 2013, 12:29:32 PM11/11/13
to growl-de...@googlegroups.com
It’s a Core-Data SQLite backed store, you can view it on the history tab in preferences. 
<mac-growl-application-screen-showing-log-options.png>

Reply all
Reply to author
Forward
0 new messages