Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

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'm trying to make a little bash script which I could call with a keyboard shortcut and which could detect which song is currently playing and vote it up or down, stuff like that. How can I get information about the currently playing song? And what about the previous song?

I'm using Banshee, but maybe there is a way to get currently playing song which works with multiple players? Or maybe a general way which can be tweaked to work on different players?

share|improve this question

Oops, another question made me think of looking in the manual... Apparently it's really simple to get info about the currently playing song using the --query-* commands. From the manual:


          Artist Name

          Album Title

          Track Title
share|improve this answer

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.