XMMS Pipe Control Plugin 0.5.4

Ben Lynn <blynn@stanford.edu>

INTRODUCTION

This plugin creates a FIFO pipe at /tmp/xmmspipe-in_$USER.$sessionid
If $sessionid = 0, then a symlink to it is created at $HOME/.xmms/inpipe.
When enabled, XMMS can be controlled by writing to this pipe. For example:

echo "play_pause" > ~/.xmms/inpipe

will cause XMMS to play or pause.

Although it is possible to control XMMS with command-line options, I found
them quite limited. I wrote this program so I could properly control XMMS
with scripts. I wanted to do this because of my rcenter program which reads
events from my Creative RM900 remote control and executes scripts.

There are other plugins, such as xmms-shell, that allow you to control
XMMS through shell commands. However, pipes may be preferable in some
situations:

 - The pipe automatically inherits the security features of the underlying
filesystem (e.g. you could change its permissions so that only users of a
particular group can control XMMS).

 - In many programming languages, opening and writing to a pipe is easier
than executing programs.

 - The plugin can call internal xmms functions which means it can have more
functionality, e.g. load/save playlists.

 - Some overhead is saved as the plugin is always in memory.

INSTALL

Type "make" to compile xmmspipe.

Type "make install" to install it. (This will copy xmmspipe.so to
$HOME/.xmms/Plugins/General.)

Or edit the Makefile and follow the instructions in the comments to have it
install to the system XMMS plugins directory instead.
(You'll need to be root for this.)

USAGE

XMMS can be controlled by writing to the FIFO pipe at $HOME/.xmms/inpipe.
For example:

echo "stop" > ~/.xmms/inpipe

will cause XMMS to stop playing. See below for a list of commands.

The `inpipe' file is actually a symlink to a pipe at
    /tmp/xmmspipe-inpipe_$(USER).$(SESSION)
This is so that if you have multiple XMMS sessions running, each can be
controlled with their own pipe. (The `inpipe' file points to the last created
input pipe.)

There is a demo program, fade, that uses the plugin to fade the current
song and advance to the next one when run. It shows how the plugin might
be called from an application.

FILES

This plugin creates various files. By default it only creates an input pipe,
but the others can be created if desired.

/tmp/xmmspipe-in_$(USER).$(SESSION)
    The only pipe always created. It receives commands.
    The last created input pipe is symlinked to $(HOME)/.xmms/inpipe

/tmp/xmmspipe-status_$(USER).$(SESSION)
    The status pipe. When activated, it can be used to return information.
    The last created status pipe is symlinked to $(HOME)/.xmms/statuspipe

/tmp/xmmspipe-ack_$(USER).$(SESSION)
    When activated, acknowledgements to completed commands are sent
    down this pipe

/tmp/xmmspipe-id_$(USER)
    When activated, the plugin will output the name of the last created
    input pipe to this file.

COMMANDS

The original commands are still supported for backwards compatibility.
See the COMMANDS file for the "official" list.
