Sunday, May 18, 2008

My Media Center... It lives, It lives!

So I finally got out of my work-induced state of apathy and did something that I've been meaning to do for ages. I made a media center for our living room so that the folks can have access to all the videos I watch and so we have readily available music for parties.

My plan was to spend absolutely nothing on this PC and outside of a $20 hard drive I succeeded by scavenging two dead PCs to make one workable PC. The following components are sufficient for a media center PC (faster is always better, but below is quite workable).
My Media Center PC consists of:
  • Athlon 0.9GHz (yes <1GHz)
  • 256MB ram
  • Geforce4 MX with TV-Out
  • 350W ye-olde Power supply (I need to replace this since its SO old)
  • Network card
  • 80GB HDD (probably a bit small, but got it for cheap!)
I love Ubuntu, but I need something as lightweight as possible so I chose Xubuntu so that I start off with the minimal set and Xfce lightweight desktop. I actually ended up installing Xubuntu twice because I can't read the difference between 8.04 and 6.06 (it was late, give me a break). I did notice that 6.06 was quite smooth compared to 8.04 which I'm assuming is the usual effect of feature bloat, but I can still live comfortably with it.

I got my TV-Out to work using the following work instructions: ... Sort of
I still had to run to do some fairly confused apt-get and /etc/X11/xorg.conf editing black magic, but in the end it all works. I'd write what I did, but it seemed to be various runs of sudo nvidia-settings, xorg.conf editing and sudo nvidia-xconfig.

The biggest decision was which Media Center application to use. My original choice was Elisa, but there is actually a number of other solutions that are available. I went in the end with the XBox Media Center or XBMC. This is a direct to linux port of the media centre application that is on the XBox. It did all I wanted and the interface was sufficiently slick and intuitive that I was okay with using it. It does music, video, photos and for no really apparent reason, the Weather. After all, I want to know how much sun and blue skys I'm missing out on by being indoors watching movies... Anyway I will definitely revisit Elisa in the next few months as it does look like its growing at a faster rate than XBMC.

Installation of XBMC was trivial once you realized that there is a Ubuntu package and you don't need to build it from source. Building from source reminds me why I used to hate Linux as its a needlessly painful procedure which made me nearly give up on XBMC. This site helped me a lot with setting up XBMC, though make sure you use the latest XBMC for Hardy Heron. You also don't need to do much of it outside of updating the sources.list and doing the apt-get. Once installed and launched, if you notice that you get a lot of mouse slowdown, this means your Nvidia drivers are probably out of date.

Video is well handled in XBMC in terms of how the overlay of GUI elements work with the running movie. It is hard to describe without showing it so have a look at this youtube video. Music is somewhat confusing to use, but it is possibly because I haven't enabled 'Library mode' properly yet so I reserve judgement. Photos is fairly awful however due to slow rendering speeds and an slideshow that doesn't appear to allow controls. But I'm pretty much only here for music, movies and that kick-ass style so it has got most of what I need.

I have a few problems that I still have to solve:
  • I need to somehow reduce the noise output of this machine. Currently I buried it behind the amplifier and then covered all but the fan output with a sheet to muffle as much sound as possible. I can still hear it clearly enough. I suspect a new CPU fan and PSU fan are required.
  • I have no network access in the living room and running cables on the ground everywhere is not an acceptable solution. It means most likely that I need a wireless card which I can then link to my WAP/Router. Whilst more painful, it certainly gives me a chance to learn about wireless in Linux which is a new area for me.

Sunday, May 04, 2008

Frets on Fire server on Ubuntu

I've been having a blast lately playing Frets on Fire, the el-cheapo PC Guitar Hero clone. My ex pointed out that it has a Frets on Fire server as well which allows us to upload our top scores so we can verse each other to see who plays better over time. The Frets on Fire server has all these following pre-requisites:
  • Python 2.4 or newer
  • Django 0.96 or newer
  • MySQL Server 4.0 or newer
  • Apache web server (or any other web server)
  • Apache mod_python
  • Python Imaging
  • Python MySQLdb
So I put aside most of saturday afternoon & evening to install all this on my computer and get the server running. Remembering the 'fun' I had installing the LAMP stack on my old Fedora box back two years ago, I knew this would easily take a long time.

Two hours later I had finally managed to get 5 stars on Kaiser chief's Ruby and blew away my old score. Hang on, what happened to installing the FoF server? Yeah, I did that already. That took me less than 30mins. Yes you heard me right, I installed that entire stack and the FoF server in 30mins and most of that was the download and waiting for install.

In fact, its as simple as this:
  • sudo apt-get install apache2 libapache-mod-python
  • sudo apt-get install mysql-server python-mysqldb
  • sudo apt-get install python-imaging
  • sudo apt-get install python-django
  • Follow some very basic commands in the FoF server read-me such as copying and filling in the blanks in files.
It was so easy, it was so simple to get the application to do what I wanted to achieve, rather than just fiddle with install and configuring. It was so quick and easy that it didn't feel like I was working in Linux at all. It was so easy it could have been Windows for all I knew.

What happened to Linux? What happened to the days of mind-bogglingly painful installs? Of rpm-dependency hell. Of dredging web forums trying to understand what a particular error code meant? Of the little victories as you get each component to recognize the other component.

Of course, this was one small app, theres still plenty of other horrifying applications we can try installing, but even that is getting easier by the day. Its clear that Open Source programmers are realizing that making things easier for noobies is the best way to convert us over. We like to spend more time working with the application, rather than knowing all the intricate configurations.

Anyway, I need to get back to some Killing In the Name of...