Use the Raspberry Pi as a HTPC

You can use the Raspberry Pi to do all kinds of geeky things. But one of the most interesting uses for the puny little device is that of a home theatre PC. The small size of the the hardware and the fact that it runs silently makes it a good choice for building your own entertainment center.

One of the best open source apps for turning any computer into a fully functional media center PC is the XBMC. While you can install XBMC on top of the Raspbian distro for the Raspberry Pi, there are in fact several projects that are working to produce a dedicated media center distro for the 700MHz ARM-based device.


The OpenELEC project produces streamlined builds based on XBMC for various platforms including the Raspberry Pi. The advantage with OpenELEC is that you can use the distro without any knowledge of its base Linux OS.

Install OpenELEC

To install OpenELEC, download the latest OpenELEC image for the Raspberry Pi. Once downloaded, extract its contents to your Home folder.

Now plug in an empty SD Card (the one you are using for your Raspberry Pi).

Open a terminal and change the path to the extracted directory, for example:

cd /OpenELEC-RPi.arm-3.2.4

Make sure you know the correct location of the SD Card. You can use the dmesg | tail command after inserting the card to find the device address. You should see the card listed as /dev/sdX, such as /dev/sdb or /dev/sdc. Please double check the address else you’ll rewrite the contents of the wrong disk.

From within the extracted directory, execute the following command:

sudo ./create_sdcard /dev/sdX

Don’t forget to substitute /dev/sdX with the location of your SD Card. When the script is finished writing to your card, you can remove it and plug it in your Raspberry Pi.

The OpenELEC website also has details for replicating this procedure in Windows and Mac OS X. Another alternative is to download an .img file and writing it to an SD Card using the Win32 Disk Imager utility.

OpenELEC runs the Samba service by default so it’ll be listed like any other network location under a Windows, Linux or Mac computer on the network. This is useful for adding files to the HTPC.


To control playback, you can download a XBMC remote control app on your smartphone. The Google Play store hosts several XBMC remote apps. To use the app, all you need to do is point it to your HTPC’s IP address and you’ll be able to control OpenELEC from your smartphone.

That’s all there’s to it. You can now pull out the keyboard and the mouse, plug in the high­ definition TV or projector and start using your HTPC to play any media. As long as it’s connected to the network via a wireless adapter or an Ethernet cable, you can access and control it remotely.

Image credit: John_Reese

Mayank Sharma

Mayank Sharma has been writing on Linux for over a decade and is a regular contributor to Linux Format magazine.

Subscribe to our newsletter!

Our latest tutorials delivered straight to your inbox