Search:  
Gentoo Wiki

HOWTO_Install_wii_Media_Server_X


This article is part of the HOWTO series.
Installation Kernel & Hardware Networks Portage Software System X Server Gaming Non-x86 Emulators Misc

There are a lot of bugs in this HOWTO; pay very close attention. Do not only copy and paste the whole thing!

Contents

Introduction

I love my wii, but it lacks a media player. Red Kawa built a java based flash client media server to allow remote wii computers to play media on a server.

Emerging Java

First, you will need java.

 emerge dev-java/sun-jdk

Secure it first

To keep any buggy applications from possibly creating holes in your system we want to create a user to run the wii server.

 useradd -m wii
 passwd wii

Download Wii Media Center X

Download the wii media center (for Mac Linux or Multi-Platforms) from Red Kawa [1]

 wget http://pspvideo9.intarnut.com/mediacenterx_jar.zip

copy it to the wii user directory (by default /home/wii) and extract it

 cp mediacenterx_jar.zip /home/wii
 cd /home/wii
 unzip mediacenterx_jar.zip
 rm mediacenterx_jar

Configuring Wii Media Server

Before things work properly you'll have to configure the wii media server by editing a few files.

First edit the "webserver.prop" file, and change the line that says IP= to your current ip address.

Now the hard part, change the files: software/Music/files.jsp, software/Music/player.jsp, software/Music/skins/Default/files.jsp, software/Music/skins/DefaultCopy/files.jsp

Modify the line that reads:

 <%@page import="redKawa.mediaCenter.Music.*"%>

change it to read:

 <%@page import="redKawa.mediaCenter.music.*"%>

create an init script (press CTRL+D when finished):

 touch /etc/init.d/wiiMediaCenter
 chmod +x /etc/init.d/wiiMediaCenter
 cat >/etc/init.d/wiiMediaCenter
 #!/sbin/runscript
 
 depend() {
         after *
 }
 
 start() {
         ebegin "Starting wii Media Server"
 
         if [[ -e /etc/conf.d/wiiMediaCenter ]] ; then
                 source /etc/conf.d/wiiMediaCenter
                 su - $runas -c "cd $startdir && java -jar MediaCenter.jar" 2>&1 >$logfile &
         fi
 
         eend $? "Failed to start wii Media Server"
 }
 
 stop() {
         ebegin "Stopping wii Media Server"
 
         if [[ -e /etc/conf.d/wiiMediaCenter ]] ; then
                 source /etc/conf.d/wiiMediaCenter
            pkill -u $runas -f 'java -jar MediaCenter.jar' # This could probably be done better    
         fi
 
         eend $? "Failed to stop wii Media Server"
 }

and a conf.d file:

 touch /etc/conf.d/wiiMediaCenter
 chmod +x /etc/conf.d/wiiMediaCenter
 cat >/etc/conf.d/wiiMediaCenter
 #
 # Which user to run as
 #
 runas=wii
 
 #
 # what directory to start in
 #
 startdir=/home/wii
 
 #
 # where to log
 #
 logfile=/home/wii/mediacenter.log

Finishing touches

Change the permissions of the files in the wii home directory:

 chown -R wii /home/wii 

Copy media to the proper directories:

 Music Files Go Here
 /home/wii/software/Music/music
 Video Files Go Here
 /home/wii/software/Video/videos
 Picture Files go Here
 /home/wii/software/Pictures/images

Have Fun!

Retrieved from "http://www.gentoo-wiki.info/HOWTO_Install_wii_Media_Server_X"

Last modified: Fri, 05 Sep 2008 07:51:00 +0000 Hits: 6,902