XBMC installation as a media center on a Raspberry Pi

First thing people wants to do when you are talking about Home Automation is a Media Center.

The better hardware to do so is a Rasperry Pi. In this post, I explain step by step all you need to transform a Raspberry Pi into a nice Media Center.

Total Price: less than 80$


Needed Hardware

A Raspberry Pi.


The Raspberry Pi is a credit-card-sized single board computer.


Price: less than 50$ (RS Shop)

Mine is a B Model

A Power Adapter.



A power adapter for your Raspberry Pi.

Price: less than 10$

A SD Card.

sdSD card is used to host the Operating System running on the Raspberry PI

Price: less than 10$

Mine is a SanDisk SDHC 4GB

A HDMI Cable

HDMITo link your Raspberry to the TV

Price: less than 10$

Operating System for your media center.


The best Media center of the word is XMBC… imho…

So there 2 free available distributions to install xbmc on a Raspberry Pi

  1. OpenElec: http://openelec.tv/
  2. RaspBMC: http://www.raspbmc.com/

You can take a look at a quick comparison between both here:


BUT here is my opinion: OpenElec is a little bit faster to boot but it is fully packaged and it is pretty hard to make some hack or installation. RaspBMC is based on a Linux Debian distribution so you can easily use all your preferred tools such as “apt-get”.

For this tutorial we are going to use RaspBMC.


RaspBMC Installer on the SD card

  1. Download the last RaspBMC Build: http://www.raspbmc.com/download/
  2. On your computer, check where the SD card is mounted — I use MacOS and a Mac Book Pro — Here is disk1:
    $ df                                                                                                                                                                                                              
    Filesystem    512-blocks      Used Available Capacity  iused    ifree %iused  Mounted on
    /dev/disk0s2   975425848 402987456 571926392    42% 50437430 71490799   41%   /
    devfs                385       385         0   100%      666        0  100%   /dev
    map -hosts             0         0         0   100%        0        0  100%   /net
    map auto_home          0         0         0   100%        0        0  100%   /home
    /dev/disk1s1      255460    198660     56800    78%      512        0  100%   /Volumes/System
  3. Run the script to install the installer on the card — follow the instructions choosing the right device — here is /dev/disk1
    $ sudo python install.py



Running the installer

Now Installing RaspBMC on your Raspberry is very easy: Put the card in your Raspberry Pi, link the Raspberry Pi to your TV with the HDMI Cable et power on the Raspberry.

Just follow the instruction and voilà.


More Configuration

Opening connections from outside of the local network

By default, the fresh installation of RaspBMC does not allow connection from outside of the local network. You can allow external connection editing /etc/network/if-up.d/secure-rmc in order to access to your RaspBMC via SSH or to access to any service onto your RaspBMC

$ sudo vi /etc/network/if-up.d/secure-rmc

comment last lines :

## accept external connection
#logger -t iptables "Configuring ip tables for interface $IFACE"
#if [ "$IFACE" != "lo" ]; then
#    NETMASK=$(get_subnet $IFACE)
#    iptables -A INPUT -s $NETMASK -i $IFACE -j ACCEPT
#    iptables -A INPUT -i $IFACE -j DROP

Restart iptable

$ sudo iptables --flush

You RaspBMC now accepts connection from everywhere. Be careful everybody knows default user and password (pi, raspberry). So you should change password of pi user

$ passwd


Calibrate your screen

If you find that your RaspBMC overscans (looks too big to fit on the screen), You can try to calibrate your screen looking in the Settings-System-Video Output-Video Calibration menu to fix calibration.


Leave a Comment.