Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re: Sharing Sound card / Remote Media PC.

by erroneousBollock (Curate)
on Nov 15, 2007 at 15:59 UTC ( [id://650999]=note: print w/replies, xml ) Need Help??


in reply to Sharing Sound card / Remote Media PC.

Your sound card's device node under /dev will be owned by a group called audio (or similar).

Add your web-server's user (eg: www-data, or nobody) to that group.

-David

Replies are listed 'Best First'.
Re^2: Sharing Sound card / Remote Media PC.
by SkipHuffman (Monk) on Nov 15, 2007 at 16:41 UTC

    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
      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

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://650999]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (2)
As of 2024-04-20 03:46 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found