in reply to Re: Sharing Sound card / Remote Media PC.
in thread Sharing Sound card / Remote Media PC.

Thank you, that sounds right. But...

I have added the "nobody" id and the "apache" id to the group "audio" which owns /dev/audio (which is a link to /dev/sound/audio, which is owned by root.) But it seems to make no difference.

I can play my script from the command line, either locally or through ssh, but not through a web form. (useless web form below).

mplayer is running, I can see the feedback on the web browser, but no sound.

<html> <head> <title> Test file </title> </head> <body> <h1>Test file</h1> <p>test data <form action="/cgi-bin/PlayPod.pl"> <input type="submit" value="play pod"> </form> </body> </html>

Skip

Replies are listed 'Best First'.
Re^3: Sharing Sound card / Remote Media PC.
by erroneousBollock (Curate) on Nov 15, 2007 at 16:48 UTC
    Two things:

    Are you sure the webserver is running as nobody?

    Does PlayPod.pl know how to start the music and give control back to the initiating terminal (in this case the web-server via fork) ?

    -David

      Figured it out. I needed to restart the web server(rebooted actually) before it recognized the new group assignments.

      I am expecting use of "system" should allow control to be retained by the web server. It does play the sound file to completion, or if I hit the back button, the file is interrupted.

      I think the web server actually runs as "apache", but I think it may run cgi as "nobody".

      Skip