Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free.

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 am running on Ubuntu 12.04 and Banshee version is 2.96, I am looking for plugin or script which can pause any track that is playing Banshee when I lock the screen.


share|improve this question

Python script (save it and execute it).

I found it on bug page for launchpad with the following comment:

Untill banshee supports this natively the attached python snippet will do the job. It has a known problem that it will launch banshee when you lock the screen if it is not already running. I don't know enough about dbus to prevent this, and it doesnt bother me enough to make me figure it out (banshee is always running anyways).

Code of the script can be found here.

Regarding comment:

It might be worth while asking this on coding stackexchange.

But the relevant part of it is this:

def Bconnect(session_bus):
  if not session_bus.name_has_owner("org.bansheeproject.Banshee"):
    return None
  banshee = session_bus.get_object("org.bansheeproject.Banshee", "/org/bansheeproject/Banshee/PlayerEngine")
  return banshee
share|improve this answer
This is an out of subject question, but is launchpad based on bugzilla ? – Dan May 2 '12 at 15:33
It works... Is there a similar script for Rhthmbox too? Or common script that can be used to pause any track or movie playing in any player when the screen is locked. – senthilkumar May 3 '12 at 18:18

Android has a banshee remote app that will, obviously based of app name, control banshee remotely. I have used it but haven't tested it in this type of situation. maybe this app will work

share|improve this answer

go to terminal and type banshee --pause

share|improve this answer
This does not pause when the screen is locked. Rather, it's an additional step (which the OP is trying to avoid) – DrSAR Feb 25 '13 at 5:38
@DrSAR There's two ways to interpret the question. This answers one of them: how to pause Banshee once the screen is locked (vs. automatically whenever the screen locks). Since the question is vague, and since this method is probably of interest to anyone interested in automated ways, this should probably be considered an answer to the question and kept. – Eliah Kagan Feb 25 '13 at 11:07

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.