Stream to Xbox360

From PlugWiki
Jump to: navigation, search

This follows the procedure outlined at [1] but is customized for a Plugcomputer running Alpha6 and with an external NTFS harddrive.

sudo apt-get install ushare

Now that you have ushare installed, it is time to configure it! vi /etc/ushare.conf

  1. Set USHARE_NAME=plugcomp (or whatever you want it to be called from the Xbox)
  2. Set USHARE_DIR=/mnt/external (or wahtever you want the drive to be called from the Xbox)
  3. Set ENABLE_XBOX=yes
  4. Set ENABLE_WEB=yes
  5. Save and close the file.
  6. Open ushare by typing
    ushare -t -x -D -f /etc/ushare.conf

Note that you should really only need to type ushare -D at this point, but I found someone else online saying that this solved possible problems in the future. If you are curious, the -x is for Xbox, the -D is for daemon so it runs in the background, and the others are not as important.

If you want the server to start whenever you restart the plugcomputer, you need to do two things.

  1. Add the same line (ushare -t -x -D -f /etc/ushare.conf) to your /etc/rc.local file.
  2. Rename all of the following files so that they are 51 instead of 20.
/etc/rc0.d/K20ushare  /etc/rc3.d/S20ushare  /etc/rc6.d/K20ushare
/etc/rc1.d/K20ushare  /etc/rc4.d/S20ushare
/etc/rc2.d/S20ushare  /etc/rc5.d/S20ushare

You can do this with the command mv /etc/rc0.d/K20ushare /etc/rc0.d/K51ushare (repeat for each one keeping in mind if it is K or S).

What did you just do? Well, by default the daemon for ushare tries to load before the network interface loads. Long story short it doesn't do anything until after, the network interface loads... which happens at S50. (S means the program runs at STARTUP and K means at SHUTDOWN and the number indicates the order). This is a known bug in ushare.[2]


New Files

When you add new files to your shared directories, you need ushare to rescan the folders. This can be done automatically by adding a cronjob.

  1. Open the conjob editor with the following command
    crontab -e
  2. Add a job that runs every 15 minutes that will refresh your files (you can tweak the times accordingly)
    15,30,45,59 * * * * wget http://127.0.0.1:49152/web/ushare.cgi?action=refresh -o -

You also can refresh the shares from somewhere else on your lan if you goto http://[plugcomp]:[port default 49152]/web/ushare.html and click refresh.

Problems

If you are having problems seeing the computer from your Xbox, try to shutdown and restart the program. Shut it down with the following command

/etc/init.d/ushare stop

And start it back up with the command you added to the rc.local file.

ushare -t -x -D -f /etc/ushare.conf

Sources

Original post which gave information about howto connect ubuntu via ushare[3]

Official ushare website [4]

Personal tools