Re: DBus notifications about Internet connections

Dan Williams wrote:
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
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

Hey Dan,

Happy Holidays (god its boring to be PC)

In regards to this feature, how should this work with vpn's? Here is an example:

- I'm connected to a wireless access point and I'm connected to the vpn as well. - I have gaim connected to my irc sessions which are only available over the vpn...
- I lose my connection for whatever reason...
- I reconnect fine to the access point but of course the vpn doesn't come up automatically. - before I get a chance to bring the vpn back up gaim is reconnecting my gtalk and other accounts, of course it can't connect to the irc sessions over the vpn since its not up yet..

My question is should gaim get another notification when the vpn is brought up. and should it get a network going away before the vpn is brought up?

There are some things to consider too. You might have your vpn configured to only route some traffic over it.. In that case it would be valid to not send a network going away signal before bringing the vpn up.


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.

[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

NetworkManager-list mailing list
NetworkManager-list gnome org

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