I'm trying to write some code against libnotify, but the documentation for perl with libnotify is seriously lacking. So is there something that, as of 2011-08-26, is "better" than libnotify? All I need is to send a notification to the currently logged in user on a Linux machine (Ubuntu specifically).
Is there something better than libnotify?
1.7k Views Asked by Glen Solsberry At
3
There are 3 best solutions below
0
On
As far as I can tell freedesktop specification contains a notification service which can be accessed via dbus. Here is a link to a perl module for that feature.
Gtk2::Notifydoes seem to lack good documentation, but you can browse through some examples at http://cpansearch.perl.org/src/FLORA/Gtk2-Notify-0.05/examples/ including the basic one:In fact this seems pretty cool, I may use it for something soon! Thanks for bringing it to my attention.
Otherwise:
On Linux you can use
zenityto send a popup message, and to send it to another user's screen you have to play with some environment variables but it can be done. From Perl I would set the appropriate%ENVvalues and then just executesystemor backtick (``) calls tozenity.Perhaps start here http://www.cyberciti.biz/tips/spice-up-your-unix-linux-shell-scripts.html
Also from within that link, perhaps
libnotify-bin/notify-sendwould also work, depending on the message you are sending.