web based volume control
Forum: Programming and Scripting
Topic: web based volume control
started by: spark-o-matic
Posted by spark-o-matic on Nov. 16 2008,19:40Morning all,
I use my DSL/Apache computer and xmms to play music. Aumix works great but it's a pain to run to that computer to change volume or log in on ssh all the time. So I spent last night and this morning working on this little bit of code to set volumes from a web page.
This is the part written in PERL.
This is an example of what you might include in an html page.
This also works directly typing in something like
I have only tested this with the Apache extention. If someone gets it working with Monkey I'd be interested to know.
Posted by chaostic on Nov. 16 2008,21:45You mean you don't have a constant ssh session with your linux box?
It could probably be done through PHP to work with monkey.
< http://www.php-mysql-tutorial.com/qna....and.php >
So just a php script with just a bunch of
system('/full/path/to/aumix options > /dev/null 2>&1; /full/path/to/aumix -q')
and a way to select them.
Posted by spark-o-matic on Nov. 17 2008,03:39
I have done a very little with PERL/CGI under Monkey and it is supported but the problem I had was following simbolic links
As far as PHP I guess that turns into a bit of a phyilosophical discussion. It is not so much that PHP has a lot of security flaws but PHP has become so popular amongst programmers with no talent or skill what-so-ever and no concern for security that it is developing a reputation of not being secure. I mean, who would write a program that would write to itself or ever set permitions that the program could write to itself? Who do you know who doesn't call themselves a 'programmer'? I realize that ASP was Microsoft and PHP is not but I would like to see a language stick around for as long as Perl, HTML or c before I learn its intricacies. Since I sat down in front of my first computer in 1982 I have become fluent in 9 languages (most of which are obsolite) and conversational in many others (many obsolite now). I have been writing PERL to run on web servers for a decade now and I realy can't see it not being available to me in the near future. The actual techniques havn't changed much over the years, its just a matter of learning a new set of comands and syntax which is time consuming. For me, for now, a DWIM (do what I mean) language works for me as long as I know what I mean to do.. The other perk for me is how heavily PERL is based on Linux. I don't know how many times I have pressed the 'du' button when I realized that what I did with PERL was exactly what I needed to do with Linux. Boy I guess I'm getting a bit but when someting just works, that works for me.
Posted by curaga on Nov. 17 2008,14:23What, ssh? I only do that to my headless boxes, all the others have their own screens
Posted by stunix*com on Nov. 20 2008,23:57i have a dsl thinkpad wired directly to a poweramp and control volume and selection using a 600x480 vnc server, the box also runs edna to serve any other machine from my TB usb drive. it works for me, the vncclient can be configured to open from a menu or icon and just as easy as a webpage would.
if all fails i can open the thinkpads screen.
this solution has pushed me in to putting my Linn LP12, Revox R77 and Teac Transport and DAC in to storage, the wife has happily taken over the space with pictures of my nephew.
Posted by mikshaw on Nov. 21 2008,03:46Personally I think LIRC would be the ideal thing to use, assuming the box is nearby. Unfortunately I've never had an infrared-capable system with which to try this, so I don't know how well it works.
Posted by chaostic on Nov. 21 2008,08:50Mikshaw, a free serial port and about 5 dollars worth of scrounged parts (Look for old vcrs and stbs) is all you need to make one lirc compatible (Irda is not lirc compatible)
Posted by spark-o-matic on Nov. 21 2008,16:42So many simple solutions to any given problem, each with it's good and bad points, and users 'free' to choose any or develop their own. This is fun.
@stunix*com: I used to use VNC all the time and still do sometimes. The 2 problems I had were it slowing things way down on old computers and having to reconnect each time I loose the wireless signal on my laptop.