This HOWTO describes how to build an Ubuntu-based media center system that will connect directly to your HDTV for all the HD goodness and also simplify management of your media (music, images etc).
- is sick of paying for channels they don’t watch and want to get on the Internet TV bandwagon;
- is tired of waiting for Google TV and Boxee Box;
- is looking for an open-source alternative to Apple TV;
- wants to simplify their media management;
- is a geek;
I had been looking to build my own Ubuntu-based home theater PC (HTPC) for a long time. After much Googling and several weeks of deliberation, I realized it is really quite simple and that most of the information out there is either outdated or unnecessarily complicated. With this HOWTO, I hope to demystify the process for other wannabes like myself.
- Desire to experiment and save money;
- Faith in open source software :)
- A little bit of patience
The first step is to acquire the right hardware. My main requirements were:
- small-ish form factor;
- reasonably powerful CPU (for all that HD decoding);
- integrated video and audio. In particular, audio over HDMI;
- NO pre-installed OS (this saves a lot of money as well, btw);
- NO Blu-ray (already have this on other devices);
- NO wi-fi (Ethernet baby!);
It was a bit of wishful thinking, but I was really hoping System76 would already have a pre-built system that would be close to my spec. Unfortunately that was not the case, and in fact, I found System76 to be a bit expensive as well. (I later found out about ZaReason which also seems promising) I really did not want to go out and build the whole computer from scratch (as most other Linux HTPC HOWTOs seem to do). As it turns out, there are a few websites that allow you to custom build a home theater PC. For instance, you can always get bare-bones kits and bundles from NewEgg.com or TigerDirect.com.
After a lot of searching around and anxiously reading vendor reviews, I decided to order from CyberPowerPC.com. Don’t let the name fool you, and don’t let the negative reviews discourage you either. My experience with them has been awesome so far — their website and hardware customizer is by far the best that I’ve seen (even better than Dell); my order was processed swiftly and professionally; my hardware arrived without any damages (though I did pay extra for better packing) and I haven’t had to call customer service yet!
Here’s what I ordered:
- Start with the “Media Center PC 8000″ under the “Media Center” category
- Motherboard: GigaByte GA-H55M-UD2H. I chose this primarily because of the onboard HDMI as well as support for audio over HDMI. None of the other motherboards available on this configuration fit the bill.
- One 500-GB drive for the OS, applications and other cruft that accumulates over time. A separate 1-TB drive to store the actual media.
You also need a good controller to operate the computer remotely. I’ve seen a lot of Bluetooth mouse-keyboard combos, but most of them seem too big and bulky to me. I wanted something nice and compact, similar to a regular TV remote form-factor. I ordered the Logitech diNovo mini, after verifying that it works out-of-the-box with Ubuntu.
Burn a CD of the most recent Ubuntu release (10.04.1 LTS Lucid Lynx, as of this writing). In my case, I connected the computer directly to our HDTV for the installation. Pretty much everything worked out of the box and I was up and running within half an hour, with full 1080p video. It is always good to see the progress Linux has made in seamless support for so many devices.
The only chink in the armor was audio over HDMI. Despite what I had read, there was no sound over HDMI after the fresh install. So I tested with an optical audio cable to test whether the onboard audio was even functional or not, and it worked fine. Relieved, I then proceeded to do multiple experiments with PulseAudio configurations and BIOS settings, hoping to coax the audio to go over HDMI. There were a few frustrating hours, but I eventually did get it working. Turns out, I just needed a newer version of ALSA (1.0.23) as well as the kernel (2.6.35 or better). The easiest way to get these is by using the appropriate PPA:
$ sudo add-apt-repository ppa:kernel-ppa/ppa $ sudo aptitude update $ sudo aptitude install linux-generic-lts-backport-maverick
I got the newer Alsa packages from this PPA. After installing these, reboot and presto! Glorious sound over HDMI. BTW, during the installation, I selected the option for “don’t require password for login”. This is nice and convenient; it can be a pain to login every time using the Bluetooth keyboard.
Note that I used the default ext4 filesystem on the root partition. But for the home partition (which will host all the media), I used the btrfs filesystem. Basically btrfs gives me the ability to take quick snapshots and manage multiple devices under the same filesystem. So conceivably I can just drop in another hard drive tomorrow and my /home partition will be able to use it right away.
It’s all about the Apps!
At this point we have our machine set up and running with a clean, fresh Ubuntu install. Having the right set of application can really enhance the experience of using your Ubuntu box as a media center.
- First, download and install Boxee. The arrow-mode of diNovo mini works really well with the Boxee interface.
- Also download and install the Ubuntu Netbook Edition (sudo aptitude install ubuntu-netbook). You will have to logout and choose the Ubuntu Netbook session for this to take effect. As the name suggests, this is a desktop UI designed for netbooks, but it works equally well for TV screens as well. The icons are much larger and the UI is simpler.
- If you are feeling particularly adventurous, feel free to give Ubuntu Unity a spin as well. I’m sticking with the Netbook interface for now, as I could not get Unity to work properly.
- I’m moving all of our music and images onto the media center. I’m throwing all the music into Banshee, which is also reorganizes the music in a consistent manner while importing. Likewise, for organizing and importing images I’ve settled on Shotwell.
To Infinity and Beyond
IMO, an effort like this is like building a house. It is in a process of continuous evolution; there are always things you can improve, processes you can automate and streamline. Here are a few things I’ve already done:
- I’ve shared the “Pictures” and “Music” folder on the HTPC over Samba. So I can just mount them on my desktop and access all the media.
- Additionally, I’ve setup a DAAP server on the HTPC (sudo aptitude install tangerine) so I can stream music from the HTPC to any DAAP compatible client (including iTunes, Banshee, Amarok etc).
Next on the list are: setting up desktop search and indexing, setting up reliable and easy ways to suspend/resume the machine so we don’t burn all the money saved from cable TV on electricity! I’m also looking forward to a more stable release of the Unity interface.