Play Audio on Headless Server?

Hans Fugal hans at fugal.net
Wed Jul 18 11:04:48 MDT 2007


I second the motion to use mpd. You can control it with one of many
clients from anywhere on the network. (My favorite is ncmpc, which is
ncurses based and could be run in screen on the headless box if you felt
like it).

Other options are alsaplayer (has a console UI IIRC) in screen, running
any GUI player in an NX session (which you can attach to and detach from
anytime you feel like), a simple shell script with mplayer or play
(from sox) or any number of simple console players, as has been
demonstrated, etc.

On Wed, 18 Jul 2007 at 10:37 -0600, Doran L. Barton wrote:
> Not long ago, Kimball Larsen proclaimed...
> > Ok, so everyone will probably get sick of all my questions this week,  
> > but I've been tossed into a bit of unfamiliar territory (I'm a  
> > programmer, not a sysadmin) this week with setting up a new server  
> > here at work.  One of the functions they need this server to do is to  
> > play our hold music for the phone system.  The old server that this  
> > is replacing simply played music out of itunes (yes, the old server  
> > is a mac mini) and an audio cable connects the mac to the phone system.
> > 
> > So, the new server is headless, and I don't have X installed at all.   
> > What sort of solutions are there out there that I can use to just  
> > start music playing out of a pre-defined playlist when the system  
> > boots and just have it play continuously forever?
> 
> 
> #!/bin/sh
> while true
> do
>     mplayer *.mp3
> done
> 
> A more elegant solution would be to use mpd <http://www.musicpd.org/>.
> 
> -=Fozz
> 
> -- 
> fozz at iodynamics.com is Doran L. Barton, president/CTO, Iodynamics LLC
> Iodynamics: IT and Web services by Linux/Open Source specialists
>  "Toilets of man."
>     -- Restroom sign in China



> 
> /*
> PLUG: http://plug.org, #utah on irc.freenode.net
> Unsubscribe: http://plug.org/mailman/options/plug
> Don't fear the penguin.
> */

-- 
Hans Fugal ; http://hans.fugal.net
 
There's nothing remarkable about it. All one has to do is hit the 
right keys at the right time and the instrument plays itself.
    -- Johann Sebastian Bach
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://plug.org/pipermail/plug/attachments/20070718/a3cef4b7/attachment.bin 


More information about the PLUG mailing list