Growl Notifications: How to push Growl notifications from a website?
Asked Answered
J

2

2

I'm wondering how I can push desktop Growl notifications from my web application to the user of my web application. I would like to use javascript, if possible, otherwise a language like Ruby or PHP would be my second choice.

Have you implemented something like this before? How can it be done?

Jeanelle answered 30/6, 2011 at 15:52 Comment(0)
J
1

I figured out how to use Ruby to push Growl notifications. I would still like to find a JavaScript solution, but if there is no way to use JavaScript, then here is a Ruby solution:

Use the ruby-growl gem:

gem install ruby-growl

Then in your Ruby script:

require 'ruby-growl'
g = Growl.new "localhost", "ruby-growl", ["ruby-growl Notification"]
g.notify "ruby-growl Notification", "It Came From Ruby-Growl", "Greetings!"

Also, in order for this to work, you have to enable "Listen for incoming notifications" and "Allow remote application registration" on the Network tab of the Growl Preference Pane

Jeanelle answered 30/6, 2011 at 20:51 Comment(1)
...actually this might have only worked locally. I can't remember now.Jeanelle
A
1

You can send Growl notifications from Javascript (with a bit of Flash as a helper, but that part is behind the scenes). Here is a test page: http://www.growlforwindows.com/gfw/examples/js/

Note that this only currently works on Windows - the Javascript/Flash support in Growl on the Mac is currently broken as noted here: https://groups.google.com/forum/?fromgroups=#!topic/growl-development/BNF8tcUE1kM

Astrometry answered 11/12, 2012 at 4:12 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.