Home » Questions » Computers [ Ask a new question ]

Linux: How to start Skype (or other program) only when I'm online?

Linux: How to start Skype (or other program) only when I'm online?

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)

Asked by: Guest | Views: 276
Total answers/comments: 1
Guest [Entry]

"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"