Hi all,
I trying to add a new broadband connection using dbus python API:
settings = dbus.Dictionary({dbus.String(u'connection'):
dbus.Dictionary({dbus.String(u'timestamp'): dbus.UInt64(1263301788L,
variant_level=1), dbus.String(u'autoconnect'): dbus.Boolean(False,
variant_level=1), dbus.String(u'type'): dbus.String(u'gsm',
variant_level=1), dbus.String(u'uuid'):
dbus.String(u'8a0e02d9-9b1a-463b-a089-7a68140bf4c3', variant_level=1),
dbus.String(u'id'): dbus.String(u'Vivo Default', variant_level=1)},
signature=dbus.Signature('sv')), dbus.String(u'ppp'):
dbus.Dictionary({}, signature=dbus.Signature('sv')),
dbus.String(u'gsm'): dbus.Dictionary({dbus.String(u'username'):
dbus.String(u'vivo', variant_level=1), dbus.String(u'band'):
dbus.Int32(0, variant_level=1), dbus.String(u'apn'):
dbus.String(u'zap.vivo.com.br', variant_level=1),
dbus.String(u'number'): dbus.String(u'*99#', variant_level=1)},
signature=dbus.Signature('sv')), dbus.String(u'serial'):
dbus.Dictionary({dbus.String(u'baud'): dbus.UInt32(115200L,
variant_level=1)}, signature=dbus.Signature('sv'))},
signature=dbus.Signature('sa{sv}'))
sys_bus = dbus.SystemBus()
proxy = sys_bus.get_object("org.freedesktop.NetworkManagerUserSettings",
"/org/freedesktop/NetworkManagerSettings")
proxy.AddConnection(settings)
When I run this code i get a access denied error:
dbus.exceptions.DBusException: org.freedesktop.DBus.Error.AccessDenied:
Rejected send message, 2 matched rules; type="method_call",
sender=":1.210" (uid=0 pid=27292 comm="python) interface="(unset)"
member="AddConnection" error name="(unset)" requested_reply=0
destination=":1.106" (uid=1000 pid=10148 comm="nm-applet))
Does someone have any idea?
Maxwell
Legal Disclaimer:
The information contained in this message may be privileged and confidential.
It is intended to be read only by the individual or entity to whom it is
addressed or by their designee. If the reader of this message is not the
intended recipient, you are on notice that any distribution of this message, in
any form, is strictly prohibited. If you have received this message in error,
please immediately notify the sender and delete or destroy any copy of this
message
_______________________________________________
NetworkManager-list mailing list
[email protected]
http://mail.gnome.org/mailman/listinfo/networkmanager-list