Oxyl~box (ppc)
From NAS-Central Buffalo - The Linkstation Wiki
Brummierob (Talk | contribs) |
m |
||
| (13 intermediate revisions not shown) | |||
| Line 6: | Line 6: | ||
You will need to install: | You will need to install: | ||
| - | # [http://downloads. | + | # [http://nas-central.org/index.php?title=Category:OpenLink Openlink with Kernel 2.6] |
| - | # [[ | + | # [http://downloads.nas-central.org/development_tools/ppc-tools-2_1.tgz PPC Tools] |
| + | # [[Apache w/ PHP Support (PowerPC) | Apache]] | ||
# [[Articles/PPCGD | GD]] | # [[Articles/PPCGD | GD]] | ||
| - | # [[ | + | # [[Apache w/ PHP Support (PowerPC) | PHP]] |
| - | <font color=red>Note: MySQL is not required for Oxyl~box. This is a good way of saving resources on the Linkstation! | + | <font color=red>Note: MySQL is not required for Oxyl~box. This is a good way of saving resources on the Linkstation!</font> |
=== Installation === | === Installation === | ||
| Line 19: | Line 20: | ||
mkdir /mnt/opt/apache/htdocs/oxylbox | mkdir /mnt/opt/apache/htdocs/oxylbox | ||
| - | Download [http://www.oxyl.de Oxyl~box] into previously created directory then do a changemod | + | Download [http://www.oxyl.de Oxyl~box] from [http://www.oxyl.de/index.php?l=DE&p=5 Download]. Using your PC copy the oxylbox-V2.50_lin.tar.gz file into the previously created directory (/mnt/opt/apache/htdocs/oxylbox), then do a changemod |
cd /mnt/opt/apache/htdocs/oxylbox | cd /mnt/opt/apache/htdocs/oxylbox | ||
| - | |||
chmod a+r /mnt/opt/apache/htdocs/oxylbox | chmod a+r /mnt/opt/apache/htdocs/oxylbox | ||
| + | |||
| + | |||
| + | *''' TODO: Upload a copy of the oxylbox-V2.50_lin.tar.gz file to Linkstation.net upload area (http://downloads.nas-central.org/uploads/) so that a wget can be used to simplify the installation of oxylbox.''' | ||
| + | |||
untar the oxyl tar file in the directory | untar the oxyl tar file in the directory | ||
| Line 53: | Line 57: | ||
-Change the group parameter to the following: | -Change the group parameter to the following: | ||
Group nogroup | Group nogroup | ||
| + | |||
| + | |||
| + | |||
| + | You will now be required to replace the nconvert and libformat.so files, that are in the /mnt/opt/apache/htdocs/oxylbox/bin directory, with a ppc compatible nconvert and libformat.so. | ||
| + | |||
| + | Download the xnview rpm, which contains the nconvert and libformat.so.3.87 files. | ||
| + | |||
| + | cd /mnt/misc | ||
| + | wget http://gd.tuwien.ac.at/graphics/xnview/XnView-static.ppc.rpm | ||
| + | |||
| + | Unpack the rpm file. | ||
| + | |||
| + | rpm2cpio XnView-static.ppc.rpm | cpio -idv | ||
| + | |||
| + | The above mentioned command parameters -idv creates a 'usr' directory in the /mnt/misc directory. Copy the nconvert file from the /mnt/misc/usr/X11R6/bin directory to the /mnt/opt/apache/htdocs/oxylbox/bin directory. Copy the libformat.so.3.87 file from the /mnt/misc/usr/lib directory to the /mnt/opt/apache/htdocs/oxylbox/bin directory. | ||
| + | |||
| + | cp -R /mnt/misc/usr/X11R6/bin/* /mnt/opt/apache/htdocs/oxylbox/bin | ||
| + | cp /mnt/misc/usr/lib/libformat.so.3.87 /mnt/opt/apache/htdocs/oxylbox/bin | ||
| + | cd /mnt/opt/apache/htdocs/oxylbox/bin | ||
| + | mv libformat.so libformat.soOLD | ||
| + | mv libformat.so.3.87 libformat.so | ||
| + | |||
| + | In the above mentioned /mnt/misc/usr/X11R6/bin/ directory are three files, 'nconvert', 'nview', and 'xnview'. Only the nconvert is required, but it doesn't hurt to copy all three files to the /mnt/opt/apache/htdocs/oxylbox/bin directory. | ||
Make a symbolic link for the libformat.so | Make a symbolic link for the libformat.so | ||
| Line 58: | Line 85: | ||
ln -s /mnt/opt/apache/htdocs/oxylbox/bin/libformat.so /bin/libformat.so | ln -s /mnt/opt/apache/htdocs/oxylbox/bin/libformat.so /bin/libformat.so | ||
| - | The following | + | The following commands were also required: |
find /mnt/opt/apache/htdocs/oxylbox -type f -print0 | xargs -0 chmod 644 | find /mnt/opt/apache/htdocs/oxylbox -type f -print0 | xargs -0 chmod 644 | ||
| Line 68: | Line 95: | ||
| - | + | Modify the file functions.inc in the directory /mnt/opt/apache/htdocs/oxylbox/common in the following way (note a " are two single ' ): | |
| - | + | ||
| - | Modify the file functions.inc in the directory /mnt/opt/apache/htdocs/oxylbox/common in the following way: | + | |
| Line 90: | Line 115: | ||
search for | search for | ||
| - | function do_imgconvert($orgpfad,$newpfad,$width,$height,$new_ext,$org_ext= | + | function do_imgconvert($orgpfad,$newpfad,$width,$height,$new_ext,$org_ext=",$quali=80,$o_width=0,$o_height=0){ |
and change it to | and change it to | ||
| - | function do_imgconvert($orgpfad,$newpfad,$width,$height,$new_ext,$org_ext,$quali=80, $o_width=0,$o_height=0){ | + | function do_imgconvert($orgpfad,$newpfad,$width,$height,$new_ext,$org_ext,$quali=80,$o_width=0,$o_height=0){ |
| Line 102: | Line 127: | ||
search for | search for | ||
| - | if($org_ext!= | + | if($org_ext!="&&in_array($org_ext,$GLOBALS['imageextensions_nonc'])&&$GLOBALS['GDLIB_SUPPORT']){ |
and change it to | and change it to | ||
| - | if($org_ext!= | + | if($org_ext!="&&$GLOBALS['GDLIB_SUPPORT']){ |
| Line 119: | Line 144: | ||
if($create_img){ | if($create_img){ | ||
| + | |||
$img_size= getimagesize($orgpfad); | $img_size= getimagesize($orgpfad); | ||
| + | |||
$o_width=$img_size[0]; | $o_width=$img_size[0]; | ||
| + | |||
$o_height=$img_size[1]; | $o_height=$img_size[1]; | ||
| Line 128: | Line 156: | ||
if($create_img){ | if($create_img){ | ||
| + | |||
$img_size= getimagesize($orgpfad); | $img_size= getimagesize($orgpfad); | ||
| + | |||
$o_width=$img_size[0]; | $o_width=$img_size[0]; | ||
| + | |||
$o_height=$img_size[1]; | $o_height=$img_size[1]; | ||
| + | |||
$img = imagecreatetruecolor($width,$height); | $img = imagecreatetruecolor($width,$height); | ||
| + | |||
$ppp =imagecopyresized ($img,$simg,0,0,0,0,$width,$height,$o_width,$o_height); | $ppp =imagecopyresized ($img,$simg,0,0,0,0,$width,$height,$o_width,$o_height); | ||
| + | |||
ImageJPEG($img, $newpfad, $quali); | ImageJPEG($img, $newpfad, $quali); | ||
| + | |||
ImageDestroy($img ); | ImageDestroy($img ); | ||
| + | |||
} | } | ||
| Line 148: | Line 184: | ||
---------- | ---------- | ||
| - | |||
| - | |||
== Run it == | == Run it == | ||
| Line 181: | Line 215: | ||
To come... | To come... | ||
| + | |||
| + | It is also possible to playback .ts files which are created when using a dbox2 receiver to record programmes. For this the .inc file needs to be edited. I can't remember the name of this file but I shall add this the howto when I have more time. | ||
--------- | --------- | ||
| Line 196: | Line 232: | ||
[[Category:HG]] | [[Category:HG]] | ||
| + | [[Category:LS1]] | ||
[[Category:Mediaserver]] | [[Category:Mediaserver]] | ||
[[Category:Howto]] | [[Category:Howto]] | ||
Latest revision as of 01:47, 11 September 2007
Contents |
Requirements
You will need to install:
Note: MySQL is not required for Oxyl~box. This is a good way of saving resources on the Linkstation!
Installation
Create an Oxylbox directory in apache's DocumentRoot (/mnt/opt/apache/htdocs)
mkdir /mnt/opt/apache/htdocs/oxylbox
Download Oxyl~box from Download. Using your PC copy the oxylbox-V2.50_lin.tar.gz file into the previously created directory (/mnt/opt/apache/htdocs/oxylbox), then do a changemod
cd /mnt/opt/apache/htdocs/oxylbox chmod a+r /mnt/opt/apache/htdocs/oxylbox
- TODO: Upload a copy of the oxylbox-V2.50_lin.tar.gz file to Linkstation.net upload area (http://downloads.nas-central.org/uploads/) so that a wget can be used to simplify the installation of oxylbox.
untar the oxyl tar file in the directory
tar xzvf oxylbox-V2.50_lin.tar.gz
Change user:group
chown -R nobody:nogroup /mnt/opt/apache/htdocs/oxylbox
Edit the file /mnt/opt/apache/conf/httpd.conf in the following way:
vi /mnt/opt/apache/conf/httpd.conf
Search for and add/alter the following to the file (You will, at the very least, need to change your port to 81 (or some other port) as 80 is the port that the Linkstation uses for its Webinterface.):
-Port: The port to which the standalone server listens. For -ports < 1023, you will need httpd to be run as root initially. Listen 81
-Oxyls Documentroot; set accordingly DocumentRoot "/mnt/opt/apache/htdocs/oxylbox"
-so that photos/pictures and videos can be displayed
Alias /root/ "/"
-Change the group parameter to the following:
Group nogroup
You will now be required to replace the nconvert and libformat.so files, that are in the /mnt/opt/apache/htdocs/oxylbox/bin directory, with a ppc compatible nconvert and libformat.so.
Download the xnview rpm, which contains the nconvert and libformat.so.3.87 files.
cd /mnt/misc wget http://gd.tuwien.ac.at/graphics/xnview/XnView-static.ppc.rpm
Unpack the rpm file.
rpm2cpio XnView-static.ppc.rpm | cpio -idv
The above mentioned command parameters -idv creates a 'usr' directory in the /mnt/misc directory. Copy the nconvert file from the /mnt/misc/usr/X11R6/bin directory to the /mnt/opt/apache/htdocs/oxylbox/bin directory. Copy the libformat.so.3.87 file from the /mnt/misc/usr/lib directory to the /mnt/opt/apache/htdocs/oxylbox/bin directory.
cp -R /mnt/misc/usr/X11R6/bin/* /mnt/opt/apache/htdocs/oxylbox/bin cp /mnt/misc/usr/lib/libformat.so.3.87 /mnt/opt/apache/htdocs/oxylbox/bin cd /mnt/opt/apache/htdocs/oxylbox/bin mv libformat.so libformat.soOLD mv libformat.so.3.87 libformat.so
In the above mentioned /mnt/misc/usr/X11R6/bin/ directory are three files, 'nconvert', 'nview', and 'xnview'. Only the nconvert is required, but it doesn't hurt to copy all three files to the /mnt/opt/apache/htdocs/oxylbox/bin directory.
Make a symbolic link for the libformat.so
ln -s /mnt/opt/apache/htdocs/oxylbox/bin/libformat.so /bin/libformat.so
The following commands were also required:
find /mnt/opt/apache/htdocs/oxylbox -type f -print0 | xargs -0 chmod 644 find /mnt/opt/apache/htdocs/oxylbox -type d -print0 | xargs -0 chmod 755
Then
chown -R nobody:nogroup /mnt/opt/apache/htdocs/oxylbox
Modify the file functions.inc in the directory /mnt/opt/apache/htdocs/oxylbox/common in the following way (note a " are two single ' ):
A. in the getthumbhref function is needed to submit the original image extension to the do_imgconvert function:
search for
if(!do_imgconvert($fn,$back,$new_size[0],$new_size[1],$img_ext2))
and change it to
if(!do_imgconvert($fn,$back,$new_size[0],$new_size[1],$img_ext2,$img_ext))
B.
in the do_imgconvert function initialisation the parameter $org_ext is set to "". Because of this, the if selection would never use the GD lib functions.
Since we now submit this parameter (see 1.) we have to remove this initialisation:
search for
function do_imgconvert($orgpfad,$newpfad,$width,$height,$new_ext,$org_ext=",$quali=80,$o_width=0,$o_height=0){
and change it to
function do_imgconvert($orgpfad,$newpfad,$width,$height,$new_ext,$org_ext,$quali=80,$o_width=0,$o_height=0){
C.
in the do_imgconvert function a check is done for the image extensions, which can't be converted by nconvert (to use GD Lib only for the unsupported formats by nconvert). Since we are using GD Lib for all extensions, we have to remove this check:
search for
if($org_ext!="&&in_array($org_ext,$GLOBALS['imageextensions_nonc'])&&$GLOBALS['GDLIB_SUPPORT']){
and change it to
if($org_ext!="&&$GLOBALS['GDLIB_SUPPORT']){
D.
at last the image creation in do_imgconvert does not work, because the $o_width and $o_height variables are initialised with 0, but not changed afterwards (the same bug like with $org_ext):
search for
if($create_img){
and change it to
if($create_img){
$img_size= getimagesize($orgpfad);
$o_width=$img_size[0];
$o_height=$img_size[1];
E.
as an additional info - here is my complete version of the image creation (from D.)
if($create_img){
$img_size= getimagesize($orgpfad);
$o_width=$img_size[0];
$o_height=$img_size[1];
$img = imagecreatetruecolor($width,$height);
$ppp =imagecopyresized ($img,$simg,0,0,0,0,$width,$height,$o_width,$o_height);
ImageJPEG($img, $newpfad, $quali);
ImageDestroy($img );
}
Restart apache
/mnt/opt/apache/bin/apachectl restart
Run it
Using your browser, access oxylbox on your Linkstation via LinkstationIPAddress on port 81
http://<LinkstationIPAddress>:81
and setup the oxylbox via oxyl-setup. Make sure you set the playlist directory, choose the language, set showcenter ip and last but not least update the software to v36. Update and install all plugins and skins that become visible on setup page after the update to 36.
Troubleshooting
In the event of something not working as it should, do this and ask for help
Create a file to see your php settings
vi /mnt/opt/apache/htdocs/oxylbox/config/test_php.php
and put this in it
<? phpinfo(); ?>
It should output your PHP settings when you try to reach it.
Screenshots
To come...
It is also possible to playback .ts files which are created when using a dbox2 receiver to record programmes. For this the .inc file needs to be edited. I can't remember the name of this file but I shall add this the howto when I have more time.
For screenshots go to from here

