Saturday, April 25, 2009

uShare Revisited

Quick update, My MyBook died before christmas so was sent away for a replacement. It took aaaaages for the replacement to come back and I've been using an older tower with Ubuntu in the meantime.

I'm finally getting round to transferring everything back to the new MyBook and for some reason, ushare isn't working, despite following my own instructions here. (The very thing this blog was for).

Anyway, not sure what all the problems were, but I've had to alter the ushare.sh script in /etc/init.d in the following ways:

USHARE_OPTIONS has been altered to be "x -f /etc/ushare.conf". Without the -f option, the config file is meant to be loaded as a set of environment variables which ushare sees and uses. This wasn't working, so the -f option forces the config file to be loaded by ushare.

I also had to change the way the check_shares function was called. Changed from $(check_shares) to simply check_shares, the CONFIG_FILE is now read (although that's slightly redundant since ushare stil didn't use the variables set). The original method just wasn't loading the values.

so my ushare.sh now looks like so:


[gordon]$ more /etc/ushare.conf
# /etc/ushare.conf
# Configuration file for uShare

# uShare UPnP Friendly Name (default is 'uShare').
USHARE_NAME="Anya uShare Media Server"

# 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=/shares/internal/VIDEO

# 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=

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

# 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=no

See that comment about my MyBook dying, coming soon: "How to do backups!"