Is there anything better than libnotify?

I am trying to write some code for libnotify, but the documentation for perl with libnotify is seriously missing. So is there something β€œbetter” than libnotify from 2011-08-26? All I need to do is send a notification to the current user on a Linux machine (Ubuntu specifically).

+4
source share
3 answers

Gtk2::Notify seems to lack good documentation, but you can view some examples at http://cpansearch.perl.org/src/FLORA/Gtk2-Notify-0.05/examples/ , including the base one:

 #!/usr/bin/perl use strict; use warnings; use Gtk2::Notify -init, 'Basic'; my $n = Gtk2::Notify->new('Summary', 'This is some sample content'); $n->show; 

It actually seems pretty cool, I can use it for something soon! Thanks for getting my attention.

Otherwise:

On Linux, you can use zenity to send a pop-up message, and to send to another user screen you have to play with some environment variables, but this can be done. From Perl, I would set the corresponding %ENV values ​​and then just execute system or callbacks (``) on zenity .

Perhaps start here http://www.cyberciti.biz/tips/spice-up-your-unix-linux-shell-scripts.html

Also, inside this link, libnotify-bin / notify-send will libnotify-bin work, depending on the message being sent.

 perl -E '$ENV{DISPLAY} = ":0.0";`notify-send "Hello World"`;' 
+4
source

As far as I can tell, the freedesktop specification contains a notification service that can be accessed via dbus. Below is a link to the perl module for this function.

0
source

From what I was looking for when porting an application from Windows to Linux, no :(

I am glad if it will be.

Update : I was really talking about libinotify, not libnotify.

-1
source

Source: https://habr.com/ru/post/1369227/


All Articles