[commandline] trplayer kludge, but it works (fwd)
Jude DaShiell
jdashiel at shellworld.net
Thu Nov 26 06:39:42 EST 2009
---------- Forwarded message ----------
Date: Sun, 27 Jul 2008 06:26:05
From: Karl Dahlke <eklhad at comcast.net>
Reply-To: commandline at yahoogroups.com
To: commandline at yahoogroups.com
Subject: [commandline] trplayer kludge, but it works
Ok, this is really bogus, but I just can't spend a lot of time on this.
This is the fastest way I could get streaming audio to work.
1) Create a new directory /trj, for a trplayer jail.
We're going to chroot into this, so it's like a jail.
2) Make directories bin dev etc usr lib usr/bin usr/lib in /trj.
3) Put in a few critical files like /etc/host.conf and /bin/bash
and /dev/console etc.
4) Telnet into the old machine, where trplayer works.
Copy /lib/* and /usr/lib/* over to /trj.
This brings in RealPlayer8, which is under /usr/lib,
and it brings in the compatability libraries,
which were necessary for trplayer to run even on the old box.
Note that trplayer was compiled for an even older redhat, and sorry,
this is the only binary,
so we needed compat libraries even to get it to work on that machine.
Trying to compile it from source would probably take me two weeks,
if it can be done at all,
which it probably can't, as I'm sure the real player sdk
has changed substantially over the past few years.
Why such a valuable program goes unmaintained, I don't know.
5) Make sure you can chroot into /trj.
This means bash has to work, along with its 5 shared libraries.
No real problem here; I copied all the libraries over.
Like using a sledge hammer to do the job.
6) Test trplayer; it works.
7) Remove, about a dozen at a time, the libraries in /trj/lib and /trj/usr/lib,
until trplayer doesn't work.
If you took something out that made it break, put it back.
(Does it hurt when you do that? Then don't do that!)
Finally you are left with a handful of shared libraries.
That's all you need.
Notice that one of these is /lib/ld-linux.so.2,
and it is referenced, in bash, and in trplayer, by an absolute path.
That's why I had to chroot into a new filesystem.
I couldn't just put these old libraries in a special
old_tr_libs directory and setLD_LIBRARY_PATH,
though that would have been so much easier.
8) Remove any programs or files in the RealPlayer directory that trplayer doesn't need.
This just saves space, and I haven't done it yet.
9) Write a C program to chroot into /trj and call up trplayer,
passing the arguments along.
This has to be setuid root.
10) Point to this wrapper program in your edbrowse config file.
Verify that you can invoke streaming audio from web pages,
and you don't have to be root to do it.
Well it all works, and I really don't want to think about it any more,
at least not for a while.
However, there is a real incentive to get this working, somehow,
under real player 11.
That program can access windows media, and flash.
How many websites are currently unavailable to edbrowse because they rely on flash?
I have real player 11, and I wonder if I can just swap libraries,
and have it work.
That's probably too good to be true.
If any of you would like the trj file system, bundled up as a compressed tarball,
I could make it available.
Or, if you have a better solution, please let me know.
Karl Dahlke
------------------------------------
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/commandline/
<*> Your email settings:
Individual Email | Traditional
<*> To change settings online go to:
http://groups.yahoo.com/group/commandline/join
(Yahoo! ID required)
<*> To change settings via email:
mailto:commandline-digest at yahoogroups.com
mailto:commandline-fullfeatured at yahoogroups.com
<*> To unsubscribe from this group, send an email to:
commandline-unsubscribe at yahoogroups.com
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
More information about the Speakup
mailing list