Finally got around to networking the house

Finally got around to networking the house.
Laptop (Linux)
Desktop (Linux)
Phone (Android)
TV (Samsung running Linux kernel)
Sky+
Xbox 360 (Windows based

)

All hooked up to the interweb and to each other.
Only thing is I’m worried they might start conspiring against me.

HAHAHA … Linux won’t conspire against you, can’t talk for the Xbox though :wink:

Have you got one (or all) of the Linux boxes acting as a streaming media server for Xbox 360 yet ?

Will have both but haven’t tried either yet. Been to busy setting up Live account and streaming media from the phone to the tv.
Why do you ask? am I going to have fun setting up.

Not in the least … it’s VERY easy … just wondered if you had done it and/or knew how :slight_smile:

Install ushare on the Linux box, then follow this guide:

Any problems, gimme a shout :slight_smile:

Just in case it helps … here’s my /etc/ushare.conf file (obviously you’d need to set different ports and USHARE_NAME on each Linux box)

# /etc/ushare.conf # Edit this file with 'dpkg-reconfigure ushare' # Configuration file for uShare

uShare UPnP Friendly Name (default is ‘uShare’).

USHARE_NAME=Marks-PC

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

Port to listen for Telnet connections

Ex : USHARE_TELNET_PORT=1337

USHARE_TELNET_PORT=1338

Directories to be shared (space or CSV list).ushare -x

Ex: USHARE_DIR=/dir1,/dir2

USHARE_DIR=/home/mark/Music,/home/mark/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 intoushare -x

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

Enable Web interface (yes/no)

USHARE_ENABLE_WEB=no

Enable Telnet control interface (yes/no)

USHARE_ENABLE_TELNET=no

Use XboX 360 compatibility mode (yes/no)

USHARE_ENABLE_XBOX=yes

Use DLNA profile (yes/no)ushare -x

This is needed for PlayStation3 to work (among other devices)

USHARE_ENABLE_DLNA=no

Once you’ve edited the /etc/ushare.conf file … SAVE it, then run:

sudo /etc/init.d/ushare stop

and

ushare -x

to restart it with the new settings.

Then just fire up your Xbox and look in Videos or Music and whatever you put it the USHARE_NAME= feild will be listed :slight_smile:

From now on, ushare should start at bootup.

Damn, you’d think I could do this by now wouldn’t you, but no, I even managed to Bu**er this up.

I installed and ran set up, changed the name to Laptop, Ushare_iface to wlan0 and added a directory to share.
Run “sudo /etc/init.d/ushare stop” then ushare -x and got

/etc/ushare.conf: 6: Laptop: not found

and something about wlan0 not working, so in my wisdom I thought I would uninstall it and re install and start again but then I got this

celticbiker@celticbiker-laptop:~$ sudo apt-get install ushare
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages were automatically installed and are no longer required:
  linux-headers-2.6.35-22 linux-headers-2.6.35-22-generic
Use 'apt-get autoremove' to remove them.
The following NEW packages will be installed
  ushare
0 upgraded, 1 newly installed, 0 to remove and 2 not upgraded.
Need to get 0B/51.6kB of archives.
After this operation, 238kB of additional disk space will be used.
Preconfiguring packages ...
/etc/ushare.conf: 6: Laptop: not found
ushare failed to preconfigure with exit status 127.
Selecting previously deselected package ushare.
(Reading database ... 160522 files and directories currently installed.)
Unpacking ushare (from .../ushare_1.1a-0ubuntu5_i386.deb) ...
Processing triggers for man-db ...
Processing triggers for ureadahead ...
Setting up ushare (1.1a-0ubuntu5) ...
/etc/ushare.conf: 6: Laptop: not found
dpkg: error processing ushare (--configure):
 subprocess installed post-installation script returned error exit status 127
Errors were encountered while processing:
 ushare
E: Sub-process /usr/bin/dpkg returned an error code (1)
celticbiker@celticbiker-laptop:~$ sudo dpkg-reconfigure ushare
/usr/sbin/dpkg-reconfigure: ushare is broken or not fully installed.

and I can’t seem to edit the config file directly.

ok, run:

sudo apt-get install ushare

when that’s done, run:

gedit /etc/ushare.conf

and post its contents here.

See above post now edited

try this:

sudo apt-get remove --purge ushare

then if that works

sudo apt-get install ushare

and let me know if there were any errors

Seemed to install ok that time.
[codecelticbiker@celticbiker-laptop:~$ sudo apt-get remove --purge ushare
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages were automatically installed and are no longer required:
  linux-headers-2.6.35-22 linux-headers-2.6.35-22-generic
Use 'apt-get autoremove' to remove them.
The following packages will be REMOVED
  ushare*
0 upgraded, 0 newly installed, 1 to remove and 2 not upgraded.
1 not fully installed or removed.
After this operation, 238kB disk space will be freed.
Do you want to continue [Y/n]? y
(Reading database ... 160536 files and directories currently installed.)
Removing ushare ...
 * Stopping uShare UPnP A/V & DLNA Media Server: ushare                  [ OK ] 
Purging configuration files for ushare ...
Processing triggers for ureadahead ...
Processing triggers for man-db ...
celticbiker@celticbiker-laptop:~$ sudo apt-get install ushare
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages were automatically installed and are no longer required:
  linux-headers-2.6.35-22 linux-headers-2.6.35-22-generic
Use 'apt-get autoremove' to remove them.
The following NEW packages will be installed
  ushare
0 upgraded, 1 newly installed, 0 to remove and 2 not upgraded.
Need to get 0B/51.6kB of archives.
After this operation, 238kB of additional disk space will be used.
Preconfiguring packages ...
Selecting previously deselected package ushare.
(Reading database ... 160521 files and directories currently installed.)
Unpacking ushare (from .../ushare_1.1a-0ubuntu5_i386.deb) ...
Processing triggers for man-db ...
Processing triggers for ureadahead ...
Setting up ushare (1.1a-0ubuntu5) ...
 * Starting uShare UPnP A/V & DLNA Media Server: ushare ]

I’ll try again now.
While you’re here though, how do I know which interface to use

Interface to listen to (default is eth0).

Ex : USHARE_IFACE=eth1

USHARE_IFACE=eth0

and which ports to listen to

Port to listen to (default is random from IANA Dynamic Ports range)

Ex : USHARE_PORT=49200

USHARE_PORT=49201

Port to listen for Telnet connections

Ex : USHARE_TELNET_ PORT=1337

USHARE_TELNET_ PORT=1338

USHARE_IFACE=
should be the network interface that you use to connect to your router:

Seeing that you named ushare “Laptop”, I’m guessing wireless ? … in which case it probably should be:
USHARE_IFACE= wlan0

do you connect wirelessly or wired ?

and what is the output from:

ifconfig

The ports should be OK as long as they aren’t being used by something else (which I doubt)

but obviously, youd want to raise/lower them by +1 (or whatever) for each Linux box you run ushare on … if you get my meaning

[edit]

you could brobably leave the
USHARE_TELNET_ PORT=
field blank if you are setting the
USHARE_ENABLE_ TELNET=no
if you wish.

celticbiker@celticbiker-laptop:~$ ifconfig
eth0      Link encap:Ethernet  HWaddr 00:15:c5:43:37:d6  
          UP BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)
          Interrupt:17 

lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:112 errors:0 dropped:0 overruns:0 frame:0
          TX packets:112 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:18340 (18.3 KB)  TX bytes:18340 (18.3 KB)

wlan0     Link encap:Ethernet  HWaddr 00:18:de:0d:4e:ba  
          inet addr:192.168.0.6  Bcast:192.168.0.255  Mask:255.255.255.0
          inet6 addr: fe80::218:deff:fe0d:4eba/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:27851 errors:0 dropped:0 overruns:0 frame:0
          TX packets:26097 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:26654896 (26.6 MB)  TX bytes:5966737 (5.9 MB)

[

Yup that line should read:

USHARE_IFACE=wlan0

for clarity, that’s a zero on the end :wink:

Changed it from eth0 to wlan0 and this happens

celticbiker@celticbiker-laptop:~$ sudo /etc/init.d/ushare stop
 * Stopping uShare UPnP A/V & DLNA Media Server: ushare                  [ OK ] 
celticbiker@celticbiker-laptop:~$ ushare -x
Interface wlan0 is down.
Recheck uShare's configuration and try again !
uShare (version 1.1a), a lightweight UPnP A/V and DLNA Media Server.
Benjamin Zores (C) 2005-2007, for GeeXboX Team.
See http://ushare.geexbox.org/ for updates.
Initializing UPnP subsystem ...
Starting in XboX 360 compliant profile ...
UPnP MediaServer listening on 192.168.0.6:49153
Sending UPnP advertisement for device ...
Listening for control point connections ...
Building Metadata List ...
Looking for files in content directory : /home/celticbiker/Pictures
Found 142 files and subdirectories.

run this:

gedit /etc/ushare.conf

and post the contents

I take it wireless is working ?

# /etc/ushare.conf
# Edit this file with 'dpkg-reconfigure ushare'
# Configuration file for uShare

# uShare UPnP Friendly Name (default is 'uShare').
USHARE_NAME=Celticbiker

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

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

# 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=/home/celticbiker/Pictures

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

# Enable Web interface (yes/no)
USHARE_ENABLE_WEB=no

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

# Use XboX 360 compatibility mode (yes/no)
USHARE_ENABLE_XBOX=yes

# Use DLNA profile (yes/no)ushare -x
# This is needed for PlayStation3 to work (among other devices)
USHARE_ENABLE_DLNA=no

Yup, running this laptop and the desktop on wireless.

change this:
USHARE_OVERRIDE_ICONV_ERR=yes
to
USHARE_OVERRIDE_ICONV_ERR=

save the file, and reboot your laptop … then see if anything displays on the Xbox, in Pictures.

Though it must be said that most of my pics come up as unreadable … I’ll work that out in a minute

Well regardless of what it says (I know you’re going to roll your eyes and tut a lot here) I hadn’t actually tried it, I was just trying to configure ushare.
However I just turned the xbox on and had a look and the pictures were there so it is connected.
Thanx for your help on this so far Mark but I gotta be up @06:00 so gonna cach a few Z’s.
Will get back to you tomorrow.

OK… cya later :wink:

[EDIT]

Seems that tutorial was wrong or outdated …

The way to stop, start, or restart ushare is now:-

Stop:

sudo service ushare stop

Start:

sudo service ushare start

Restart:

sudo service ushare restart

Ushare must be stopped/started (or restarted) when new pics are added to the folder before they will be displayed on the Xbox (either manually, or via a reboot)

Pictures that the Xbox doesn’t like (so far I’ve discovered it doesn’t like .png and .gif), not only won’t display, but if they are in your shared folder(s) at all, even subfolders, will stop the others displaying … so put them somewhere else.

If you restart Ushare from the command line, you may have to either restart the xbox, or at least come out of Pictures, and re-enter.

other than that … have fun :slight_smile:

Any questions … just ask :wink:

What’s the correct syntax for multiple folder locations?
Would it be
file path:file path
With no spaces?

NO, they are comma separated values/paths … so like this:

USHARE_DIR=/home/celticbiker/SharedDir1,/home/celticbiker/SharedDir2,/home/celticbiker/SharedDir3

no spaces :slight_smile:

Then restart Ushare, either from the command line. or with a reboot.