Quick Review: Boxee Box
December 27, 2011 – 12:22 am | 3 Comments

Some of the technical issues with Boxee Box could have been fixed if the dev team was paying more attention to addressing the bugs rather than adding “features” of dubious value. In the final analysis, for the price and ease of use, Boxee Box is the best in its class and price range. You just need to be mindful of its limitations and buy it in hope of future improvements to its usability.

Read the full story »
Networking

Unix and Linux network configuration. Multiple network interfaces. Bridged NICs. High-availability network configurations.

Applications

Reviews of latest Unix and Linux software. Helpful tips for application support admins. Automating application support.

Data

Disk partitioning, filesystems, directories, and files. Volume management, logical volumes, HA filesystems. Backups and disaster recovery.

Monitoring

Distributed server monitoring. Server performance and capacity planning. Monitoring applications, network status and user activity.

Commands & Shells

Cool Unix shell commands and options. Command-line tools and application. Things every Unix sysadmin needs to know.

Home » Networking

Sharing Videos from Linux to Xbox 360

Submitted by on December 19, 2008 – 8:49 pmNo Comment
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 ushare

Now 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:

  1. Find largest files
  2. FTP script with nested function
  3. Random Filename Chooser

Leave a comment!

Add your comment below, or trackback from your own site. You can also subscribe to these comments via RSS.

Be nice. Keep it clean. Stay on topic. No spam.

You can use these tags:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre lang="" line="" escaped="" highlight="">

This is a Gravatar-enabled weblog. To get your own globally-recognized-avatar, please register at Gravatar.