Mute (or Answer) Skype Calls with BT Headset Button in Linux


Skype on linux works great but the problem that I faced was that it does not handle the buttons on the bluetooth headsets. My wife uses skype to call into her work related conference calls and was pretty frustrated that she had to keep sitting in front of my laptop (her laptop didn’t allow to install skype) just to switch mute on and off. So, I whipped up this little trick to do so. Here is how:

  1. First I looked at the skype API (pretty simple, based on dbus). Also found a sample script somewhere that allowed to answer and hang up calls through skype API.

  2. Modified the script to switch the mute on and off instead of answering/hanging up. Script can be downloaded at the end of this article. You can also modify it to take some other action that you want.

  3. Install “blueman”. If you are using Ubuntu, just type “sudo apt-get install blueman” in shell.

  4. Once blueman is installed and you have done your headset pairing etc, right click on the blueman icon in the system tray and click on “Local Services”.

  5. In local services, click on headset tab and you can see a input box where you can give the path of a program/script which will be run whenever the “answer button” on the headset is pressed. This is important to note that blueman only supports the answer button and nothing else and I didn’t have the inclination to develop a full-fledged AVRCP compliant program to capture other buttons as all I was interested in mute functionality. You can see the screenshot of this below:

Skype Headset Button Settings for Blueman

  1. Make sure that you give the path where you saved the script that you downloaded in step 4 and you are all set now. Make a call and click on the answer button of your headset to see the magic happen :P

Let me know if you have your own hacks like this or know of a way to have a full fledged capturing of all headset buttons.

Sorry I lost the file somewhere over the years during a server move and it’s no longer available


See also