Build a Cheap But Powerful Boxee Media Center [Media Center]Adam thinks XBMC is the best media center around, but I roll with Boxee for its awesome streaming web content. Here's how I turned a relatively cheap yet powerful home theater PC into a DIY Boxee Box for my HDTV.
Why go with Boxee? A few reasons, really: it's free to download, it's got a ton of great applications and add-ins, and it was, like XMBC, built with a big-screen interface in mind. When I was done installing it on top of a basic Ubuntu desktop, I had a system that could easily handle 720p and even (with some very easy overclocking) 1080p video files, run Hulu streams in full screen with very little glitching, and let me show off Flickr streams, Facebook photos, Pandora or Last.fm music, to name just a few of many content streams.
Plus, with Ubuntu installed and set up, you can easily run any other Linux app on your TV—like Hulu Desktop, a huge-screen Firefox, or whatever you can imagine.
You could, of course, wait for the first official Boxee Box to be unveiled in December, then shipped sometime later. This way, however, you get a seriously powerful HTPC that can run most any media center, and tears up HD video streams while doing so.
Many thanks to the fine posters at the Boxee and Ubuntu forums, where I found needed help and inspiration. This ASRock how-to, and wake-on-LAN tutorial, in particular, were lifesavers.
What You'll Need
- ASRock Ion 330: Like Adam's pick of the Acer Aspire Revo, my HTPC comes with an NVIDIA ION graphics chip that can handle meaty HD video and export through an HDMI cable. My similarly sleek and (mostly) quiet-running system costs $350, $150 more than Adam's ($160 if you absolutely must have it in white), but it's beefier: 2GB of RAM (up to 4GB supported), a dual-core Intel Atom 330 CPU that runs at 1.6 GHz out of the box, but can be overclocked to 2.2 GHz from a simple BIOS switch, a 320 GB hard drive, and a DVD-RW drive. Unlike his Revo, my ASRock doesn't come with USB peripherals or Windows XP, but, then again, we'll only need a USB keyboard and mouse for a little bit with this project.
- USB keyboard and mouse: For the Ubuntu installation process and BIOS tweaks. After everything's set up, you'll be able to control everything via remote screen access, SSH terminal, or your infrared remote.
- Boxee for Ubuntu Linux: We'll detail how to install it in our just-set-up ASRock in a bit.
- Ubuntu 9.04: You'll want the 'PC Desktop CD' ISO image, which you can download directly or through BitTorrent. Boxee will soon update to support Ubuntu 9.10, the most current release, but for what you're using it for, you'll hardly notice.
- A thumb drive or blank CD: The USB drive should be at least 1GB in size, and formatted to FAT 32 for easy compatibility.
- An IR receiver and Windows Media Center remote: Just like Adam, I'd go with this cheap receiver+remote solution, though anything that claims Media Center compatibility will be much easier to set up with Linux and Boxee.
Setting up Ubuntu is something I've done many times, and it's just as easy on this system. Here's the quick walk-through:
Install Ubuntu From a Thumb Drive or CD
Ubuntu, like XBMC, can run entirely off a thumb drive, or be installed to a hard drive. We're going for the latter option here.
1. Create your Ubuntu installation media:
The fastest and quickest installation is to put the Ubuntu 9.04 desktop ISO you downloaded on a thumb drive using the free Unetbootin tool on a Windows or Linux system.
You can also have Unetbootin automatically download Ubuntu 9.04 for you, or burn the ISO to a CD or DVD, but thumb drive installations are much faster and don't require wasting a disc.
2. Set up your ASRock
Take the unit out of its box, and find a location for it where it can breathe and exhaust a little—not flush against a corner, in other words. Plug in an ethernet cable straight from your router (or Wi-Fi bridge), and connect it to your TV via an HDMI cable. You'll also need to plug in a USB keyboard and mouse to get through the initial setup. Make sure all the connects are snug and not stretched, then plug in your USB thumb drive, or power it on and insert your CD/DVD.
3. Install Ubuntu
Make sure your TV is switched to the HDMI source your ASRock box is plugged into. After you power on the ASRock, hit F11 immediately on your keyboard to open the boot options, then select your USB drive.
You'll be launched into Ubuntu's setup screen. Choose your language, then select the "Install Ubuntu" option. You'll launch into a bare-bones Ubuntu desktop and then into the installer application. Most U.S. users can hit Next through the first three language/location/keyboard screens. When it comes time to partition your system's hard drive, though, I'd recommend splitting it into three parts: One for the Ubuntu system, one for a swap partition, and another NTFS-formatted drive for your media. Why NTFS? It makes sharing media from your HTPC box to Windows computers easier, and it can hold gigantic files—like the kind of high-resolution videos you'll be viewing. If media sharing isn't a concern for you, go ahead and tell Ubuntu to use your whole hard disk.
Otherwise, choose the 'Specify Partitions Manually,' click on the big, unallocated space in the next screen, and hit 'Add' at the bottom. Set up Ubuntu's own partition like so:
Hit 'OK,' then create another partition, about 2 GB, or 2,000 MiB in size, and choose 'Linux swap' under the 'Use As' heading. Finally, add one more partition by hitting 'Add,' choose NTFS as its format, and have it use all the rest of your space.
Click through the rest of the setup process, wait for it to finish installing, then reboot your computer and remove your thumb drive or CD when asked to do so.
Setting up Ubuntu
When your system boots up next time, you'll get a menu asking which system you want to boot into, with a 10-second timer before it heads to default (which we'll fix soon). Log in with the username and password you gave during setup—something else we'll get to optimizing.
One quick little command we have to run before getting started: Hit Alt+F2, check the 'Run in Terminal' box, then enter this line and hit Run:
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys CEC06767
That authenticates a repository with some necessary graphics drivers to install software on this system.
Now, down to the real business. Head to the System menu in the upper-left corner, mouse over the Administration sub-menu, then choose Software Sources. On the first tab, check off the 'Proprietary drivers for devices' and 'Software restricted ...' options. Head to the Updates tab, and check the unchecked items. Finally, head to the 'Third-Party Software' tab.
We're going to add in three lines to this list by hitting the 'Add' button at bottom-left and pasting in this text. The first is Boxee's Ubuntu repository for Ubuntu 9.04, and the other two are a Ubuntu repository for the NVIDIA ION chipset inside our HTPC, known as 'VDPAU' hardware. Here's all the lines in one spot:
deb http://apt.boxee.tv jaunty main
deb http://ppa.launchpad.net/nvidia-vdpau/ppa/ubuntu jaunty main
deb-src http://ppa.launchpad.net/nvidia-vdpau/ppa/ubuntu jaunty main
Hit Close, and agree to Reload your software list when prompted. Now head up to System->Administration and select Update Manager. You'll get a list of everything that needs updating, and it might be rather long.
Install the updates, then make a cup of coffee or tea while you're waiting. When you get back, you should be updated and ready to actually install some new stuff.
Installing Video Drivers and Boxee
Let's do this. Head to System->Administration, then select Synaptic Package Manager. Click the "Search" button at the top right, and in the dialog that pops up, change the "Look in:" to "Maintainer," and search for "Snider."
In the results that come back, check off these packages to install. There might be newer versions of them to try out, but I know these work with this system, on this version of Ubuntu, running this version of Boxee:
- nvidia-glx-185
- libxine1, libxine1-x
Back at the Synaptic main screen, hit 'Search' again, change the 'Look in:' to Name, and search for mplayer. Check off the version with '+svn2009' trailing in the 'Latest Version' column for installation. Search again for boxee, then check to install it. If you're looking to use an infrared remote, also search out and install the lirc package and whatever dependencies it asks for. Ubuntu's own wiki offers a
guide to getting set up with LIRC.
Finally, hit 'Apply' in the top toolbar to install all these things on your system.
Convenient Tweaks
Once Synaptic is done installing those goodies (or while it's running, if it's taking a while), head to the System->Administration menu again, and open Login Window. Head over to the Security tab, and enable timed and automatic login for your username:
Assuming you don't expect a burglar to break into your house, fire up your HTPC and start watching your Blu-Ray rip of 'Up,' you should be fine with these options. They free you from needing a keyboard or mouse to get into Ubuntu, and automatically log you in when resuming from a suspend.
Next up, let's speed up that boot-up process with a quick GRUB menu edit. Hit Alt+F2, and enter this command:
gksu gedit /boot/grub/menu.lst
In the editor that pops up, head down just a bit to the '## timeout sec' section, and change the value there to 0. Just one section down, remove the '#' from in front of 'hiddenmenu,' if it's there.
Two quick fixes, to make HDMI audio work perfectly for both Ubuntu and Boxee. First up, follow this Boxee forum poster's instructions to set up a .asoundrc file that tells Ubuntu how to route its sound. Next, open up a terminal (Applications->Accessories->Terminal), type in alsamixer
and hit enter.
Hit your right arrow key over to where you see the columns for 'IEC958,' and be sure none of them read 'MM,' or muted. If they do, hit 'M' to unmute them. Hit the escape key when you're done.
Your second-to-last tweak makes Boxee run right at start-up. Head to System->Preferences, choose "Startup Applications," and hit "Add." Give it a name like, oh, Boxee, and make the command /opt/boxee/run-boxee-desktop. Hit OK on that screen, then close out your Startup Applications.
Now, for the final piece: Remote desktop access from any other computer on your network. Head to the System->Preferences menu, select Remote Desktop, and configure your system to accept remote desktop connections, with a password for safety.
If you're the geeky type who knows how to remotely administer a system by SSH command line, be sure to install the openssh-server package in your Boxee box.
Finally, if you're using a Microsoft Media Center remote with your Boxee box, and you've plugged in your USB IR Receiver, you should be good to go in Boxee—it automatically works with the Media Center setup. If you're using something different, like a Hauppage remote, this guide might point you in the right direction. Myself, I mainly use the free Boxee Remote applications found in both the Android Market and Apple App Store to control Boxee and type in text with little fuss.
Running Boxee
Reboot your system, and you should shoot through Ubuntu's boot-up process, arriving straight at Boxee's log in screen.
The only major tweak you'll need to make is to Boxee's audio setup. Head to the Settings menu in the lower-left corner, then to Hardware, and then to the audio tab. Set your settings to look like those on the left, or, in text form:
Digital
Off
Off
default
default
From there on out, Boxee should be your multimedia workhorse. You can suspend it and wake it up with the power button (or a wake-on-LAN tool, as detailed at the Ubuntu Forums). You can use it to download torrents, directly drop files into it over SFTP, give it more video feeds, and other tweaks we've covered in our Apple TV/Boxee guide, and in Adam's XBMC guide (the latter mostly for the SFTP guide). If you want to actually use your Ubuntu desktop on your TV, just exit out of Boxee from the log-in screen or the main menu
That's just my own little Ubuntu/Boxee/HTPC setup, but I think it works quite nice. Anything I download can be transferred and played, and any broadcast shows I miss can be caught on Hulu, CBS, PBS, or any of Boxee's other great apps. Got a killer media center setup of your own to share? Tell us about it, and link it, in the comments.