Ubuntu Hardy as a Media Center: Part 1 The Basics
Tuesday, June 3rd, 2008Introduction
I live in a house with six fantastic house-mates, and we all have different computer setups, media types, computer abilities and so on. I’m running a Mac with OS X Leopard on my desktop and Ubuntu Hardy on my laptop; my friend Gareth is running Ubuntu and a modded Windows XP; and the others are running Windows in various states of dissarray (I actually have two of their laptops on my desk, trying to restore some usability to them after they’ve been exposed to the Cambridge network, unprotected, for three years).
We all love music, films, and so on, and Gareth and I are both keen web-developers. Couple this with the fact we don’t have a TV that works, bad TV reception even if we did, and the spare computer with a 22″ widescreen we have lying around, and the case is obvious: make a media center! Choice of OS fell naturally to Lunix and Ubuntu: Windows XP is a nightmare, and we have strong moral reasons; OS X I tried, but couldn’t get to usefully install; whereas Ubuntu two of us have extensive experience with, and its stable, relaibale, and feels right.
So here’s a list of the things we wanted from it, and in the subsequent posts, I’ll explain how we set them up:
- Watch DVDs.
- Connect to all our iTunes music libraries and play music.
- Play a few games.
- Be controllable from Ubuntu laptops/Mac OS X desktops.
- Hold a central file share - a sort of drop box for files we all use.
- Share our photos.
- Be usable by total technophobes. No ’sudo apt-get install’ for normal people.
- Be running a webserver that we could use to test new sites and code.
- Be discoverable by Windows/Mac/other Ubuntu networked computers.
We weren’t bothered about recording or watching live TV (yet…).
The Basics
First of all, I’m going to assume you have a network ready PC of reasonable power (ours is a 1.7Ghz P4 with 1GB RAM) set up and working, and a reasonable knowledge of Ubuntu.
To begin, download the latest version of Ubuntu (Hardy, 8.04 in this case) and install it. This is covered everywhere on the internet, not least on the Ubuntu website. Create a new user for you personally, not the shared one we’ll use later for everyone to login with. Its handy to keep the two separate. We named our server ‘muso-server’, so just substitute this for your choice in this guide.
Next, boot it up for the first time. Once its up and running and connected to your network/the internet, you need to do a few basic post-install steps. First, go to System->Administration->Software Sources and select all the options on the Ubuntu Software and Updates tabs. Second, bring up a terminal and type the following commands:
sudo apt-get update
sudo apt-get upgrade
This may take a while, but it will bring your system up to the latest version, ready to start tweaking. You may need to reboot to finish the updates.
Ok, the first thing we need is to be able to ssh into our server. Sitting on the floor in the lounge is not ideal… We’ll also need it later for controlling various things.
sudo apt-get install openssh-server
Now we can get a remote terminal up by typing
ssh [your username]@muso-server
from any Ubuntu/Mac system in the house. Now we add the Medibuntu repository to our apt list to allow us to get codecs, dvd playing software, etc.
sudo wget http://www.medibuntu.org/sources.list.d/hardy.list -O /etc/apt/sources.list.d/medibuntu.list
sudo apt-get update && sudo apt-get install medibuntu-keyring && sudo apt-get update
Then we installed some fairly standard media things: DVD Playback, Windows Codecs, Video Lan Client (vlc), Adobe Acorobat, ffmpeg (video playback), non-free-codecs (more codecs).
sudo apt-get install libdvdcss2, w32codecs, vlc, acroread, ffmpeg, non-free-codecs
Finally, we created a new user that could be used as the standard login for everyone to use. This was a good way of keeping our personal accounts separate from a general house account. (Change ‘musos’ to whatever you like.)
sudo adduser --home /home/musos musos
And set the account to autologin (a possible security risk I know, but the account doesn’t have sudo possibilities, and we know who uses the computer) by going to System->Administrator->Login screen and setting the user to autologin after 30 seconds.