Installing Skype on Ubuntu 9.04 using Synaptic

Want to make free phone calls using Skype? Running Ubuntu 9.04? Want to make sure that Skype stays up-to-date with the latest security patches and updates once you install it? Here’s how:

On the Skype Download for Linux page Skype lists Ubuntu 7.04-8.04 as the only supported versions of Ubuntu. You can install Skype on Ubuntu 9.04, but when new updates or security fixes come out you won’t get an automatic update. If you want to make sure that your Skype installation stays up-to-date you should add skype.com as a valid software repository and install Skype from that. If you do this you’ll automatically get updates when they’re available.

To add skype.com as a repository:

  • Start up Synaptic Package Manager. (On Gnome go to System > Administration > Synaptic Package Manager)
  • Select Settings > Repositories
  • Click the Third-Party Software tab
  • Click Add
  • Enter “deb http://download.skype.com/linux/repos/debian/ stable non-free” as the APT line
  • Click the Reload button in the upper left-hand corner to download the list of available files from download.skype.com
  • Type “skype” in the Quick Search box and you should see Skype listed as an installable package
  • Mark it for installation and install

Skype should now appear on your Applications > Internet menu.


Update: At the time that I wrote this the instructions worked. However, it looks as if Skype has removed their apt repositories for 9.04. If you attempt to connect to http://download.skype.com/linux/repos/debian/ you’ll get a “Hi, this page is off limits” error message.

If you are running Ubuntu 10.04 or later you can get Skype directly from Canonical. See https://help.ubuntu.com/community/Skype for more info.

Change your Skype availability status on Ubuntu via cron

I used Skype when it first came out and then stopped because there were only a few other people I knew who used it regularly. Since they were all in my local calling area, if I wanted to talk to any of them for free I could just use a phone.

I just started using it again — for work — to talk with customers and consultants who do not live in the Bay Area. However, I found that my Thursday telecommute days were causing problems: Skype would be running on my work computer and people trying to call me would get ring-no-answer because I was actually at home.

Turns out you can start and stop Skype via cron the same way you can start and stop Pidgin Instant Messenger via cron, you just need to set a few environment variables and it works great.

First create the script ~/bin/export_x_info which looks like this:

#!/bin/bash
# Export the dbus session address on startup so it can be used by cron
touch $HOME/.Xdbus
chmod 600 $HOME/.Xdbus
env | grep DBUS_SESSION_BUS_ADDRESS > $HOME/.Xdbus
echo 'export DBUS_SESSION_BUS_ADDRESS' >> $HOME/.Xdbus
# Export XAUTHORITY value on startup so it can be used by cron
env | grep XAUTHORITY >> $HOME/.Xdbus
echo 'export XAUTHORITY' >> $HOME/.Xdbus

Create this script, type chmod 700 ~/bin/export_x_info so you can execute it, then execute it, then add it to System > Preferences > Sessions > Startup Programs so it will execute every time you start your computer and record the latest session address and XAUTHORITY value.

This script creates a 4-line file ~/.Xdbus with the current session address and XAUTHORITY value. By sourcing this file in the crontab file your scripts can now use dbus to send messages to X-Windows applications. To start and stop Skype at work I added these lines to my work computer’s crontab file:

# Skype on/off
00 09 * * Mon,Tue,Wed,Fri source ~/.Xdbus; /usr/bin/skype &
30 17 * * Mon,Tue,Wed,Fri killall skype

On my home computer I have:

# Skype on/off
00 09 * * Thu source ~/.Xdbus; /usr/bin/skype &
30 17 * * Thu killall skype

So on Thursdays when I telecommute Skype is running at home, the rest of the week it’s running at my office, and at night it’s turned off so customers aren’t calling me in the middle of the night.

When Skype isn’t running other users see your status as “Offline”. When cron restarts Skype it starts up with the same status it had when the process was killed. I just leave my status set to “Online,” so when cron starts Skype it shows everyone that I’m online. When cron kills the Skype process at the end of the day my status changes to “Offline” and people can’t call me.

Hope you find this useful.