How to call Login1.Manager methods from Perl?
Manuel Reimer
Manuel.Spam at nurfuerspam.de
Sun Oct 21 02:28:10 PDT 2012
Hello,
I'm trying to call methods from Login1.Manager using the Net::DBus Perl module.
My code looks like this:
#!/usr/bin/perl
use strict;
use Net::DBus qw(:typing);
use Data::Dumper;
my $bus = Net::DBus->system;
my $logind = $bus->get_service('org.freedesktop.login1');
my $manager = $logind->get_object('/org/freedesktop/login1/Manager',
'org.freedesktop.login1.Manager');
$manager->PowerOff(dbus_boolean(0));
But the result is the following:
org.freedesktop.DBus.Error.UnknownMethod: Method "PowerOff" with signature "b"
on interface "org.freedesktop.login1.Manager" doesn't exist
What am I doing wrong?
Thanks in advance
Yours
Manuel
More information about the dbus
mailing list