Media Center File Server with Linux and Samba
Mar 16, 2008 at 20:29
A while ago we wrote a guide on how to use FreeNAS and its benefits as a file server for Windows Media Center. Since then Windows released their home server edition, which offers the same functions but in a more familiar GUI and file system. Unfortunately Windows Home Server (WHS) is plagued by a faulty source code and causes file corruption under certain circumstances. More about the WHS issue can be found here. We wanted to explore WHS and its possible Media Center features, however since Microsoft wont fix their faulty code until June or possibly later we wanted to answer a few requests regarding Linux and Media Center.
Not only is Linux extremely reliable but it is also free and runs well on low resource computers. With a great community supporting the different distributions it is no wonder the Linux platform is becoming more and more popular. However, Linux has a steep learning curve and many new adopters will end up consulting forums for hours before they become familiar with the OS.

To setup a file server or Network Attached Storage (NAS), on the other hand is easy and a great option because of all the possibilities Linux can offer as you become more proficient with the OS. And yes your windows machines will be able to hook up to the server, which means, much like our FreeNAS guide you can use the Linux box as your storage and watched folder in Windows Media Center.
Since our test bed is extremely low spec. we choose to use Xubuntu based of the Ubuntus newest release, Ubuntu 7.10 Gutsy Gibbon.
Once you have installed Xubuntu, Ubuntu or any other Linux distro on your machine you'll need to install Unix and Windows network support. Then share a folder, create a samba account and your done. These are the steps:
First go to the top left corner of your desktop and select Applications-->System-->Network. In the network settings window mark "Wired Connections" or "Wireless" if that's what you're using. Then select properties.
Make sure to use DHCP in the configuration field, then click OK.
Next select the general tab, where you can change the host name or leave it at default. We chose Fransatech in our case.

Once you have decided on a host name go to Applications-->System-->Shared Folders. You will be asked to install Unix and Windows network support, if you haven't already. Go ahead and choose "install services".
During our setup, Xubuntu asked us to insert the installation CD before it would proceed to download the NFS and SMB supports packages. In case this happens to you, simply insert your Linux CD an click OK. Then wait for it to finish downloading.
Once the installation is done, Linux will let you know that all changes have been applied and that it's ok to close the window. Simply click the close icon and go to your "home folder" or your "file system" and create a folder you want to use for your shared files. In our case we simply called it "ServerTV" since we will be using for our recorded TV files.
Next, go back to Applications-->System-->Shared Folders. Hit the general properties tab and choose a workgroup name. Again, in our case we picked Fransatech.

After choosing a workgroup name click on the "shared folder" tab and select the "Add" icon. Now browse your way to the folder you want to share and select it. Once you've selected the desired folder, you can add a comment or change the name under "share properties", shown in the picture above. *If you plan on using the shared folder as your storage folder for Windows Media Center, make sure to uncheck the "Read Only" box. Otherwise MCE will not be able to create new recordings on the Linux file server. Then click OK.

Then close the "Shared Folders" window.
Finally you need to create a Samba account and password. Open the terminal by going to applications-->Accessories-->Terminal.
Then type : sudo smbpasswd -a username
Choose whatever username is appropriate, again we chose fransatech. The terminal will ask for your root password, enter it and then choose whatever password you would like to use with the newly created Samba account. If you don't want a password, simply press the "Enter" key, then "Enter" again to confirm the password.
That's it, you're all done with the Linux part! Now it's time to see whether or not your Windows machines can connect to the server.

Start by opening "Run" from the start menu in Windows. Enter "\\(hostname)"

Then enter the username and password you used when creating the Samba account.
You should then be able to access the folders you shared in Linux. In our case we can see the "ServerTV" folder we created for our recorded TV.
To test the network and to see if Media Center would accept the Linux folder we copied over file from one of our HTPC's. The transfer passed with flying colors.
Now it was time to check if Media Center would read the file. Start by opening TweakMCE in "More Programs".
Select "TV"

Then go to "Watched Folders for Recorder TV" Enter the network path, click "Save" then "Exit".
If you want Media Center to save your TV recordings on the file server, enter the same path in "Storage Location for Recorded TV". Hit "Save", then "Exit". Restart Media Center.
To verify if Media Center could read the shared folder we went looking for the "Office Space" file that we copied earlier. As you can see in the picture above, MCE found the duplicate file and displayed it under Recorded TV.
Playback, rewind and fast forward all worked great and we could enjoy Milton in all of his glory.
We hope this guide help in your Linux File Server adventures. If you have any questions, fell free to post a comment.
Tom |
Post a Comment | 








Reader Comments