HOWTO_Setup_a_UPnP_MediaServer
| This article shows how to set up a UPnP MediaServer that serves Images, Videos and Audio files to all UPnP enabled clients in the network. There are several programs for the Linux platform. For this HOWTO I'm using uShare. | |
Obtaining uShare
Just go to the uShare page and download the source archive. The current version is 0.9.8. When the download is finished, just untar it as usual.
| server ~# | wget http://ushare.geexbox.org/releases/ushare-0.9.8.tar.bz2  |
|
| server ~# | tar xvjf ushare-0.9.8.tar.bz2  |
|
Now you should have a new folder called ushare-0.9.8.
Configuring and Compiling
Change into the folder an execute the configure script. When running configure without the --prefix parameter, version 0.9.8 will use the strange value of NONE/etc/ushare.conf as the config file. So we have to force it to use an empty value. Of course, if you like to have it installed in another place, you can adjust the prefix setting accordingly.
| server ~# | cd ushare-0.9.8  |
|
| server ~# | ./configure --prefix=  |
|
If everything is ok, we can compile and install it.
| server ~# | make && make install-strip  |
|
Now we have the binary at /bin/ushare and the config file at /etc/ushare.conf however the real work starts now.
Creating a init script
If you try to start uShare by simply typing ushare you will get the following error:
| server ~# | ushare  |
Error: no content directory to be shared. |
Why? I don't know, what uShare is looking for, but for sure it's not looking into the config file. So I came up with the idea to write my own init-script. However I still wanted to have the option to change the settings in a config file rather than in the init script itself. So I moved /etc/ushare.conf to /etc/conf.d/ushare. Since this file already has the right syntax, it doesn't need any changes. The only thing left is the init script which looks like this:
That's it.
Start the MediaServer at system startup
Just type
| server ~# | rc-update add ushare default  |
|
and you're done. As soon as you start your computer, the UPnP MediaServer will start to serve the media files.
Last modified: Thu, 04 Sep 2008 11:37:00 +1000 Hits: 3,935
Created by NickStallman.net, Luxury Homes Australia
Real estate agents should be using interactive floor plans and real estate agent tools.