[Techtalk] Using a web browser to control stuff locally -eek!

Kathryn Andersen kat_lists at katspace.homelinux.org
Sat Aug 20 17:29:42 EST 2005


On Sat, Aug 20, 2005 at 04:24:18PM +1000, Patricia Fraser wrote:
> Hi Esme,
> 
> > On Saturday 20 Aug 2005 03:26, Kathryn Andersen wrote:
> > > On Sat, Aug 20, 2005 at 12:24:52AM +0100, esme wrote:
> > > > How do you invoke a shell command from a web page?
> >
> > I've just looked up what CGI means.  Damn! 
> 
> You know what, I don't think you *do* need CGI to do what you want. You 
> should be able to embed your music files as links, and then set the 
> browser up to use the player that's installed on the machine;

I was just thinking that as I read Esme's previous two posts.  That
could work, and would be simpler, I think.

Basically what you would have to do, is
(a) install a browser plugin for your browser (for example, firefox)
which can play music files.  If you're on a LAN with multiple machines,
this would mean installing the plugin on each machine.
An alternative isn't to install a plugin, but to designate an external
command to call to deal with music files; that's in the browser setup
somewhere.  Again, that would have to be done for each machine.

I know that xine has a browser plugin which is compatible with firefox;
that would be good for both music and video if I recall correctly.

(b) On the server machine, the one which has the music files, set up an
Apache server.  No, it isn't that hard.  It's up to you what level of
sophistication you have with the setup; anything from using bare-bones
IP address to connect to it, or go the full hog with virtual hosts; just
don't try to do everything at once.

(c) Set up a web-page on the server machine which contains links to the
music files.
This could be organized however you like.  The music files will have to
be under DOCUMENT_ROOT in order to be found by the web-server, but
if you don't want to move them from where they are, you could probably
have a soft link to their real directory (so long as soft linking is
configured as allowed by the web-server)

Note that if you don't want the music to be served to the outside world,
you're going to have to be a bit savvy in the Apache setup, and it's
probably a good idea to give yourself a firewall in any case.
I recommend shorewall, or if you really want a GUI driven firewall, try
firestarter.

> it might 
> make it a bit more annoying in use, because you wouldn't be using 
> drop-down lists or pretty things like that.
Well, you could have that as the next project: to write a CGI script
with drop-down lists which will serve up the music files in question.

Kathryn Andersen
-=-=-=-=-=-=-=-=-
Perl programming is an *empirical* science!
             -- Larry Wall in <10226 at jpl-devvax.JPL.NASA.GOV>
-- 
 _--_|\     | Kathryn Andersen	<http://www.katspace.com>
/      \    | 
\_.--.*/    | GenFicCrit mailing list <http://www.katspace.com/gen_fic_crit/>
      v     | 
------------| Melbourne -> Victoria -> Australia -> Southern Hemisphere
Maranatha!  |	-> Earth -> Sol -> Milky Way Galaxy -> Universe


More information about the Techtalk mailing list