Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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?

share|improve this question
Related:… – nagul Sep 28 '09 at 15:58
Consider adding ubuntu to the tag list. – Nick Stinemates Sep 28 '09 at 21:01

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

It's ghetto but it should work.

share|improve this answer
perhaps adding this script to autorun should be helpfull – bbaja42 Nov 6 '09 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 '13 at 20:22

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

share|improve this answer

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:


if ping -c 1 -W 5 &>/dev/null;then
    exec skype
    echo "No Internet connectivity. Bailing..."
    exit 1
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.