Installation
The first step in the installation is to move the mediaserver executable over to your NSLU2 by either copying it using the built-in file server, or by FTP'ing it over. Once it's there, make sure it is executable by typing the following from a NSLU2 command prompt:
chmod +x mediaserver
Next, we need to create a directory for our configuration files. I created a directory that will hold my media as well as my configuration files:
mkdir /share/hdd/data/Media
Then we'll create subdirectories for our content. You may want to experiment with this a bit, because the media server will create its own virtual folders based on media type and categories such as artist, genre, etc. In addition, your client device may reorganize the content in its own way, but here's what I started with:
mkdir /share/hdd/data/Media/Music mkdir /share/hdd/data/Media/Photos mkdir /share/hdd/data/Media/Video
Depending on how you intend on populating the the media directories, you may need to change permissions. In my case, I opened the permissions up fully so that any of my NSLU2 users can read and write content. I did this with a recursive chmod command. For example:
chmod a+rwx -R /share/hdd/data/Media
Normally, executables in the Unslung environment are stored in one of the binary directories under /opt, but for whatever reason, the Twonkyvision server expects to find its configuration files in the same directory as the executable. Instead of cluttering up one of the binary directories with configuration files, I put the mediaserver executable in my Media directory:
mv mediaserver /share/hdd/data/Media/
Next, we need configuration files. If they don't exist, default versions will be created the first time the server is run. So start the server up, let it run for a few seconds, then kill it with a <ctrl>c:
cd /share/hdd/data/Media ./mediaserver <ctrl>c
After the server is stopped, you'll find a couple of new files, twonkyvision-config.html and twonkyvision-mediaserver.ini. First, we're interested in the ".ini" file.
Edit this file and look over the various, well-documented options. The server will run with all of the defaults, but you can make a few changes such as setting the "friendlyname" name to something meaningful. This is the name that will show up on client UPnP devices. I changed mine like so:
friendlyname=NSLU2 UPnP Server
For completeness, I changed the content directory, even though by default the server uses the directory where the executable resides:
contentdir=/share/hdd/data/Media/