Fun stuff . . . MP3 playing

Duane Attaway dattaway at dattaway.org
Fri Nov 28 06:00:24 CST 2003


On Thu, 27 Nov 2003, Bradley Miller wrote:

> stereo.  This is my little "random play jukebox" command:
> 
> mpg123 -g 40 -z -@ files.lst

It gets better.  You can control this command line player remotely.  I'm
not sure about mpg123, but its GNU replacement, mpg321 allows process
signals for job control:

killall -2 mpg321

will give it the control-c (SIGINT) to skip to the next selection.

killall -19 mpg321

will "pause" it by suspending (SIGSTOP) the program in the background, and

killall -18 mpg321

to resume! (SIGCONT)

I'm sure there are others, but you can always hack the source code to trap
the other signals into doing a useful functions.  The kill or killall
command with the -l option will show you possible signals to use.

Have your window manager, cron job, or keyboard events control your 
playlist!  The e16keyedit utility for enlightnment lets you remap 
keys directly into command lines.  

Signals are one of the best kept secrets and a powerful tool.




More information about the Kclug mailing list