I wrote a little how-to post about this a long while back. It's focused on running XMMS in the tray, but the basic procedure will work with just about any program.
http://www.linuxquestions.org/questi...d.php?t=235936
Note that kde can only hide apps from the taskbar, you'll need kdocker or a separate plugin to actually have access to it in the systray. Other WM's may behave differently, but I don't know much about them. I do know iceWM has the ability to minimize to tray natively though.