Run Different Programs On Connecting and Disconnecting From Networks with Both WICD and Network-Manager in Linux

So I wrote a program again.  🙂

It is (unimaginatively) named networkcontrol-wicd-networkmanager, but I affectionately call it “Bob”.  It’s what I use so that I have the right settings for Wondershaper and it doesn’t bother trying to call up CrashPlan when I’m at work.

When you connect to a network, this script gets called, determines if it recognizes the network, and then launches whatever programs you want.  It also will run other programs on disconnect, and has a variable delay… so that if you plug into your wired connection it doesn’t shut down and start up programs when you don’t need it to.

It also runs with both of the big networking programs for linux – wicd and network-manager – so you don’t have to worry about how so much as just getting it done.  It also writes (some minimal) output to the messages.log. 

This is another one of those things that looks super complicated…but it was actually harder making it so it’d work for other people than it was to get it running at all.

The installation instructions are in two parts – the actual commands to install the files, and then how to configure the configuration file.

The program is on GitHub, and should play nicely on *nix systems.  If someone knows what the equivalent is for Macs, we could do something similar there.

Was this post helpful or insightful? Buy me a coffee here or here and share this post with others!

Popular posts:

  • The difference between boundaries and rules
  • Two Ways to get CMYK Separation Using GIMP Instead of Photoshop in 2022
  • Weekend Project: Whole House and Streaming Audio for Free with MPD
  • Organizing and Tiling Your Windows on #Openbox Using Only... Openbox
  • If there's one Nazi (or a racist) at the table...
  • Odds and Ends: Optimizing SSHFS, moving files into subdirectories, and getting placeholder images

Recent Posts