Rhythmbox from the command line
Dec/078
So I was playing around with my conky config and I thought it’d be cool to be able to see my “now playing” song from it. Conky has some built in bits for that kind of thing in mpd but that’s no use to me since I use rhythmbox to listen to my music. A bit of googling around came up with some hits on using dbus-send to find the info [1,2] but the output was a little more raw than I was hoping for. While I was have a brief look through the rhythmbox manpage I noticed down the bottom of the page:
SEE ALSO
rhythmbox-client(1).
Aaah, how handy
So issuing a rhythmbox-client --print-playing gives me this (the last line of the screenshot):

rhythmbox-client can also handly play/pause, stop, next, previous, skip, add songs to the queue and other stuff to rhythmbox, all from the command line. In my .conkyrc I put the following line to give the “Now Playing” output:
${color #5b6dad}Now Playing: ${color}${exec /usr/bin/rhythmbox-client --print-playing}
Leave a comment
No trackbacks yet.
4:34 pm on June 2nd, 2008
Thanks that was useful.
I found that if I used your line then rhythmbox would open if it wasn’t already, which I didn’t really want. Mine looks like this now. This gives the album title on a line below too:
Now Playing:
${exec /usr/bin/rhythmbox-client –no-start –no-present –print-playing-format “%ta - %tt”}
${exec /usr/bin/rhythmbox-client –no-start –no-present –print-playing-format “%at”}
5:03 pm on June 2nd, 2008
Ah nice one Adam. I did notice that too but since I always have it running, I didn’t bother doing anything about it. Thanks for the tip!
6:50 am on August 16th, 2008
Thats the reason why I never started working with Linux. It´s takes to long time, to install every software from the command line, put my wlan to work and other stuff.. XP runs for me much faster, in the way for installing something, drivers, etc.
1:35 pm on August 20th, 2008
Jeje maybe Linux is just not for you.
The conversation here is on how to have the Rhythmbox player information show on the desktop. There is just no way to do something like that on a Windows system. Yes, it takes some command line magic to make this work. It IS possible to do this with Linux, it is NOT possible to do it with Windows.
Maybe you have not installed Linux recently. The average person can now install Linux and have more eye candy than windows, without ever touching the command line. If you want more apps, it is even easier than in Windows, just pick off a list what you want and it is installed.
Of course if you know the command line you can always do something like
apt-get install flashplayer-nonfree rhythmbox openssh-server x11vnc
and in one shot install all the software that does not come with a default install.
1:28 pm on October 11th, 2008
I have a tight space for my conky so I just want the first 22 bytes of the song title followed by ellipses. Also I check first to see if rhythmbox is active. Cheers.
${if_running rhythmbox}${color #A7D7BB}${exec /usr/bin/rhythmbox-client –no-start –no-present –print-playing|cut -b -22}…$endif
8:30 pm on December 16th, 2008
Thanks for your tips!
6:16 am on January 19th, 2009
Thanks for your tips but I don’t know if I will use them right away. This stuff seems to be way over my head! But we all appreciate you sharing freely what you know.
9:56 pm on May 18th, 2009
Thanks for share this,love linux,it’s more powerful than win