Re: DBus notifications about Internet connections



On Wed, 2006-12-20 at 23:10 -0500, Thomas Folz-Donahue wrote:
> As a laptop user, I am constantly switching network connections, as an
> AIM user, that leaves me linkdead until I manually reconnect[1]. My
> solution is to write a gaim plugin to reconnect me to the AIM network
> upon notification from NetworkManager that a new connection has been
> established. 
> 
> However, I have as yet been unable to figure out how to get such a
> notification.  Using dbus_monitor, I discovered that nm-applet sends a
> method call to ord.freedesktop.Notifications whenever a connection is
> dropped or added, but there seems to be no signal sent to the desktop
> to let programs know there's a connection. 

You are actually looking for the signals from the
org.freedesktop.NetworkManager object.  NetworkManager itself sends out
the signals, not the applet.

look for the "DeviceNowActive" and "DeviceNoLongerActive" signals that
get sent out on the 'org.freedesktop.NetworkManager' interface.  Try
running 'dbus-monitor --system' for a more detailed view of what
happens.

Dan


> I guess I can immediately listen for that particular method call as a
> hack, but I think that nm-applet should notify the desktop when
> connections are added or dropped.
> 
> ~thomas
> [1] While the best solution would be to not physically disconnect from
> a network without disconnecting from the AIM network first, that is
> sometimes impractical. 
> -- 
> cartwheel ^(^_^)> v(.-.)v <(^_^)^ 
> _______________________________________________
> NetworkManager-list mailing list
> NetworkManager-list gnome org
> http://mail.gnome.org/mailman/listinfo/networkmanager-list




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