How-To:XBOX 360 Media Server in Linux
If you have an XBOX 360 and you’re not using the media capabilities your not completely using your XBOX. The 360 is an excellent way to bring the media on your PC to your living room. Today I’m going to walk you through how to stream video to your 360 using uShare on a computer running linux. It doesn’t need to have very high specs, mine only has a Pentium 4 running at 1.6Ghz with 768 Megs of ram and it streams flawlessly.
Here’s what we’ll need to get started.
- XBOX 360
- Spare Computer with Ubuntu Linux Installed (With as much Hard Drive space as you feel necessary, I have 500 Gigs installed in mine )
- uShare (ver 1.1a)
- Ethernet cable from your Spare computer to your XBOX 360
OK? Now lets get this thing done
First we need to add the GeeXboX package repository to apt because this is where we’re going to get the uShare packages from. To do this we need to open a terminal window and type
sudo gedit /etc/apt/sources.list
We want to add the following lines to the end of this file
##GeeXboX package repository
deb http://www.geexbox.org/debian/ unstable main
Make sure to save this file.
Now from the terminal type the following command to update the apt cache and install ushare
sudo apt-get update; sudo apt-get install ushare
Once the uShare binary is installed you need to edit the ushare.conf file to do this type
sudo gedit /etc/ushare.conf
here’s an example ushare.conf
# /etc/ushare.conf
# uShare UPnP Friendly Name (default is 'uShare').
USHARE_NAME=VIDEOSERVER
# Interface to listen to (default is eth0).
# Ex : USHARE_IFACE=eth1
USHARE_IFACE=eth0
# Port to listen to
USHARE_PORT=49153
# Port to listen for Telnet connections
USHARE_TELNET_PORT=1337
# Directories to be shared (space or CSV list).
# Ex: USHARE_DIR=/dir1,/dir2
USHARE_DIR=/home/user/xbox360
# Use to override what happens when iconv fails to parse a file name.
USHARE_OVERRIDE_ICONV_ERR=yes
# Enable Web interface (yes/no)
ENABLE_WEB=yes
# Enable Telnet control interface (yes/no)
ENABLE_TELNET=no
# Use XboX 360 compatibility mode (yes/no)
ENABLE_XBOX=yes
# Use DLNA profile (yes/no)
# This is needed for PlayStation3 to work (among other devices)
ENABLE_DLNA=no
The main items in this file are
- “USHARE_NAME” is the display name of your share
- “USHARE_IFACE” is the network interface uShare should listen on
- “USHARE_PORT” this is the port the ushare server listens on. Make sure this is set to 49153
- “USHARE_DIR” This needs the full path of the folder with your media.
- “ENABLE_WEB” This turns on the web interface make sure this is set to yes
- “ENABLE_XBOX” This is what enables XBOX 360 compatibility. Make sure it’s set to yes
Save this file.
Now simply start uShare by typing
sudo /etc/init.d/ushare start
You should see a line similar to the following.
* Starting uShare UPnP A/V & DLNA Media Server: ushare
...done.
Now we need to visit the web interface at
http://your.servers.ip.address:49153/web/ushare.html
From this web page click the “Refresh Shares …” button
Now if you switch on your XBOX 360 you should be able to browse to the “media” blade then go to the “Video” option if you press “X” you should see the text you entered into “USHARE_NAME” in the ushare.conf file. You can now browse and stream compatable videos (divX, xvid, mp4, mov, mpeg, avi) from your Linux server to your XBOX 360.
If you’re not able to see the uShare share from your XBOX you may need to edit the following file
sudo gedit /etc/init.d/ushare
Find the following lines
start-stop-daemon --start --quiet --background --oknodo \
--make-pidfile --pidfile $PIDFILE \
--exec $DAEMON -- $USHARE_OPTIONS
And change them to
start-stop-daemon --start --quiet --background --oknodo \
--make-pidfile --pidfile $PIDFILE \
--exec $DAEMON -- $USHARE_OPTIONS --xbox
Now restart uShare
sudo /etc/init.d/ushare stop
sudo /etc/init.d/ushare start
And you should now be able to see your share from the XBOX 360
Have fun and happy viewing!
Send any feedback to liam.macinnes (at) gmail (dot) com
If you enjoyed this post, make sure you subscribe to my RSS feed!
July 30th, 2008 at 9:38 am
What distro of linux are you using? I’m currently using an old PIII 600, 512MB ram with 2x 250MB IDE hard drives running windows home server to stream content to my Xbox 360. I’m having more than a few issues with windows home server so I figured I’d give linux a go as a file/media server. Any advice you have would be great.
August 11th, 2008 at 8:37 am
As long as you’re not doing any transcoding (Your videos are already n a format the Xbox understands) then you should be good.
August 19th, 2008 at 11:46 am
Whoops forgot the main question you asked. I’m using Ubuntu Server
August 26th, 2008 at 2:50 pm
Will this work on other Linux distros, I’m thinking about getting a Linux NAS box.
August 26th, 2008 at 5:34 pm
uShare should work with other distros. But you’ll probably need to find packages for your distro of choice or compile it from source if none are available. From what I understand a lot of NAS devices actually have a DLNA server built in (so they may or may not be xbox 360 compatable out of the box. So a search on the NAS device youre looking at you may not even need to install uShare on it.
September 1st, 2008 at 9:16 am
You are the shit, thanks a million I followed your instructions and it works perfect, nice goin bro!
September 3rd, 2008 at 6:36 pm
Great guide! Installs like a charm.
I’m not sure if you can offer any insight, but if there is a ‘problem’ with a video while I’m watching it on my Xbox360, the uPnP server becomes unresponsive and the Xbox doesn’t ’see’ it anymore.
From there, I can restart the uShare service, restart the Xbox, and it still doesn’t work.
If I reboot the computer and the Xbox, it starts working again.
Might you know what is causing that?
Thanks!
September 10th, 2008 at 11:21 pm
When I try to go to the web interface, I get a network timeout because it takes too long to respond. What am I doing wrong? Thanks for your help.
September 11th, 2008 at 7:24 am
Hi Jim.
Make sure that the AppArmor in Ubuntu isn’t blocking oyu from connecting. To test this try turning it off trying the web interface and turning it back on again.
turn apparmor off: sudo /etc/init.d/apparmor stop
turn ustream off: sudo /etc/init.d/ushare stop
turn ustream on: sudo /etc/init.d/ushare start
Try the web interface.
turn apparmor back on if this didn’t help: sudo /etc/init.d/apparmor start
What version of Ubuntu are you using?
September 20th, 2008 at 3:01 am
People who talk like this should be forced to wear ankle monitors.
September 20th, 2008 at 7:18 pm
Just a note, wlan0 connections didn’t seem to work, I couldn’t get the xbox to recognize my uShare until I switched to a wired (eth0)connection. No laptop love ;-).
September 20th, 2008 at 7:46 pm
Addendum to my last comment.. might not want to moderate it… It seems*cough* I was wirelessly connected to someone elses secured network.. >.>
September 21st, 2008 at 2:32 am
@ubidubi ……? ok sure. Not quite sure what you mean but OK your opinion.
October 16th, 2008 at 9:53 pm
@LiamM: Thank you, your instructions worked like a charm first try, My 46 inch Samsung HDTV and I now rate you among one of our Ubuntu heroes. No more using WMP11 through VirtualBox just to watch my movies, It appears ushare doesn’t work with jpeg images but it is still a very worthwhile tool.
November 5th, 2008 at 10:42 am
Hey, thanks for the instructions. I got the ushare up and running in Ubuntu and the xbox can see it, but when I try to play a .avi video on my xbox through ushare it says it can’t play that content because it is not supported. This exact video worked when streaming it from XP. So keeping in mind that I’m fairly new to linux, any ideas as to what I did wrong? Some thoughts I have are, I FTPed the file from xp to linux, could that in some way change the file? Or, do I need some sort of codecs for linux?
November 19th, 2008 at 6:28 am
got this working but can’t share more than one directory. tried space separated and csv but no joy. even adding more via web interface didn’t help.
Also sharing music just shows a long list of songs regardless of whether you choose album, songs or genre.
any ideas on sharing more than one directory?
Thanks
November 29th, 2008 at 7:11 pm
You are awesome man……. Worked great for me…. Linux / Ubunto is the shizzznit.
December 1st, 2008 at 3:46 pm
Works great with one little hitch…….. i have two 360’s and using this method i can only stream media to one of them at a time. If one is running its connection gets bumped when i start watching media on the other. Any ideas?
December 3rd, 2008 at 6:16 pm
Thanks for the tutorial! I have one question, however - is it possible to do this on a LAN (rather than running an Ethernet cable direct from the server to the Xbox) - meaning can I hook up both the server and the Xbox to a router and make this work that way?
Thanks again!
December 3rd, 2008 at 10:30 pm
@Jon I’m not sure about that. As far as I know the 360 itself does that actual decoding (and thus playing) of the video file anything that plays from Windows “should” play from uShare in linux. Keep in mind that I don’t have a windows install currently to test this from.
@Tony I ran into the same issue with the music files. I’ll be revisiting this in the new year when I have some time to see if I can iron out some of the nagging issues like that.
@mediaguy I don’t think uShare locks the stream in any way. How are your 360’s wired up to the Linux PC? Depending on the video you may be trying to pull too much data from the server at once. I’ll do some testing with this as well and try to find a solution for you in the new year.
@Ally Certainly in fact that’s very similar to the setup I’m using myself. This should work just as well with the 360 and computer both hooked up to the same router or switch.