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

Brian brian@brianm.org
Wed Nov 26 12:55:21 PST 2008

On Wed, Nov 26, 2008 at 2:45 PM, Nathaniel Smith <njs@pobox.com> wrote:
> 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.

Alternatively, a script that sits in /etc/network/if-up.d and checks
all users' home directories for a script to run as that user would be
a viable package. If Don's concern is polluting etc with unmanaged
files, getting that into his distro would set things right.

More information about the linux-elitists mailing list