Have Pidgin Beep at You Through the PC Speaker

This post will show you how to make Pidgin beep at you through your PC speaker when an event occurs. The PC speaker is NOT the speaker which plays music for you. It’s the speaker that makes a beep when your computer turns on or when you do something wrong in the terminal.

There are a couple of different reasons why you might want to have Pidgin beep at you through the PC speaker instead of through your normal audio output device. Both of these scenarios have been applicable to me over the years.

Scenario 1 : You want computer volume down, but want an audible notification of new messages

I have left my headphones hooked up, and walked away only to find out later that a friend had sent me messages wondering where I was. At other times I have turned the computer volume down while listening to music late at night only to be unable to hear Pidgin in the din of day.

Scenario 2: You don’t have speakers hooked up to your computer, but want to hear when a message comes in

This is my current setup, and has been for quite a while. I have a laptop for taking work with me and for watching videos on, but when I’m at my desktop it’s because there’s something so important to do on the computer that I can’t do it while lounging on the couch. Usually that means I won’t have a video or even music going. Basically it’s a work station, and if I need sound I can grab my laptop.

When doing development though, I don’t want to miss a co-worker’s incoming message. And I definitely don’t want to miss a message from my wife!

There is a built in option in Pidgin to use a Console Beep, but if you want more than just a simple beep, you’ll need to follow these instructions. The following instructions apply to Ubuntu Linux 9.10 and may or may not apply to other versions of Ubuntu and/or Linux.

Step 1 : Install the Beep Program

Beep lets you easily play different length and frequency beeps. Go ahead and install it with

$ sudo aptitude install beep

Step 2: Check if You Have Beep Power

Run the command ‘beep’. If you get a beep,  you’re in good shape. If not…

1) Verify that the pcspkr kernel module is enabled

$ lsmod | grep pcspkr

2) If it isn’t, try enabling with modprobe for testing

$ sudo modprobe pcspkr

3) If that works, add pcspkr to /etc/modules

Step 3 : Find a Nice Beep Command

The command I use for my beeps is :

$ beep -l 90 -f  1000 -n -l 200 -f 2000 -n -l 100 -f 1000 -n -l 75 -f 500

-l — The length (in milliseconds)

-f — The frequency

-n — Start a new beep

So my Pidgin alert sound is 4 beeps which go from 1000Mhz to 2000Mhz then down to 500Mhz. It’s different enough that I know it’s an incoming chat message and not some other computer beeping noise.

Step 4: Add Your Command To Pidgin

In Pidgin, open the Preferences page from the Tools menu.

Under the Sounds tab, select Command as your method. Enter your beep command into the command text box. Close the preference pane.

Configure Pidgin to beep through the PC Speaker instead of through normal audio out

You’re all set, Enjoy!

This entry was posted in Computers, Something Interesting and tagged , . Bookmark the permalink.

One Response to Have Pidgin Beep at You Through the PC Speaker

  1. Nilsel says:

    Thanks! Been looking for instructions for 9.10, now our Nagios-sever has funny alarm sounds :)

Leave a Reply

Your email address will not be published. Required fields are marked *