XBox MythTV Frontend

The beautiful thing about MythTV is that you can watch TV anywhere. This is thanks to the separation of backend and frontend. The backend does all the recording and file storage, while frontends simply connect to the backend to receive the recorded files. The first step to watching TV on your Xbox is to install Linux. And thats just the easy part.

Requirements

Out of that list, the last two sould be piecemeal to acquire. The other two might not be, however. Since the XBox was released, USB storage has improved considerably. As a result of progress, finding a flash drive that uses 2001 technology might be hard to find. Verifying that you have the right setup is as easy as simply plugging it into the XBox with the converter cable you will build later. As for the XBox, there is a specific version of the kernel and the dashboard you will need.

Compatable XBox

When the holes allowing this project to slip through were made public, Microsoft naturally pushed out updates over XBox Live to everyone so you couldn’t do it to your XBox. You know, the one that you own. There are two component versions you need to look out for. The kernel version needs to be lower than 5713. The dashboard needs to be less than 4920, but if it is newer you can downgrade it. To check this, select System Info from the Settings option in the dashboard. As text scrolls by, you will see:
K:1.00.XXXX.01
D:1.00.YYYY.01

XXXX is the kernel version, whereas the D stands for dashboard. If your dashboard is too new, find a friend with such a version. If you have no hope of getting that dashboard version to go down, you might as well stop here.

The Converter Cable

By far, the easiest part of completing this project. This is used to connect the USB flash drive to your XBox. The XBox will recognize it as a memory card that is in your controller. You are going to need to cut your USB and XBox controller cords. Save the female of the USB, and the part that plugs into the XBox end of the breakaway.
XBox to USB converter

Now you can splice the two together. Since the extension is really a USB cable with a different connector at the end, you can simply go red to red, white to white, black to black. The yellow wire is a mystery (several online sources mention something about a ‘lightpen’), but can be safely discarded. Make sure the grounding mesh surrounding the whole shebang is completing a circuit. Wrap the whole joint in electrical tape and that’s it!

Running Linux

The next step in this process is to either boot Linux, or install it. You would want to not install Linux if you were going to use your friends XBox to downgrade your dashboard version. To downgrade, you first boot into Linux and use either FTP or KDE’s fish kioslave to transfer the images around. If you are understanding everything I’ve said up to this point, your technical knowhow should tell you how to find the images. At any rate, you require a specific version of MechWarrior, and that flash drive. Pick an image size from xbox-linux’s sourceforge page appropriate for your drive. Using the dd command, put the images directly onto the flash drive. Plug it into your xbox, and copy the saved games that appear to your xbox. One is an emergency linux distro (very handy at times) and the other is the MechInstaller. Next, you need that MechWarrior disk. Check the laser etching on the inside of the disk, or the back of the case. It should say MS02301L. Anything else will not work, as the folks who make the game were irked to fix the hole that makes this possible. I bought my used copy for about $3 at the local Gamestop. Just ask them if you can see the disks, as they tend to have many copies. Boot the game, and load one of the ’saved games’. The “Install Linux” one installs the “Emergency Linux” item to replace the “XBox Live” item on your dashboard.

Installing Xebian

The mere act of installing Linux in your XBox allows you to boot a bootable CD. So, download the basic version of Xebian from xbox-linux’s sourceforge page and pop the disc in. Once it boots up, you can login via ssh to 192.168.0.10 with the username root and the password xebian. Run XBOXLinuxInstall and follow the prompts. I placed my install on the savegame partition. It does not overwrite that whole partition, but it simply creates an image file named xebian.img in that drive. My first trial involved installing it to the ‘free space’, which did not work for some reason. When complete, reboot and remove the disk.

Installing MythTV

Excellent. You’ve got Linux on your XBox. With the power of apt-get, you can consider the whole shebang complete. Well, you’ve got one (two if you are ambitious) steps to complete. First, if you wish for DHCP addressing, or to change the IP address of the XBox, open up /etc/network/interfaces. Changing ‘Static’ to ‘dhcp’ and removing the lines after for eth0 makes it DHCP. Thats the optional step. The required one is to edit /etc/apt/sources.list. Pick a mirror from The List. Run apt-get update to sync lists, and finally run apt-get install lirc mythtv-frontend xinit xbase-clients xserver-xfree86 mingetty prelink. I threw prelink in there because I’ve found it dramatically improves startup speed. Mingetty is used to start mythtv when the xbox starts up.

Starting MythTV

Unless you have your own method for starting MythTV on login, you can use my method. Add the line 7:23:respawn:/sbin/mingetty --autologin live tty7 to /etc/inittab. live is the default non-root user that comes with Xebian. Next, setup live’s login process with ~live/.bash_profile:
if [ -z "$DISPLAY" ] && [ $(tty) == /dev/vc/7 ]; then
exec startx
fi

Finally, setup the X session via .xinitrc:
#!/bin/sh
xsetroot -cursor_name star -solid black
exec mythfrontend -v all

Be sure to mark it executable. I first change the background to get rid of the moire effect known to explode heads. The star is merely decoration.

lircrc

If you’ve got the desire to use the XBox remote with MythTV, you are in good hands. Xebian by default comes with a proper lircd.conf tuned to the XBox remote. It doesn’t come with a proper lircrc, so I’ve provided a nice one available for download. Make sure you install it as ~live/.mythtv/lircrc, or link that to ~live/.lircrc.

When you reboot your XBox (or type init q to reload inittab), MythTV should start up and ask you where the backend is.

Enjoy!

2 Responses to “XBox MythTV Frontend”

  1. Rick

    Do you flash xbox 360?


Leave a Reply