[Techtalk] Using a web browser to control stuff locally

esme esme at nocturnal.clara.co.uk
Sat Aug 20 15:57:32 EST 2005


Sorry about the length of this, but I couldn't think of a shorter way to 
explain...

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 want to create a web page that will provide buttons that can be clicked
> > allowing me to select from a number of my CDs that I've ripped from HD.

>
> Sounds like you need to write a CGI script.  Though I have a feeling
> that somebody's already written a CGI front-end to XMMS so maybe you
> just need that.
> (goes and looks) Here's one: http://xmmsd.sourceforge.net/

Never'eard of CGI, will check this out, thanks!
>
> Why exactly do you need a web-page front-end to an MP3 player? 

To very gently get myself back into doing some sort of programming, with a 
project that I thought would be easy once I'd learnt that one little bit I 
didn't have a clue about.  I learnt programming as a hobbyist some twenty 
years ago, but after only a few years, stopped (vagaries of life, etc.).  
Then, some years later, I had various Amigas, and mucked about a little bit 
with shell scripts and Amigaguide and iXG on that, but once we switched to 
using a Windows PC, the damned things were so unstable that I felt scared to 
muck about and try stuff to learn how it all works.   

Then, a few years ago, a programmer friend suggested I try having a go at 
Visual BASIC on his PC whilst I was cat-sitting for him whilst he was away on 
holiday.  Unfortunately, I bounced, and bounced hard. Couldn;t get even a 
single program working. Damned thing seemed determined to stop me doing 
anything useful, insisting I muck about with front-ends for programs that 
hadnt even been written yet.I just couldn;t understand it, and given I'd 
heard VB was supposed to be easy (and I'd had huge amounts of stress 
elsewhere in life, too), it badly shook my confidence in my ability to get 
back into programming anything modern 

(I still own a working Sharp PC1211 handheld computer, with a whole 1.4K of 
userspace to program in BASIC! THAT I can program, and program very well 
indeed, though I say so myself. I used to enjoy seeing how much I could pack 
into such a tiny space, and wrote several games and also useful programs that 
stretch the machine to its limits - including a wee spreadsheet and something 
like a simplified turn-based version of "Battlezone". :-) It's been a very, 
very long while since I wrote anything non-trivial for it, but give me an 
old-style BASIC and an environment that lets me get the output out of it in a 
way that I can understand, and I'm fine, irrespective of the machine)

Meanwhile, I HAD learnt about building PCs, and was still OK installing and 
removing software.  And being aware that the AmigaOS was based on a UNIX-like 
kernel, once I heard of Linux, I kept an eye on it until it seemed to have 
reached a user-friendly enough stage for me to be able to consider using it 
without hitting any problems likely to rattle my confidence with PCs further. 
THAT has worked out very well - I love using Linux! I feel confident enough 
to look into things and try to fathom how they work (I can follow the logic 
of some of the scripts, even if I wouldn't dare attempt to modify them), and 
learn a bit about using the shell. :-)

So now I'm trying to find something programmy that is simple, yet everyday 
useful/appealing that I might try to start getting the confidence back. 
Setting up a HTML file that could be invoked to give a simple screen to let 
one choose various audio or video entertainment options, as I did way back on 
the Amiga, looked to be a reasonable one. 

> That seems 
> like a lot of trouble to go to (there are user permission and security
> issues in making CGI front-ends) 

Oh, dear. Not so simple, then?

> when it is much easier and simpler to 
> just run the mp3 player in the first place.

Simple for me, yes - but not necessarily so for guests that we might have stay 
over.  Me and my housemate hope to have a wee LAN set up soon, once we've 
changed over to broadband from dial-up (I have played around a bit with a 
crossover cable between my two computers. Had a few problems, and found out 
why (one of my PCs has got itself in a bit of a tizz behind the scenes, so 
I'm going to do a fresh install of Mandriva rather than muck about trying to 
work out how to un-tizz it by hand. I probably COULD do it wthout a 
reinstall, but life is short!). 

Anyway, I have successfully managed to play multimedia files off the hard 
drive of the PC I wasn't sat in front of using the crossover cable LAN).  And 
what I have in mind is having one computer store a lot of video/audio 
entertainment files that can be called up from other computers around the 
house on demand. Unfortunately, none of the multimedia players I;ve 
encountered (Kaffeine, Totem, Xine, XMMS, Mplayer) are exactly easy and 
intuitive for a computer novice to use when trying to play a bunch of .VOB 
files that go to make up, say, a video film.  Hence my thinking it'd be a lot 
easier to just give 'em a web page (or something of that ilk) so they could 
select what they want to listen to or hear directly, and just have "the 
magic" happen behind the scenes, so far as they're concerned. 
>
> > Esme  (PS: if it makes any difference, I use KDE for preference - but can
> > happily use Gnome or IceWM or whatever for this, if need be. )
>
> The window manager has got nothing to do with the web browser.

I din't think it did, but wasn't absolutely positive it might not be an issue. 
Damned glad to hear I was correct in my assumption, even if I wasn't sure I 
was correct!  By the by, I'm also allowing that there might be some other 
simple way I can achieve the effect I want that doesn;t involve setting up a 
web page.  If there's some other method that's simple for me to be able to 
create a very simple front end for multimedia selection/playing for utterly 
novice computer users either on a stand-alone PC or over a LAN - I'm all 
ears, just point me in the right direction! :-)

Esme


More information about the Techtalk mailing list