How to call Login1.Manager methods from Perl?

James purpleidea at gmail.com
Sun Oct 21 02:47:31 PDT 2012


Try using the d-feet program to explore what is available on your
system.

Cheers,
James


On Sun, 2012-10-21 at 11:28 +0200, Manuel Reimer wrote:
> 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
> 
> _______________________________________________
> dbus mailing list
> dbus at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/dbus

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part
URL: <http://lists.freedesktop.org/archives/dbus/attachments/20121021/8b55c93d/attachment.pgp>


More information about the dbus mailing list