How to build a Media Centre PC

Setup and Operating System

CablesFrom left to right:

  • HDMI video to the TV.
  • TOSLINK optical cable from the sound card to the home cinema’s optical in.
  • Ethernet. The segment this box is on is only 100Mbit/s, but that’s plenty fast enough for HD video at 720p. That probably goes for 1080p content too, but I haven’t tested that myself, as my telly only does 720p.
  • USB transceiver for the wireless keyboard/trackpad.
  • Mains power.


And speaking of keyboards, this is the one i’m using. It’s a mini keyboard, with a laptop-style trackpad. It’s very light, range is good, and it’s pretty frugal in it’s use of batteries.

LiveUSBTime to install the OS. This machine doesn’t have an optical drive, but that’s no problem. We can install Linux using a USB stick. Besides the convenience, doing it this way is fast. After answering the basic setup questions in the Ubuntu installer it took an impressive 6 minutes to install. I chose the Long Term Support (LTS) version of Ubuntu, as this means you’re on a two year upgrade cycle, rather than a six monthly one. Once i’ve got this machine set up, I don’t want to have to mess about with it.

I used a custom minimal version of the OS. By stripping out all the unnecessary packages from the system it speeds boot times and reduces maintenance. But the default desktop version of Ubuntu is also perfectly good. Either of them will run quite happily on the 1GB of RAM in the machine. These lower hardware requirements are one of the main advantages to using Linux instead of Windows as a media centre OS. Note that we’re also not going to install any antivirus software. We just don’t need to.

If you were going to use Windows as a media centre i’d advise using double or triple the amount of RAM.

Running the live session

Before committing to the install, it’s best to boot up into the live session for a bit. In this mode, nothing has been written to the hard drive. The system is running entirely from the USB stick. You can test out all your hardware to make sure it works before you install. The screen resolution shown above is a bit funny, as the Nvidia graphics card drivers aren’t installed yet, and the TV’s native resolution of 1366×768 is a weird ratio.


Six minutes later, we’re done! A few post installation jobs: set your user account to log in automatically (System > Admin > Login Window). Go to System > Admin > Update Manager and run all the updates it offers. The go to System > Admin > Software sources and set the machine to automatically install security updates.

Next up is connecting to your content on the network. In my case, i’m mounting some shares from a Network Attached Storage device. Since this device is designed for Windows networks (as most are) you’ll need to install the package smbfs to connect to them.

Let’s create some mount points for your shares. I like to mount mine on /mnt. If you want the shares visible on your desktop when mounted you can mount them to /media. In a terminal:

sudo mkdir /mnt/name_of_mountpoint

Set up some security:

sudo nano /root/.smbcredentials

In that file enter the following two lines:



Ctrl-X > Y > Enter

sudo chmod 700 /root/.smbcredentials

This creates a file with the username and password you need to mount these shares, and makes it inaccessible to everybody except root. Now all we need to do is tell the system to mount the shares at the mount points we created earlier using these credentials. First let’s back up the file we’re going to edit, just in case:

sudo cp /etc/fstab /etc/fstab_bak

sudo nano /etc/fstab

The we’ll add one line for each share we want to mount:

//path/to/share    /mnt/mountpoint        cifs    credentials=/root/.smbcredentials,iocharset=utf8,file_mode=0777,dir_mode=0777 0 0

Just put in your own path to the share and the mount point you made earlier. You might find it easiest to use the IP address of the machine you’re connecting to instead of the name. You’ll have to set a static IP address for that machine in your router to do that. For example you could set the path as //, then set the machine hosting the share /videos to have the static IP address in your router.

Time to test it out:

sudo mount -a

This tells the machine to mount everything in /etc/fstab. Hopefully that includes your nice new network share!

>>> Next page, installing the media centre software >>>

Pages: 1 2 3 4

Tags: , , , ,

2 Responses to “How to build a Media Centre PC”

  1. Ghost Says:

    Just had to post, I saw the image on your first page – vintage computers, ive still got one of them up in the loft. What a fantastic machine, CBM or PET my first and still favourite PC. Simpler

  2. Techblog » Blog Archive » How to make a Raspberry Pi media centre Says:

    […] built a media centre PC a few years back and I’ve been happy with it ever since. It’s been running XBMC, which […]

Leave a Reply

This page last updated 11 November 2009