RE: Add new conntion with DBus API



Dear Jirka,

Thank for helping me,

When I try to run add-system-connection.py without/with root privileged, it
complain with messages as follow respectively:

dbus.exceptions.DBusException:
org.freedesktop.NetworkManagerSettings.System.NotPrivileged:
org.freedesktop.network-manager-settings.system.modify
auth_admin_keep_always

dbus.exceptions.DBusException:
org.freedesktop.NetworkManagerSettings.System.NotPrivileged: Error getting
information about caller: org.freedesktop.ConsoleKit.Manager.GeneralError:
Unable to lookup session information for process '22151'

Could you please explain it to me? It's very lack of information when google
it.

Thanks,
Toan Nguyen


-----Original Message-----
From: Jirka Klimes [mailto:jklimes redhat com] 
Sent: Wednesday, May 05, 2010 1:53 AM
To: networkmanager-list gnome org
Cc: Nguyen Canh Toan
Subject: Re: Add new conntion with DBus API

On Thursday 06 of May 2010 07:39:07 Nguyen Canh Toan wrote:
> Hi all,
> 
> 
> 
> Currently, I have a purpose of programmatically add & remove connection
> configuration through DBus interface
> org.freedesktop.NetworkManagerSettings.Connection.
> 
> I found an API Delete() on
> org.freedesktop.NetworkManagerSettings.Connection but I can't find what
> function stuff to create new connection.
> 
> 
> 
> Did anyone experience with this issue? Could you please to share it to me?
> 
> 
> 
> Thanks,
> 
> Toan Nguyen

You search for AddConnection() method of 
org.freedesktop.NetworkManagerSettings interface.

For a simple python example see:
http://cgit.freedesktop.org/NetworkManager/NetworkManager/tree/examples/pyth
on/add-
system-connection.py

More complex example can be found here:
http://markmail.org/message/2xfwvjqjovu4fk2j

For specification of settings parameters 
see:http://projects.gnome.org/NetworkManager/developers/settings-spec-08.htm
l

Jirka



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]