[linux-elitists] Per-user network up and down scripts

Nathaniel Smith njs@pobox.com
Wed Nov 26 12:45:34 PST 2008

On Wed, Nov 26, 2008 at 8:40 AM, Don Marti <dmarti@zgp.org> wrote:
> There's other stuff that I want to do when the net
> comes up or down that should run as me, not root.
> (Sync my IMAP mail, open ssh "master" connections
> which are tied to me, and so on.)

Another approach (used by a number of desktop apps these days) is to
listen for D-Bus signals from NetworkManager.  For a slightly
different use case mostly (Firefox switching between "offline" and
"online" mode, Pidgin triggering an automatic reconnection attempt,
etc.) where the interested apps are already resident in memory, and of
course it assumes you're using NetworkManager, but one could create a
little session daemon who just listens for such events and then runs
scripts, for instance.

-- Nathaniel

More information about the linux-elitists mailing list