HOWTO: Ubuntu UPnP Server to XBox 360 using uShare

02Jan11

I recently got an Xbox 360, not a new 360 S, but the older 360. The ones that tend to cook themselves after a period of time 🙄

Well anyway, over the holidays, I had wanted to take a motherboard I had lying around, a PCI graphics card, a cheap network adapter, shove it all in a little case, and with a VGA – VGA cable, connect it to my TV, in order to play back the many movies and TV shows I have stored on my server.

I hadn’t gotten around to it by the time the 360 arrived on the scene. The 360 is really just a computer, a tri-core at 3.2GHz with 512Mb of RAM, making it quite powerful. Powerful enough for full HD gaming. And, it has a built in UPnP client, meaning that we can stream media to it, videos, pictures, music, so long as it’s in the right format or you can set it up as a Windows Media Centre extender.

Now, let’s begin, using a program called ushare.

On Ubuntu, install ushare from the repo’s using Synaptic or typing the following into a terminal;

sudo apt-get install ushare

Hit Enter and give your password, hitting Enter again.

Once it’s installed, it’s incredibly easy to setup. Simply edit the config using;

sudo nano /etc/ushare.conf

and make it look like the following, entering the name of your computer and media directory where required

# /etc/ushare.conf
# Edit this file with 'dpkg-reconfigure ushare'
# Configuration file for uShare

# uShare UPnP Friendly Name (default is 'uShare').
USHARE_NAME=Computer_Name

# Interface to listen to (default is eth0).
# Ex : USHARE_IFACE=eth1
USHARE_IFACE=eth1   <<  Change this to suit your network interface (default = eth0)

# Port to listen to (default is random from IANA Dynamic Ports range)
# Ex : USHARE_PORT=49200
USHARE_PORT=49200

# Port to listen for Telnet connections
# Ex : USHARE_TELNET_PORT=1337
USHARE_TELNET_PORT=

# Directories to be shared (space or CSV list).
# Ex: USHARE_DIR=/dir1,/dir2
USHARE_DIR=/path/to/media

# Use to override what happens when iconv fails to parse a file name.
# The default uShare behaviour is to not add the entry in the media list
# This option overrides that behaviour and adds the non-iconv'ed string into
# the media list, with the assumption that the renderer will be able to
# handle it. Devices like Noxon 2 have no problem with strings being passed
# as is. (Umlauts for all!)
#
# Options are TRUE/YES/1 for override and anything else for default behaviour
USHARE_OVERRIDE_ICONV_ERR=

# Enable Web interface (yes/no)
USHARE_ENABLE_WEB=yes

# Enable Telnet control interface (yes/no)
USHARE_ENABLE_TELNET=no

# Use XboX 360 compatibility mode (yes/no)
USHARE_ENABLE_XBOX=yes

# Use DLNA profile (yes/no)
# This is needed for PlayStation3 to work (among other devices)
USHARE_ENABLE_DLNA=no

Start up the server with;

sudo /etc/init.d/ushare start

And you’re done!

uShare does have some limitations though, namely the lack of on-the-fly transcoding, meaning you’ll have to make sure that your media is in the correct format. Xbox seems to play well with .avi files generally, and some mp4’s.

It also doesn’t automatically update itself, meaning you’ll have to restart it manually when new videos are added. Personally, I use a crontab to restart the server at 3am. To do so open,

sudo nano /etc/crontab

and add to the bottom;

#Refresh uShare
00 03   * * *   root    /etc/init.d/ushare stop
01 03   * * *   root    /etc/init.d/ushare start

That should do it. Each night at 3am, ushare will restart (for some reason the restart flag doesn’t work).

I’m looking into an alternate solution, and may put up a post in the near future if it works out better.



12 Responses to “HOWTO: Ubuntu UPnP Server to XBox 360 using uShare”

  1. 1 powertower

    Worked great for me and my xbox on Ubuntu 10.10.

  2. 2 Willem

    Solid performance and quick for movies. Not so much for your music collection. Cannot handle folders and won’t play my MP3s. Converting them to WMA is a solution but the sorting is still a mess.

  3. Worked great for my Ubuntu 11.04 and 360. Just to add an obvious thing that may not be obvious to a noob like me, you have to click save (ctrl + x) after you change the set up file for ushare.

  4. I’m not sure what I was doing wrong, but I had to change the port to 49153 to get it to work.

    • 6 evidex

      Strange, could have been a local firewall problem or something?

  5. Reblogged this on FRANCESCO DI FUSCO.

  6. 9 Julian

    Thank You. Now I can stream my son’s cartoons to his room with the xbox360s.

  7. 11 Clinton

    This guide is a bit outdated, as the Xbox360 now requires an additional setup step for setting up your Media Center PC to talk to the Xbox360. During the PC setup on the most receent version of the Dashboard, an 8-digit “setup key” is previded by the Xbox360 to be entered into the Media Center software. More info is available at:

    http://www.xbox.com/pcsetup

    Unfortunately, there doesn’t seem to be a way to do this with ushare to allow the validation to complete and ultimately allow the Xbox360 to talk to one’s linux box.

    Would love to see this updated to allow this to work!


  1. 1 HOWTO: Ubuntu UPnP Server to XBox 360 using uShare « Linux Expresso | FRANCESCO DI FUSCO