How to set up uShare media server on Fedora / CentOS to stream video and pictures to Xbox 360 or PS3 11

You don’t need a Windows Media Center PC to share pictures, videos, or music with an Xbox 360. If you’ve got a Fedora / RHEL/ CentOS box on your home network and you’d like to use it as a UPnP and DLNA Media Server so that you can stream files to your Xbox 360 or PS3, here are some easy-to-follow instructions on how to set it up.

This tutorial will walk you through installing and configuring uShare, a freeware app that will handle all the server-side stuff for you. According to the uShare site:

uShare is a UPnP A/V & DLNA Media Server. It implements the server component that provides UPnP media devices with information on available multimedia files. uShare uses the built-in http server of libupnp to stream the files to clients.

GeeXboX uShare is able to provide access to both images, videos, music or playlists files. It does not act as an UPnP Media Adaptor and thus, can’t transcode streams to fit the client requirements.

Before you start

Here’s what you need to do before you get started:

  1. You should have¬†SELinux disabled (Google “disable SELinux” if you don’t know how to check SELinux status or turn it off).
  2. If you’re using CentOS or RHEL, you need to have the EPEL Repository enabled on your system. Fedora users already have the proper repo (@fedora) enabled by default.
  3. Realize that these instructions were written and tested with RedHat-based distros (Fedora 14 and CentOS 5.5, to be exact). If you’re running Ubuntu or some other flavor of Linux, these instructions might work with slight modifications, but I have no way of testing or verifying. Please proceed at your own risk.

Install uShare

Installing uShare is as simple as:

yum install ushare

This will also install a number of dependencies, including libupnp, the portable Linux SDK for UPnP devices.

Create a Media Directory

If you already have a directory on your Linux box where you store media you’ll want to share, then you can skip this step. If you don’t have one, you’ll need to create one. I recommend using /usr/local/media. You can make this directory with:

mkdir /usr/local/media

Obviously, you’re going to want some media in there to test things out. I recommend a simple .JPG file or a small .WMV file (or you can check out the full list of Xbox 360 supported media formats).

Configure uShare

All the configuration options for uShare are in the /etc/ushare.conf file. Most of the default values are fine, but I’m a fan of hard-coded options, and I recommend the following settings:

# /etc/ushare.conf
# Configuration file for uShare

# uShare UPnP Friendly Name (default is 'uShare').

# Interface to listen to (default is eth0).
# Ex : USHARE_IFACE=eth1

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

# Port to listen for Telnet connections

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

# 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

# Enable Web interface (yes/no)

# Enable Telnet control interface (yes/no)

# Use XboX 360 compatibility mode (yes/no)

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

On Line 5, you can choose whatever name you wish for your media server (but it can’t contain spaces).

On Line 21, you can share multiple directories by including their full path here and separating them with commas (or spaces).

On Line 40, for Xbox 360 compatibility, make sure USHARE_ENABLE_XBOX is set to “yes.”

On Line 44, for compatibility with PlayStation 3 and other DLNA-enabled devices, make sure USHARE_ENABLE_DLNA is set to “yes.” If you’re only going to connect to an Xbox 360, you can set this to “no.”

Enable uShare at Startup

Assuming you want uShare to fire up automatically when you boot your machine, do:

chkconfig --level 345 ushare on

Check your Firewall Settings

If you don’t have the Linux firewall (iptables) enabled, you can skip this step. But if you do, you’ll need to open up TCP port 49200 (which is the port you set up in the configuration file), and UDP port 1900 (for SSDP, the Simple Service Discovery Protocol).

Add these two ports to your firewall settings and then save the new firewall configuration with these three commands:

iptables -A INPUT -m state --state NEW -m tcp -p tcp --dport 49200 -j ACCEPT
iptables -A INPUT -m state --state NEW -m udp -p udp --dport 1900 -j ACCEPT
service iptables save

Start the uShare daemon

Now you’re ready to start up uShare and test things out. Do:

service ushare start

If you set everything up properly, you should get:

Starting ushare:                                           [  OK  ]

If it doesn’t start up properly, check the error message for a hint at what might have gone wrong, and verify that your /etc/ushare.conf settings match mine.

Testing things out

Fire up your game console and go to the video, picture, or audio sharing menu(s). The name you picked for your media server should be visible, and the media in your shared folders should be available to access.

If you can’t see your media server, the first troubleshooting step is to disable your firewall with:

service iptables stop

If sharing works with your firewall disabled, then you know uShare is working fine and you need to examine your firewall settings.

If it still doesn’t work after disabling your firewall, keep your firewall disabled while you edit your configuration settings (always do service ushare restart after changing any configuration files), then once you get it working you can re-enable your firewall and test again.

Happy sharing!

  • Pingback: Tweets that mention How to set up uShare media server on Fedora / CentOS to stream video and pictures to Xbox 360 or PS3 | Steve Jenkins' Blog --

  • Gene

    I had uShare streaming perfectly to my xbox while running ubuntu 10.04. The hard drive the OS was installed on died (all my media is stored on multiple external HDD’s). I wanted to try a “server” OS so I went with CentOS 6. I can get many of the old media to play, but some (a lot) of the .avi’s won’t play. The ALL played before. Nothing has changed other than the OS. Same build of uShare, etc. Could I be missing codec’s? What can you recommend?

    • Hi, Gene. The codecs are all handled on the client (player) side, so that wouldn’t be the problem. It sounds to me uShare isn’t handling the .avi MIME type properly. Make sure you have the latest version of uShare (1.1a as of today). It’s possible that the repository you were using to install on CentOS had an older version of uShare, which had a problem handling .avi files. You may have to compile your own version of it, but that isn’t hard. Check out for the latest download and instructions on compiling it.

      Let me know if that does the trick!

  • Bjarki Scott

    Hi Steve,

    I was using uShare with Ubuntu 11.10 and my Xbox 360 and it worked fine. I switched over to F16 and I have set up the config just as described here above. My Xbox however does not find my computer, when I type in ‘service ushare start’ I get an OK, and when i type in ‘ushare -x’ for xbox compatibility it shows:

    uShare (version 1.1a), a lightweight UPnP A/V and DLNA Media Server.
    Benjamin Zores (C) 2005-2007, for GeeXboX Team.
    See for updates.
    Initializing UPnP subsystem …
    Starting in XboX 360 compliant profile …
    UPnP MediaServer listening on ‘ipadress’
    Sending UPnP advertisement for device …
    Listening for control point connections …
    Building Metadata List …
    Looking for files in content directory : /sharedfolder
    Found 20 files and subdirectories.

    So everything seems to be in order, only the console can’t find the computer.

    Any ideas?

    Thanks in advance,

    • Jay

      Just a stab in the dark, did you open up the required ports in the firewall (iptables)? I installed uShare on a CentOS 5 box last weekend and had to open up several ports, but I don’t remember what they were exactly. I know for sure that I had to open port 49200 for TCP.

      Hope that helps!

  • Yorg

    Does anyone have a solution to the problem where when you add new media, you have to restart the uShare service for the new media to be detected? Thanks in advance!

  • DeJaWu

    this solution does not supported by centos anymore.
    find some else

  • I’ve been running F17 and I continually run into a bright red [FAILED] whenever I try to start. When I try to figure out why, I get the response:

    ushare.service – SYSV: uShare UPnP A/V Media Server.
    Loaded: loaded (/etc/rc.d/init.d/ushare)
    Active: failed (Result: exit-code) since Tue, 21 Aug 2012 23:12:46 -0700; 3min 43s ago
    Process: 973 ExecStart=/etc/rc.d/init.d/ushare start (code=exited, status=1/FAILURE)
    CGroup: name=systemd:/system/ushare.service

    Aug 21 23:12:46 Alfred runuser[974]: pam_unix(runuser:session): session ope…0)
    Aug 21 23:12:46 Alfred ushare[973]: Starting ushare: [FAILED]

    Any Ideas?

    • flugen

      Check that your all of your ushare settings are correct. I had the same problem until I remembered that Fedora defaulted my ethernet connection to p14p1 instead of eth0. Fixing that in ushare.conf fixed that issue. Now I just need my xbox to find the server…

  • Si

    im having difficulty with the disc partitions as iv dedicated part of the hard drive to media in windows I would refer to it as the “E:” Drive but linux sees it as “TOSHIBA MK3265GSXV: Programs” apologies for sounding dumb but im new too linux. what term do i use in the config file to change to this partition? thanks in advance

  • Pingback: Compartir archivos multimedia entre varios dispositivos | ServOS()