Enter your search query in the box above ^, or use the forum search tool.

You are not logged in.

#1 2011-05-09 17:37:29

Registered: 2011-03-09
Posts: 4,396

How To: xmms2 & conky

i noticed there was no xmms2 & conky topic on the forums. if you do a search you'll also notice that user Kyte has been the only one in the past couple of years to ask some questions about this, and so it seems not many people are using xmms2 (?)
anyway, i was (am) new to linux and was looking for an audio-player. i come from Win7 and use foobar2000 there, which is awesome. sadly, it is not (afaik) available for linux. i tried some, but most of them just looked like iTunes, which, to me, equals 'looked like crap'. then i found out there are also 'music servers' for linux, which have optional GUI interfaces but are in the basis operated from the command line. i checked some of those out and decided to go with xmms2, because it would also work with conky. after some time i finally found out how to get it all working, and figured i'd contribute something and post a how to. so, enough with the life stories, and on to the instructions.

A. install xmms2. sudo apt-get install xmms2
B. check if xmms2 works. type 'xmms2'. it should give you a list of all the options. type 'xmms2 radd /home/rhowaldt/music' or whatever folder your music is in. type 'xmms2 list' to see if it worked. type 'xmms2 play' to play. you should hear music. if not, i don't know what's wrong, but keep trying.
C. you probably want xmms2 to run on startup. it won't play music, it will just run the daemon and not give you crap in your conky. so, open the openbox (gedit ~/.config/openbox/ and add a line somewhere:

# Launch xmms2daemon
(sleep 2s && xmms2d) &

D. now, you want that shit in your conky. you have maybe already noticed some xmms2 variables in the conky readme or wherever you read that. so, open your conky config (gedit ~/.conkyrc and add this:

${xmms2_smart} :: ${xmms2_elapsed} / ${xmms2_duration}  [ ${xmms2_status} ]

of course you can customize it all you want later.
E. do 'xmms2 play' to play some music and see your conky displaying... jack shit.
OMGWTF?!??!??!?! yeah i know. happened to me too.
F. damn conky does not come with xmms2 support in its standard configuration. so you'll have to go the scary route (if you're a newbie like me) and compile it with xmms2 support.
(wait, you still have your old conky install there. just to be sure, backup your conkyrc, even though it will probably not overwrite, and do 'sudo apt-get purge conky' and it should remove it)
now, go to and download the latest release (1.8.1 now). extract it, open a terminal and navigate to the folder you extracted it in (for me /home/rhowaldt/downloads/conky-1.8.1/). now, compiling this consists of 3 simple steps.

1. configure the install. the point of this is that you can decide what kind of configuration you want. so type:

./configure --enable-xmms2

(WARNING: doing this will not compile with imlib2 or wlan support enabled - and maybe others that i do not know about because i don't need them. so if you are like me and want these, you need to do './configure --enable-xmms --enable-wlan --enable-imlib2' - but you can always follow these compile-steps again and i think it overwrites the old installation - if not, i've done this 3 times so someone tell me how to clean up the mess)
if you get an error for imlib2, you probably need to install it through Synaptic or whatever you want.
2. if your configuration is to your liking (check out the README in the conky folder you downloaded for more options etc), you can go and make. to do that, type 'make' (hey, easy!)
at this point i got this error:

xmms2.c: In function ‘handle_playback_state_change’:
xmms2.c:226: error: ‘struct xmms2_s’ has no member named ‘percent’

so, i used Google on that one, and found this: … tid=757308. so, from your 'conky 1.8.1' folder, do 'cd src' and 'sudo gedit xmms2.h', and do what the dude says:

add line "int percent;" to struct xmms2_s
found in xmms2.h and it should buid.

save and do 'make' again and it should work. if not, try Google again, because i do not know.
3. type 'sudo make install', and check it does not give you errors. your xmms2-enabled conky should now be compiled.

G. it should automatically find a .conkyrc file in your home directory. but when you try and start conky by typing 'conky' in a terminal, you get a 'command not found'. you need to make symbolic link to the conky executable in your /usr/local/bin because that directory is in your $PATH (type '$PATH' in a terminal and see for yourself) and so bash looks there for symlinks. that's why. i think i did it like this:

ln -s /opt/conky/bin/conky /usr/local/bin/conky

(note that my conky is installed in /opt - you can change this in the configuration, step 1 in compiling)
you should now be able to type 'conky', and it should start conky, with your old config as well.

H. if you type 'xmms2 play', you should now see conky display the info you requested! (if not, damn, try again or something)

I. (bonus!) a tip: add an alias to your .bashrc because 'xmms2' is annoying to type.

disclaimer: i am a n00b. please comment if i say things that are half-true, untrue or just plain deadly. i killed my conky a couple of times, so i apologize beforehand if you break stuff and can't get it working again. sorry for that.

edit: i forgot something kinda important. i have not been able to get conky to auto-update after saving the config file, yet. i'll figure it out eventually. it seems to update though, gives me all the text and stuff, but does not reload on screen at least. to remedy this, use the 'conkywonky' script included with #!. this will restart it effectively.

Last edited by rhowaldt (2011-05-09 18:18:49)


Board footer

Powered by FluxBB

Copyright © 2012 CrunchBang Linux.
Proudly powered by Debian. Hosted by Linode.
Debian is a registered trademark of Software in the Public Interest, Inc.

Debian Logo