0

I've added Skype to my "Startup applications" list, so that it starts automatically after I log in. (This is on Ubuntu 9.04 Jaunty, with the Gnome desktop)

However, I frequently use my laptop offline, and then Skype is less than useless: it just serves to annoy me with a startup noise and permanently animated toolbar icon.

Is there a way to tell Skype to start only when I'm online? Can I use Upstart to do something like that?

2

3 Answers 3

1

Add a script to your bin directory, and start that script instead of starting skype.

The script will look kind of like this:

#!/bin/bash -f
if [[ `ifconfig eth0|grep 'inet addr'` ]] ; then
    skype
fi

It's ghetto but it should work.

2
  • perhaps adding this script to autorun should be helpfull
    – bbaja42
    Nov 6, 2009 at 10:53
  • You can simplify this to if ifconfig eth0|grep -q 'inet addr' Still, perhaps not the best way to check for connectivity. It also hard-codes the interface name.
    – Joseph R.
    Sep 1, 2013 at 20:22
0

This might be helpful for you . Actually i have asked this question for empathy chat client . I guess u can do for skype also

0

Try this script. It uses a ping test to determine whether you're online, launches Skype if you are and warns you if you're not:

#!/bin/bash

if ping -c 1 -W 5 google.com &>/dev/null;then
    exec skype
else
    echo "No Internet connectivity. Bailing..."
    exit 1
fi

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .