NetworkManager Dbus signals

Simon Charette charette.s at
Fri Nov 6 17:51:29 PST 2009

Hi all!

I'm trying to subscribe to a NetworkManager signal in order to detect when a
new Internet connection is made and detect if its of a certain type.
Basically we've got public Wifi at school but you have to enter your login
information in a web form after connecting.
What I'm trying to do is detect when i connect to that specific Wifi and
auto connect all that with python using httplib and dbus.

This is what i've come up with so far:

import dbus
from dbus.mainloop.glib import DBusGMainLoop

NM_DBUS_SERVICE = "org.freedesktop.NetworkManager"
NM_DBUS_OBJECT_PATH = "/org/freedesktop/NetworkManager"


bus = dbus.SystemBus()

def new_connection_handler(device):
    print device

bus.add_signal_receiver(new_connection_handler, 'DeviceNowActive',

But i dont get any feedback even when unplugging a device, or a turning my
wifi off and back on.

I wasn't sure where to post that, feel free to redirect me somewhere else.
All i found about NetworkManager dbus api is

-------------- next part --------------
An HTML attachment was scrubbed...

More information about the dbus mailing list