Sharing Videos from Linux to Xbox 360
Xbox 360 uses UPnP protocol to stream multimedia files from computers on your home network. Normally, you would have a Windows PC running WMP and sharing files. But what if you have a Linux box instead? There are several applications capable of sharing videos and music from your Linux computer to Xbox 360, as well as to PS3 and any other device using UPnP. Sometimes these applications may be tricky to configure. Here are instructions for installing UShare. The installation was performed on Ubuntu 8.10 but the same or a similar process would apply to most other Linux flavors.
If you are not logged in as root, prepend each command with “sudo”.
Update list of sources for apt-get:
echo "deb http://www.geexbox.org/debian/ unstable main" >> /etc/apt/sources.list
Install Mercurial, Korn shell and some other stuff:
apt-get install mercurial ksh chkconfig
Get Ushare repository info:
hg clone http://hg.geexbox.org/ushare
Edit Ushare configuration file:
vi /etc/ushare.conf
Make sure the file contains the following entries:
# /etc/ushare.conf # Edit this file with 'dpkg-reconfigure ushare' # Configuration file for uShare # uShare UPnP Friendly Name (default is 'uShare'). USHARE_NAME=<any name to identify this share on the network> # Interface to listen to (default is eth0). # Ex : USHARE_IFACE=eth1 USHARE_IFACE=eth0 # Port to listen to (default is random from IANA Dynamic Ports range) # Ex : USHARE_PORT=49200 USHARE_PORT= # 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/your/videos # 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) ENABLE_WEB=yes # Enable Telnet control interface (yes/no) ENABLE_TELNET= # 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=
The ushare startup script has some problems, so here is a simple but working replacement. Put it in /etc/init.d/ushare, overwriting the existing file:
#!/bin/ksh USHARE=/usr/bin/ushare FLAGS="-x -D -f" CONF=/etc/ushare.conf message() { if [ $? -eq 0 ] then echo "Done" else echo "Failed" fi } usharecheck() { USHAREP=$(ps -ef | grep $USHARE | grep -v grep | wc -l) } usharestart() { usharecheck if [ $USHAREP -eq 0 ] then $USHARE $FLAGS $CONF message else echo "Ushare is already running. Use 'restart' instead." fi } usharestop() { usharecheck if [ $USHAREP -gt 0 ] then ps -ef | grep $USHARE | grep -v grep | awk '{print $2}' | while read PID do kill -9 $PID done fi } case "$1" in start) usharestart ;; stop) usharestop ;; restart) usharestop usharestart ;; status) usharecheck if [ $USHAREP -gt 0 ] then echo "Ushare is running" else echo "Ushare is not running" fi ;; *) exit 1 esac
Let’s make sure all permissions are good:
chmod 755 /etc/init.d/ushare chmod 644 /etc/ushare.conf
Check to make sure ushare will start up when system reboots:
chkconfig -l ushareNow run “/etc/init.d/ushare restart” and fire up your Xbox. Go to “My Xbox” -> “Video Library” and whatever you specified in ushare.conf as “USHARE_NAME” should now appear in Xbox selection video sources.
Popularity: 5% [?]
Related posts:


