MythTV on XBOX

This is a guide on installing MythTV on a XBOX. Personally I don’t understand why to do that since XBMC is working pretty well and the support is great. Check this out http://www.xboxmediacenter.com/

The main reason why I say so is that MythTV requires a server PC always on to run many of its task or you have to use a linux install on the XBOX. The XBMC works just with a direct connection to the Internet and doesn’t requires a Linux server with a MySQL running underneath.

HERE WE GO, FOLLOW THE INSTRUCTION (I AM NOT THE AUTHOR).

A mythtv setup consists of one or more servers (PCs with video cards), and one or more clients. I have a mythtv server and a couple of clients running on PCs. The main problem is to fit a Mythtv client in a typical media center, where you don’t want to have a large noisy PC running. So the XBOX is a perfect fit, it’s really a PC but without a noisy fan and it fits in a typical media center shelf. The XBOX isn’t powerful enough to be a Mythtv server, and there’s no (easy) way to

install a TV card in the XBOX. But it should work ok as a client.

Mythtv is a Linux application, so we’ll install Linux on the XBOX, and then we’ll install Mythtv.

Prerequisites

1. A running Mythtv server and a LAN with sufficient speed, either a fixed LAN or a 54Mbps or better wireless network. I used a 54Mbps wireless network. I originally set up my Mythtv on Ubuntu using this HOWTO: http://www.quietglow.com/docs/ubuntumythtv.html
2. An older XBOX, not XBOX 360, but the older kind. Stay away from the newest versions. I bought mine on Ebay for $110 or so.
3. The MechAssault game for XBOX, the original, not the platinum version. I bought mine on Ebay for < $10.
4. A linksys wireless game adapter WGA54G (Ebay $60 or so).
5. A special USB to XBOX cable. I bought mine on ElectricQuarter.com for about $6.00

XBOX USB cable, Wireless adapter, MechAssault

Preparing the XBOX

I used the “software” method to prepare the XBOX for Linux. You can see a detailed HOWTO here.
But here is what I did:

Download the “MechInstaller” savegames. Go to
http://sourceforge.net/project/showfiles.php?group_id=54192&package_id=91497&release_id=177464
and choose to download MechInstaller-1.0-FATX-Images.zip (use the latest version). I use Ubuntu,
so after the download I used FileRoller to extract the MechInstaller-1.0-FATX-128MB.img file.
My USB memory stick is a 128MB stick.

Plug in your USB memory stick and install the MechInstaller image on the USB disk with the
following command:
sudo dd if=MechInstaller-1.0-FATX-128MB.img of=/dev/sdb
/dev/sdb may not be the right device for you. Find out the right device first by choosing
System->Administration->Disks.

Connect the USB memory stick to your XBOX using the special usb/XBOX cable and start the XBOX
without a CD in the drive. Copying is done by using the savegame management features on the
original Xbox Dashboard. You will need to navigate to your USB stick and copy each savegame on
it one by one to your HDD. The MechInstaller savegames should have little penguin icons on them.

Now restart the XBOX with the MechAssault game in the CD drive. Then choose “CAMPAIGN”, and then
“Install Linux”. This will take some time. Afterwards, your Xbox is fully Linux-compatible,
and there is an item “LINUX” in the Dashboard main menu which boots a minimal Linux system.

You are done with the preparation phase!

Preparing the wireless game adapter (WGA54G).

Connect the game adapter to any PC using the LAN cable that came with it. Configure your LAN
interface with a fixed IP in the 192.168.1.X subnet (X can be anything you want except 5 or 250).
Point your browser to http://192.168.1.250 and you should get a prompt to logon to the
configuration page. Use the password “admin” with no username.

If you can’t get this to work then get a paperclip, unfurl it and use it to press the reset button
on the game adapter. Push and hold for a few seconds until the lights flicker to show that the
game adapter is reset. Then try the admin page again.

When you get into the admin page make sure you connect to your wireless network. I configured a
fixed IP address of 192.168.1.5. When you’re done connect the LAN cable to back of the XBOX.

Installing Linux

I used Xebian. The complete howto is here. Download Xebian from here. Use the latest available
version. I chose
dist-1.1.4-xbox.tar.gz.

Extract the .iso file:

tar xzvf dist-1.1.4-xbox.tar.gz

The .iso file is dist-1.1.4-xbox/1.1.4-xbox.iso.

Use the .iso file to burn a DVD. The XBOX prefers DVDs. If you don’t have a DVD burner you could
try a regular CD-R, but I don’t know if this will work. Stick a blank DVD+R or DVD-R in
the drive, Right mouseclick on the .iso file and choose “write to disk”.

Power on the Xbox without a disc in the drive, wait for the Dashboard to appear, and then insert
the Xebian disc. My XBOX has a Thompson DVD drive. You can find out which DVD drive your XBOX has
by going to this page.
My Thompson drive refused to read a standard DVD+R disk so I then tried to use a CD-RW, and this
worked. In theory Thomson drives should read DVDs fine, but this seems to be a case where you need
a bit of trial and error.

If you get the XBOX to boot off the Linux installation image, you’ll eventually get to a screen
with icons etc. This is the fluxbox desktop which is the default in Xebian.
This is just Xebian linux running off the LIVE-CD, it’s not installed on the HD yet.

Now you’ll need a way to logon to the Xebian system and enter commands with a normal keyboard,
(don’t try to do it with the game controllers etc.).

You could simply try to connect a USB keyboard to the USB cable you have. I prefer to use a laptop
and a crossover cable. You could just plug the XBOX into your network router, but I have a
wireless LAN so did the following:

Connect a laptop to the XBOX using the crossover cable.
Configure the LAN adapter in the laptop with a fixed IP address:

IP address: 192.168.0.11
Subnet mask: 255.255.255.0

This means your laptop is using 192.168.0.11, whereas the XBOX is 192.168.0.10.
If your laptop is using Linux, then use ssh to logon, If you’re using Windows then download PuTTY
and use this instead.

ssh root@192.168.0.10
Password: xebian

You should get in and get a # prompt. Now type XBOXLinuxInstall and press Enter.
Now you’ll get a series of questions:

I installed Linux inside the Gamesave partition (E:). I chose a root filesystem size of 1990MB
instead of the default value of 2000MB. and I chose the defaults for all the rest. I did this
to stay within the total size of E: which is 2250.5MB. Swap by default is 250MB.

This runs for some time, and you’ll see the list of files being copied from the CD to the hard
disk. At the end of the script you’ll be prompted for the network configuration. I used:

IP address: 192.168.1.10
Subnet mask: 255.255.255.0
Gateway: 192.168.1.10

This is now a fixed ip for use within my wireless LAN, where we already set up
the wireless game adapter. Now the script is finished.
Type
# reboot
and the XBOX will reboot, take out the CD and choose “Linux” in the Dashboard. This will boot
the new Linux system from the hard disk.

Plug in the game adapter to the XBOX using a normal LAN cable. Try to ping 192.168.1.5 (the
game adapter itself) from another PC on the local wireless network. If this doesn’t work then
repeat the section about configuring the game adapter. When you get this to work then try to
ping 192.168.1.10.

If you’re security concious, then follow the Xebian post-installation instructions.
You are done with installing Linux!!

Installing the MythTV client.

There is a very good easy MythTV on Xebian HOWTO. In my case all the assumptions held for going
ahead with this HOWTO. I already have a couple of PCs running mythtv clients on my network, so
MySQL etc. is set up to accept connections over the network.

Here’s what I did from my Ubuntu PC:

ssh root@192.168.1.10
Login with the root password.

vi /etc/apt/sources.list

add the following lines to the end of the file:

deb http://alexfisher.me.uk/debian sarge main
deb http://www.debian-multimedia.org sarge main

Save the file.

tzconfig

Set the timezone of the XBOX.

apt-get update
apt-get install ntp-simple ntp-doc ntp-server
/etc/init.d/ntp-server start
cd /etc/rc2.d/
ln -s ../init.d/ntpdate S24ntpdate

Now we’re ready to install MythTV:

# There’s a bug here in the installer
mkdir /etc/mythtv/
chmod 777 /etc/mythtv/

apt-get install mythtv-frontend

This prompts for the host of the MySQL server. I typed the Ip address of my MythTV/MySQL server:
which is 192.168.1.4.

I’m just going to use the default “live” username on the xbox to run mythfrontend.
I want to start the frontend now to test it but to start the frontend I need to be able to
control the desktop. So I’m going to use VNC:

# apt-get install x11vnc
# su – live
$ x11vnc -display :0

Then on your local (ubuntu) system type:
$ vncviewer 192.168.1.10

Now you get a window containing the fluxbox desktop. Now just click on the “Terminal”
icon, start a terminal session and type
$ mythfrontend

This will fail. Just ignore the errors and exit. Now try

$ cd .mythtv
$ vi mysql.txt

Edit this file and make it look exactly like the one on your other mythtv clients.
I just use a hardcoded ip address in mine for the server name.
Now try

$ mythfrontend

Again. This time enter the language and then you’ll see the main mythtv menu!

To setup your DVD remote to work with mythtv do the following (as root):

cd /tmp
mkdir lirc_temp
cd lirc_temp
wget http://bit.blkbk.com/mythtv-xbox.0.4.5-beta.tar.gz
tar xpzvf mythtv-xbox.0.4.5-beta.tar.gz
cp live/lircrc /home/live/.lircrc
ln -s /home/live/.lircrc /home/live/.mythtv/lircrc

To set up autostartup of myth and the vnc server do this (from the HOWTO):
Add the following lines to /home/live/fluxstartup.sh file:

# Disable dpms (EnergyStar) features
/usr/bin/X11/xset -dpms
# Disable screensaver
/usr/bin/X11/xset s off
# Start VNC server
x11vnc -display :0 &
# Start the mythtv frontend
mythfrontend &

NOTE: This fluxstartup.sh file is a little different from the guide I mentioned above. I think
they have an error in their guide.
Now kill the /usr/bin/X11/X process and let the desktop restart. This will automatically bring up
the mythtv frontend, and you’ll also be able to use the vncviewer remotely. I found that after
a while I don’t really use the vncviewer, so I commented it out from the file. This will save
some precious memory resources on the xbox.

To configure the system to shutdown from the frontend, do this (as root):

# chmod +s /sbin/halt

Then from the mythfrontend go to Utilities/Setup -> Setup -> General -> (Hit three times)
And enter the “Halt command:” as /sbin/halt
Now the shutdown should work even though you run as “live”.

I also use some additional mythtv plugins, so I did this (as root):

apt-get install mythvideo
apt-get install mythmusic
apt-get install myththemes

I have my music and video on an NFS share. So I did this:

vi /etc/hosts

Add the host gct3102 and it’s ip address to the list.

mkdir /gct3102
vi /etc/fstab

Add the following line:

gct3102:/usr/local/archive /gct3102 nfs rsize=8192,wsize=8192,timeo=14,intr

This specifies the NFS mountpoint /gct3102 which is the same as local directory /usr/local/archive.
Now try this:

mount /gct3102
ls /gct3102

You should see the files on the remote server. I use /gct3102/Video and /gct3102/Music to store my
video (including video grabbed from video podcasting) and music. To view them in MythTV
go to:

Main Menu -> Utilities/Setup -> Setup -> Media Settings -> Music Settings
-> General Settings

And set the “Directory to hold music” to /gct3102/Music (or whatever you use).
Then instead of “Music Settings” go to “Videos Settings” -> General Settings.
And set the “Directory that holds videos” to /gct3102/Video (or whatever).

To make sure mplayer plays most media files do this (as root):

vi /etc/modules.xbox
Comment out the joydev line. We’re not going to use the joystick in linux and this module makes
the most up to date mplayer crash on startup when initializing lirc.

rmmod joydev
apt-get install mplayer-386
apt-get install w32codecs
cd /tmp
wget ftp://mplayerhq.hu/MPlayer/releases/codecs/all-20060611.tar.bz2
bunzip2 all-20060611.tar.bz2
tar xvf all-20060611.tar
mkdir /usr/lib/win32
mv all-20060611/* /usr/lib/win32

vi /etc/mplayer/mplayer.conf
Change the sound driver setting from alsa to oss. This will prevent problems when playing some
windows media files. Comment out the old setting and add a new line to specify oss:
#ao=alsa
ao=oss

This should let you play lots of different formats. Also since you upgraded to the newest mplayer
you’ll get a working DVD-remote when using mplayer from MythTV.

Install mythgallery if you want and use the flickr download in a cronjob as described here.

Now you can just shutdown, install the XBOX in your cabinet below your TV,
hook it to your main TV and use it with the DVD remote.

You’re done!

Blogged with Flock

Advertisements

37 Responses to MythTV on XBOX

  1. christian says:

    Thanks for sharing this. This is dead on what I’ve been looking for!

  2. Joe says:

    I’m using xebian 1.14, as in the article, and all I want to install is x11vnc, and I added all of the apt sources from this article as well as those not listed here that are on the xbox-linux wiki page of the same purpose. I’ve run update several times, but every time I try apt-get install x1vnc, it tells me that there are dependencies that cnnot be met and will not be installed including libxdamage1, libfoxes3 and libxinerama1. Any help?

  3. wha? says:

    sorry, but your F.O.S……

    XBOX memory cards use FATX filesystem. You can’t just grab a flash drive and copy files to it and expect the xoxb to read them.

  4. Read dumbasss says:

    Anybody who is arrogant enough to call somebody else a lier obviously doesn’t know what they are talking about.

    MechInstaller-1.0-FATX-128MB.img file.

    it’s a FATX image, it says so in the file name.

    It is formating the stick as FatX when you copy an image to it.. that’s part of what DD does. Perhaps next time you should research something before you say it’s not possible.

    Assuming you know everything is pretty ignorant

  5. pc enclosure says:

    pc enclosure…

    […]MythTV on XBOX « Ubuntu and friends[…]…

  6. Call of Duty Modern Warfare 3…

    […]MythTV on XBOX « Ubuntu and friends[…]…

  7. ylod fix says:

    ylod fix…

    […]MythTV on XBOX « Ubuntu and friends[…]…

  8. Xbox720 Information…

    […]MythTV on XBOX « Ubuntu and friends[…]…

  9. 50 thousand says:

    50 thousand…

    […]MythTV on XBOX « Ubuntu and friends[…]…

  10. Business Directory|Australian Business Directory|Link Directory…

    […]MythTV on XBOX « Ubuntu and friends[…]…

  11. Tienda de Videojuegos Online | Picagua.com | Comprar videojuegos de PS3, Xbox 360, Wii, PC, PSP, PS2, DS, 3DS | Todo en Videojuegos…

    […]MythTV on XBOX « Ubuntu and friends[…]…

  12. Great goods from you, man. I have remember your stuff previous to
    and you are just too great. I actually like what you have
    acquired right here, certainly like what you are saying and the best way through which you are saying it.

    You are making it enjoyable and you continue to take
    care of to stay it wise. I can not wait to read much more from you.
    That is actually a tremendous website.

  13. We turned on the wireless connection on both and checked that they could connect to the internet and worked at a decent pace.
    They support USB, HDMI, Wi-Fi, Bluetooth, network adapter, 3G and many more than the standard net books on the market.

    The version of Windows on my tablet pc is Windows XP
    and there is no difference between it and the PC that I don’t use anymore.

  14. floors says:

    Hi there, I do think your website may be having browser
    compatibility issues. When I take a look at your website in Safari, it looks fine however when opening in IE, it’s got some overlapping issues. I merely wanted to provide you with a quick heads up! Besides that, wonderful blog!

  15. I am sure this article has touched all the internet users, its really
    really fastidious post on building up new blog.

  16. Thank you other sorts of useful web page. The place else may possibly I buy in which form of data printed in a very suitable usually means? I’ve got a challenge that I’m at the moment taking care of, so i have been getting the appearance out regarding this sort of information and facts.

  17. Hey! I know this is somewhat off topic but I was wondering
    which blog platform are you using for this site? I’m getting fed up of WordPress because I’ve had issues with hackers and I’m looking at alternatives for another platform.
    I would be awesome if you could point me in the direction of
    a good platform.

  18. Wow, amazing blog layout! How long have you been blogging
    for? you make blogging look easy. The entire look of
    your website is fantastic, let alone the content
    material!

  19. Simply desire to say your article is as amazing. The clarity to your put up is just great and
    that i can assume you’re knowledgeable on this subject.
    Fine along with your permission let me to clutch your feed
    to stay updated with approaching post. Thank you 1,000,000 and please carry on the enjoyable work.

  20. certainly like your website however you need to take a look at
    the spelling on several of your posts. A number of them
    are rife with spelling problems and I to find it very troublesome to tell
    the reality on the other hand I’ll surely come back again.

  21. I’m truly enjoying the design and layout of your blog.
    It’s a very easy on the eyes which makes it much more enjoyable for
    me to come here and visit more often. Did you hire out
    a developer to create your theme? Great work!

  22. What’s up friends, fastidious piece of writing and good arguments
    commented at this place, I am actually enjoying by these.

  23. Hey There. I found your weblog the usage of msn. This is a very well written article.

    I will be sure to bookmark it and return to learn extra of your useful information. Thank you for the post.
    I will certainly comeback.

  24. Hi, all the time i used to check blog posts here early in the break of day,
    because i enjoy to find out more and more.

  25. excellent put up, very informative. I ponder
    why the opposite specialists of this sector do not notice this.
    You must proceed your writing. I am sure, you’ve a huge readers’ base already!

  26. If you are going for most excellent contents like me, just pay a quick visit
    this website everyday since it presents quality contents,
    thanks

  27. If some one needs to be updated with most up-to-date technologies
    after that he must be pay a quick visit this site and be up to date daily.

  28. whoah this blog is fantastic i really like studying your posts.
    Stay up the great work! You already know, a lot of individuals are searching around
    for this information, you can help them greatly.

  29. Asking questions are truly nice thing if you are not understanding something totally, except this post offers fastidious understanding even.

  30. I constantly spent my half an hour to read this blog’s articles or reviews all the time along with a cup of coffee.

  31. I was recommended this blog by my cousin. I am not sure whether this post is
    written by him as no one else know such detailed about my difficulty.
    You are amazing! Thanks!

  32. This is really interesting, You are a very skilled blogger.

    I have joined your feed and look forward to seeking more of your fantastic post.
    Also, I’ve shared your site in my social networks!

  33. No matter if some one searches for his essential thing, thus he/she wishes to be available that
    in detail, so that thing is maintained over here.

  34. I must thank you for the efforts you have put in writing this blog.
    I am hoping to view the same high-grade content from you
    in the future as well. In fact, your creative writing abilities has
    encouraged me to get my own, personal blog now šŸ˜‰

  35. Hey! This is my first visit to your blog! We are a group of volunteers and starting a new initiative in a community in the same
    niche. Your blog provided us useful information to work
    on. You have done a wonderful job!

  36. vender mejor valor

    MythTV on XBOX | Ubuntu and friends

  37. gambling says:

    It’s actually a great annd usefuhl piece of
    info. I’m glad that you shared thiks helpful information with us.

    Please keep uus up to date like this. Thank you for sharing.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: