个人工具

“UbuntuHelp:Xbox360Media”的版本间的差异

来自Ubuntu中文

跳转至: 导航, 搜索
(新页面: {{From|https://help.ubuntu.com/community/Xbox360Media}} {{Languages|UbuntuHelp:Xbox360Media}} == Xbox 360 Media sharing == The Xbox 360 has its own implementation of [http://en.wikipedia....)
 
第28行: 第28行:
 
$ sudo checkinstall -D make install
 
$ sudo checkinstall -D make install
 
</nowiki></pre>
 
</nowiki></pre>
</li><li>In the Checkinstall prompts, give it the name 'ushare' and version '1.1a'.
+
</li><li>You'll be presented the following options:</li></ol>
</li><li>Now you'll have a DEB package created and installed. You can save the DEB for future use.
+
 
</li><li>To edit uShare's configuration, open /etc/ushare.conf in your favourite editor and set the following (adjust to your requirements).<pre><nowiki>
+
<pre><nowiki>
 +
*****************************************
 +
**** Debian package creation selected ***
 +
*****************************************
 +
 
 +
This package will be built according to these values:
 +
 
 +
0 -  Maintainer: [ root@ubuntu-desktop ]
 +
1 -  Summary: [ ushare ]
 +
2 -  Name:    [ ushare-1.1a ]
 +
3 -  Version: [ NeToU ]
 +
4 -  Release: [ 1 ]
 +
5 -  License: [ GPL ]
 +
6 -  Group:  [ checkinstall ]
 +
7 -  Architecture: [ i386 ]
 +
8 -  Source location: [ ushare-1.1a-NeToU ]
 +
9 -  Alternate source location: [  ]
 +
10 - Requires: [  ]
 +
11 - Provides: [ ushare-1.1a ]
 +
 
 +
Enter a number to change any of them or press ENTER to continue: 2
 +
Enter new name:
 +
>> ushare
 +
</nowiki></pre>
 +
<ol><li>Select option 2 and enter the name uShare then press <enter>
 +
</li><li>You will also need to change the version number follow the same step this time choosing 3 instead. Enter version number "1.1a" then press <enter> twice. It will now create a DEB Package.
 +
</li><li>Now you'll have a DEB package created and installed. You can save the DEB for future use.</li></ol>
 +
 
 +
----
 +
<ol><li>To edit uShare's configuration, open /etc/ushare.conf in your favourite editor and set the following (adjust to your requirements).<pre><nowiki>
 
USHARE_NAME=myserver
 
USHARE_NAME=myserver
 
USHARE_PORT=49200
 
USHARE_PORT=49200

2009年5月12日 (二) 19:51的版本

Xbox 360 Media sharing

The Xbox 360 has its own implementation of UPnP, meaning that in theory you can share your media without Windows by using open protocols. The reality is more complex, but we do have solutions in the Free world.

Format compatibility

The Xbox 360 is fussy about media formats. It only supports JPEG images (not GIF or PNG), and you'll likely find that quite a few of your videos refuse to play. A workaround is to use transcode, ffmpeg or mencoder to convert your video to a format that the Xbox 360 can interpret, such as Xvid/MP3 in an AVI container.

UPnP sharing with uShare

uShare allows a Linux PC to share its files with any other device using UPnP. There's a package in universe, but its official support for Xbox 360 isn't quite right. Here's one method to get it working right. It's based on this howto, which uses this patched version of uShare.

Easy version

You can find a copy of the source and a DEB package here. Note that the DEB was made quickly on Ubuntu 8.04 ('Hardy Heron') using Checkinstall. It is not digitally signed or configured fully, but it should work fine. If the version from universe is installed, remove it first. If you don't feel comfortable with this, see the 'DIY version' below.

DIY version

First, you need to download, compile and install the patched version of uShare.

  1. Set up a build environment.
    $ sudo aptitude install libupnp-dev build-essential
    
  2. Get the uShare source code from here.
  3. In a terminal, extract the source and then descend into the directory.
    $ tar -jxvf ushare-11a-netou.tar.bz2
    $ cd ushare-1.1a-NeToU
    
  4. Configure and compile the source
    $ ./configure --prefix=/ --bindir=/usr/bin --mandir=/usr/share/man
    $ make
    
  5. Create a package and install.
    $ sudo checkinstall -D make install
    
  6. You'll be presented the following options:
*****************************************
**** Debian package creation selected ***
*****************************************

This package will be built according to these values: 

0 -  Maintainer: [ root@ubuntu-desktop ]
1 -  Summary: [ ushare ]
2 -  Name:    [ ushare-1.1a ]
3 -  Version: [ NeToU ]
4 -  Release: [ 1 ]
5 -  License: [ GPL ]
6 -  Group:   [ checkinstall ]
7 -  Architecture: [ i386 ]
8 -  Source location: [ ushare-1.1a-NeToU ]
9 -  Alternate source location: [  ]
10 - Requires: [  ]
11 - Provides: [ ushare-1.1a ]

Enter a number to change any of them or press ENTER to continue: 2
Enter new name: 
>> ushare
  1. Select option 2 and enter the name uShare then press <enter>
  2. You will also need to change the version number follow the same step this time choosing 3 instead. Enter version number "1.1a" then press <enter> twice. It will now create a DEB Package.
  3. Now you'll have a DEB package created and installed. You can save the DEB for future use.

  1. To edit uShare's configuration, open /etc/ushare.conf in your favourite editor and set the following (adjust to your requirements).
    USHARE_NAME=myserver
    USHARE_PORT=49200
    USHARE_TELNET_PORT=49201
    USHARE_DIR=/mnt/hda1,/mnt/hdc1,/mnt/hdd1
    USHARE_ENABLE_WEB=yes
    USHARE_ENABLE_TELNET=yes
    USHARE_ENABLE_XBOX=yes
    
  2. Start the uShare daemon.
    $ sudo /etc/init.d/ushare start
    
  3. Set uShare to start on boot.
    $ update-rc.d ushare defaults
    
Using uShare

You can access the uShare Web interface at

http://ip_address:port/web/ushare.html

The Xbox 360 should see your server just like any UPnP share.

Allowing connections through a firewall

If you're using Ubuntu's UFW, you can easily add a rule to cope with this. Let's say your Xbox 360 uses a static IP address of 192.168.10.3, and your server is 192.168.10.2 with UPnP on port 49200. Use the following command to provide a small hole in your firewall for this:

sudo ufw allow proto tcp from 192.168.10.3 to 192.168.10.2 port 49200
Removing uShare

Checkinstall installs uShare into the dpkg repository just like any other package. Uninstallation is easy:

$ aptitude remove ushare

Other uShare resources

Resources