Created
September 21, 2017 17:25
-
-
Save tynovsky/a6dcda958847e30e4f0646a708cf30a1 to your computer and use it in GitHub Desktop.
perl dbus
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/perl | |
use strict; | |
use warnings; | |
use Net::DBus; | |
my $bus = Net::DBus->find; | |
my $notify_service = $bus->get_service("org.freedesktop.Notifications"); | |
my $notify_object = $notify_service->get_object( | |
"/org/freedesktop/Notifications", | |
"org.freedesktop.Notifications" | |
); | |
$notify_object->Notify( | |
"DEMO", 0, "/home/miroslav/avast-logo.png", "hello!", "hello world", [], {}, 3 | |
); | |
################################################################################ | |
my $busobject = $bus->get_bus_object; | |
for my $name ( @{$busobject->ListNames} ) { | |
if ($name !~ /^:/) { | |
my $service = $bus->get_service($name); | |
print "SERVICE: $name\n"; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment