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

esme esme at nocturnal.clara.co.uk
Sun Aug 21 08:34:34 EST 2005


Wow, what a lot of responses! Thank you, everyone!  I've just got home 
approaching midnight locally (UK time), and I've read all your replies - and 
just reading them has taught me quite a bit!

On Saturday 20 Aug 2005 10:26, Lucia Sanchez wrote:
> I've been thinking about this and there are several ways of doing that I've
> thought of.
>
>  From what I understand you're going to have one computer with the music
> files and speakers connected to it, and the rest of the computers on the
> LAN should be able to select songs to play on it, am I right?

Not quite. One computer has the files.  First stage of the project is to get 
it working just on that PC. Next stage is to allow other users on the LAN 
that I will eventually have to play files off this computer on their own PCs 
(so, for instance, my housemate, Teresa, would be able to access them from 
her Windows PC downstairs - and a Linux box in teh spare room for guests - 
that should be able to play music in the spare room, getting teh files from 
this PC I'm currently sat at typing this, too...)
>
> I guess the first thing to do is to figure out which player you're going to
> use and to find it how to make it work on the command line.  

(chuckle...) yes.. that's kind of what I was asking about in the first place, 
or so I thought! (smile...) 

> XMMS has 
> xmmsctl wich enables the passing of parameters, and Amarok uses dcop; those
> are the two that I know of.  I would personally recommend Amarok, because
> you can set it up using a MySQL database in which it will store information
> about all the songs you have; information you could display on your web
> page by getting it directly from the databse.
>
> As for using dcop...... on Amarok's wiki there's a list of commands:
> http://amarok.kde.org/wiki/index.php/DCOP_Functions

Ooh, interesting! Thanks!
>
> The only problem I can see with using either of these players is that you
> need to have an Xsession started with the player started in it for all this
> to work.

Sigh... bum. No, that won;t do, then. Or, alternatively, when the user invokes 
the browser, the player will have to get invoked automatically too - which 
just takes me back to "how do I issue a shell command from a HTML 
script?" :-}

>
> Then you'll also need a web server, probably Apache, just remember to make
> all pages related to this viewable only from IPs belonging to you LAN (with
> the Allow, Deny options).

Web servers? Aaaarrrgghh! Nooo! Sounds like it's getting too complicated! :-}
>
> As for the actual scripting; I would recommend PHP because it's quite easy
> to learn, works well with databases and generates HTML very easily -- and
> also because it's what I use and know :-P  But any other scripting language
> should do (Python, Perl..) so whichever you feel more comfortable with.


Damn. Given I haven't learnt ANY of them yet, I don't know.  I was hoping it;d 
be something fairly simple like

(several lines of HTML...)
exec xmms bowie.m3u   (or maybe exec /home/esme/music/track1.ogg, track2.ogg, 
track 3.ogg, track 5.ogg....)
(more lines of HTML)

It was THAT easy using iXG on AmigaOS.  I was kind of hoping it'd be that easy 
using Linux

>
> Good luck and let us know how you're doing, it sounds like an interesting
> project! :)

Thank you, and I will... but... even if it means I initially use a method that 
can't be used over a LAN, I intend to keep things as simple as possible, to 
help build my confidence.  If trying to go for a solution that can eventually 
be used over a LAN makes things too complex intially, the danger is that I'll 
fail badly, and get dispirited.   Simplicity first. Extensibility, elegance 
and versatility can come later.  :-)

Many thanks!

Esme


More information about the Techtalk mailing list