Update: Broken

uShare, which is no longer maintained, is unable to stream videos or audio as of Ubuntu 12.10. The source code has not been released, and the original developer has stated he has no intention of continuing the project. Although the shares are visible, they do not play. Another free option that is known to work and can operate headlessly is Serviio, a Java-based DLNA/UPnP server.

Introduction

The Xbox 360 has its own implementation of UPnP, meaning that in theory you can share your media without Windows by using open protocols. The reality is more complex, depending on the version of the Xbox 360 dashboard you are running:

Compatibility Warning

Xbox Live users have their Xbox 360 Dashboard software updated regularly as part of Microsoft's update procedures. As such, anyone using the most recent version of the Xbox 360 Dashboard has updated software which implements the Setup Key requirement, part up Microsoft's updates to Windows Media Center for Windows. There are currently no means for Linux to satisfy the Setup Key requirement, and you will not be able to make your updated Xbox 360 talk to your Linux machine.

You can read more about troubleshooting the Setup Key from Microsoft.

For those that have an older version of the Xbox 360 Dashboard software that does not require use of the Setup Key (before March 2012), this guide should work just fine.

Format Compatibility

The Xbox 360 is fussy about media formats. It only supports JPEG images (not GIF or PNG), and you will likely find that quite a few of your videos refuse to play.

A workaround is to use transcode, ffmpeg or mencoder to convert your video to a format that the Xbox 360 can interpret, such as Xvid/MP••••••••3 in an AVI container.

UPnP sharing with uShare

uShare allows a Linux PC to share its files with any other device using UPnP.

Installation of uShare

There are several ways of installing uShare.

From the Ubuntu repositories

uShare is available from the Ubuntu repositories, so you can simply install it from there. After the successful installation of the program, you can proceed at step 2, the configuration.

DIY Version

First, you need to download, compile and install the patched version of uShare.

  1. Set up a build environment.

    $ sudo aptitude install libupnp-dev build-essential
  2. Get the uShare source code from here.

  3. In a terminal, extract the source and then descend into the directory.

    $ tar -jxvf ushare-11a-netou.tar.bz2
    $ cd ushare-1.1a-NeToU
  4. Configure and compile the source

    $ ./configure --prefix=/ --bindir=/usr/bin --mandir=/usr/share/man
    $ make
  5. Create a package and install.

    $ sudo checkinstall -D make install
  6. You'll be presented the following options:

*****************************************
**** Debian package creation selected ***
*****************************************

This package will be built according to these values: 

0 -  Maintainer: [ root@ubuntu-desktop ]
1 -  Summary: [ ushare ]
2 -  Name:    [ ushare-1.1a ]
3 -  Version: [ NeToU ]
4 -  Release: [ 1 ]
5 -  License: [ GPL ]
6 -  Group:   [ checkinstall ]
7 -  Architecture: [ i386 ]
8 -  Source location: [ ushare-1.1a-NeToU ]
9 -  Alternate source location: [  ]
10 - Requires: [  ]
11 - Provides: [ ushare-1.1a ]

Enter a number to change any of them or press ENTER to continue: 2
Enter new name: 
>> ushare
  1. Select option 2 and enter the name uShare then press <enter>

  2. You will also need to change the version number follow the same step this time choosing 3 instead. Enter version number "1.1a" then press <enter> twice. It will now create a DEB Package.

  3. Now you'll have a DEB package created and installed. You can save the DEB for future use.

Configuration

Basic Configuration

There is a tool integrated to automatically create a configuration file. To run it, open a terminal and execute

$ sudo dpkg-reconfigure ushare

In the first step, enter the name of your media server. Then, choose the network-interface to be used by uShare. In the third step, you can enter the paths of the directories you want to share with your Xbox 360. If you have more than one directory you want to share, separate them with a ",". The program will then restart the uShare service.

Advanced Configuration

For advanced configuration of uShare, open and edit /etc/ushare.conf (root access required). In order to enable the Xbox360 support, this step is necessary! Here's an example of how a configuration file can look like:

USHARE_NAME=Ubuntu_Media_Server
USHARE_IFACE=eth0
USHARE_PORT=49200
USHARE_TELNET_PORT=1337
USHARE_DIR=/media1,/media2,/media3
USHARE_OVERRIDE_ICONV_ERR=
USHARE_ENABLE_WEB=yes
USHARE_ENABLE_TELNET=no
USHARE_ENABLE_XBOX=yes
USHARE_ENABLE_DLNA=no

All the lines are explained in the file on your computer by default.

It's important that USHARE_ENABLE_DLNA is set to no, otherwise your Xbox 360 will see the share but won't be able to connect.

Usage

To start the program, just run

$ sudo service ushare start

If you want to start it by default after booting, execute

$ update-rc.d ushare defaults

on a terminal.

Webinterface

To easily manage the shared folders, there is a web-interface you can use. In order to do that, make sure that USHARE_ENABLE_WEB is enabled in the configuration file. You can now enter the web-interface by opening a browser and typing "http://localhost:49200/web/ushare.html" in the address bar. Remember that you have to change the port according to the value you set in the configuration. You are also able to access the web-interface from another computer by simply replacing "localhost" with the computer's IP-address.

Telnet

If you set USHARE_ENABLE_TELNET to yes, you will be able to access the uShare-server with a Telnet-client. Remember to set the port for the Telnet-server in USHARE_TELNET_PORT. Once connected, you are able to use the following commands on the server:

Command

Description

kill

Terminates the uShare server

exit

Exits the interface

help

Shows help information

echod

Echoes all arguments, but with each argument in a new line… DEBUG

echo

Echoes all arguments

Allowing connections through a firewall

If you are using Ubuntu's UFW, you can easily add a rule to cope with this. Let's say your Xbox 360 uses a static IP address of 192.168.10.3, and your server is 192.168.10.2 with UPnP on port 49200. Use the following command to provide a small hole in your firewall for this:

$ sudo ufw allow proto tcp from 192.168.10.3 to 192.168.10.2 port 49200

Removing uShare

You can follow this guide to remove uShare from your computer.

External Links

Xbox360Media (last edited 2013-02-02 23:19:12 by c-76-26-220-25)