The actual growl invocation is just a minor part of this module (it doesn't really have large parts, but anyways), and other desktops provide similar notification mechanisms.

KDE for example ships with kdialog, which can be invoked via
kdialog --passivepopup <text> --title <title> <timeout in seconds>,
and your module even inspired me to make it support KDE 4.2's new growl-like notification bling. (It already worked before 4.2 with the same arguments though, just in a slightly less shiny way.)

The issue with calling it directly like that is that on Linux systems, the webserver usually runs as a different user (e.g. user "www-data" on Debian) than the desktop user (e.g. user "jakob"), and as such the webserver neither has access to the X server nor to the desktop user's D-Bus session bus. Which is reasonable from a security point of view, but also means if we want to relay any notifications, we either have to run the program as different user or find some way to make an existing daemon pick up the data.

Sounds a bit complicated either way. Any ideas? Also, how does OS X do this kind of stuff actually?

Comments

jpetso’s picture

Status: Active » Closed (duplicate)

Meh, how stupid must I be to produce a duplicate of the single open issue? Uncool. Although I think my issue text is more insightful than the other one.

eaton’s picture

The issue with calling it directly like that is that on Linux systems, the webserver usually runs as a different user (e.g. user "www-data" on Debian) than the desktop user (e.g. user "jakob"), and as such the webserver neither has access to the X server nor to the desktop user's D-Bus session bus. Which is reasonable from a security point of view, but also means if we want to relay any notifications, we either have to run the program as different user or find some way to make an existing daemon pick up the data.

That's a good question. I don't have a great answer for it, but I am looking into ways to customize the output. netaustin suggested that full customization would allow us to pipe it to Mac OSX's 'say' command, reading you the text of every watchdog notification. Useless, but awesome.

Perhaps the first step would be to tokenize the command? Instead of just entering the path to the binary, users could specify the full command-line text using tokens? For example:

/usr/bin/growlnotify

...would be replaced with:

/usr/bin/growlnotify -m [message] -s [severity]

szczym’s picture

it would be cool to have notifications in ubuntu and gnome.

In ubuntu 9.04 is new notification system, that is not yet in gnome. Here is more on subject:
http://arstechnica.com/open-source/news/2008/12/canonical-linux-notifica...

And here are roots:
http://www.markshuttleworth.com/archives/253

Sorry for not pointing you directly to its api doc, i just dont know how it works...