Project media server

As I’ve often said, “Ubuntu on the desktop, Debian on the server” is the way to go. That said, I’ve mixed and matched the two a fair bit over the past couple of years, and would now say that as Ubuntu is ready for the server, so Debian is a damn fine desktop distro which is also surprisingly easy to set up to play every possible kind of media file I can throw at it.

So yes, I went with Debian (stable) because the computer I’m using was already running it. I’ve set the machine up, copied all the music, movies and TV shows across, and now have a very pretty and totally functional media machine. So far I’ve played some music, watched a documentary about T.S. Eliot (who still to this day inspires me more to write than any other person living or dead), and have some live footage of Leonard Cohen to look forward to at some point this week. I’ve also got it on our wireless network, so I can dump media onto it from anywhere (anywhere being largely my main laptop which lives upstairs).

It currently looks something like this:

Default Debian desktop
Default Debian desktop

I’m using Rhythmbox for music, Totem for video, and have installed very little extra apart from the required media codecs (I seem to have a mix of pretty much every type of media file for some reason). I can’t say I really came across any problems, and Debian did a great job of being able to find and install whatever was needed to make each file type work (although I’m systematically converting everything to .ogv and .ogg so a lot of this won’t be required soon).

So far so good.

So you want to buy a netbook?

One question I get asked a lot is some variation on “what computer should I buy?” My answer usually involves asking what it is going to be used for, what the budget is, and if the user has any preconceptions regarding the OS of the machine.

Increasingly I get asked about netbooks in particular. I dislike the term netbook, but I’ll use it because people know what I mean. And because I get asked about them, I try and stay up to speed with what is on the market, which in turn makes me carefully sum up the pros and cons of each one. The things I look at tend to be:

  • Physical size – small is good, but I totally see how something as small as my EeePC 701 is not to everyone’s taste. If I was buying one now, I’d want a screen size of at least nine inches, with a resolution of 1024 by 600. The larger EeePCs are good in this regard, but I think the Dell Mini beats them all with a 10″ screen pitching it between the EeePC 701 and my (once again) dead 12″ iBook.
  • Hard drive size – the hard drive can be anything from a 4gb solid state to a 160gb laptop hard drive. I use mine as my 3rd machine, with all my files living on my main laptop and the important ones synched via dropbox. But if you’re going to use it as a main (or even second) machine, then get a big hard drive. With all the major manufacturers you can now choose between a small solid state drive and a larger hard drive, so this shouldn’t influence choice too much.
  • Battery life – 3 hours does me fine, but if you are going to travel with it then this becomes important. I’m sure I’ve seen a couple with with 7 hours of battery life (although I might be thinking of the new Macbook Pro).
  • Price – You can get a first generation Acer Aspire One or EeePC for under £150 now, and even some of the slightly larger netbooks come in at well under £300 (which would be my personal price limit). Some of the mid range EeePCs (the 1000H for example) are quite reasonable, as are the Dell Minis (before you add too much customisation that is).
  • Operating System – Some come with really dire versions of Linux, some come with XP, the Dell Mini and Lenovo Ideapad actually ship with decent Linux distros (Ubuntu and Suse). I’m not too bothered, because I tend to reformat and reinstall everything I buy, but for non technical users this has to be a factor. Now, I love Linux. But I’d think twice before advising anyone to try and use the versions of Linux shipping with the EeePC and the Acer Aspire One. They are a bad advertisement for something that is great, and for that reason I’d say that if you want something with Linux on then choose something with one of the big distros (anything in the distrowatch top 10).

So yes, that’s what I tend to look at. If I was buying one today I’d probably go for a Dell Mini with a large hard drive, Ubuntu preinstalled, and as much Ram as I could fit in it. My second choice would probably be an EeePC 1000H, although I’m loathe to pay for a Windows licence when I have several I don’t use already. If price was more of a factor than it is, then I’d go with an Acer Aspire One (which I’ve just discovered I could get for £160 with a 120gb harddrive and 1gb Ram, which is actually really tempting if the noises my EeePC is making mean what I think they mean).

Weird hardware fault

I’ve narrowed down what the problem is with my (otherwise fully functional) iBook. It basically won’t recognise the charger until the battery is totally drained. This would be quite annoying if it was still my main laptop, but as I replaced it with a shiny Sony Vaio at Christmas then it’s actually not a massive problem and just means I run it off the battery until it dies and then recharge it. The battery itself seems fine (it gives me about 3 hours of use on average), so it should theoretically have a little life left in it yet.

Changing hostname in Mandriva

I’ve been doing a bit of work on Mandriva recently, and I always forget that there are two places you need to change the host name before it “takes”.

in /etc/sysconfig/network add the following line:

HOSTNAME=hostname

Where hostname is whatever you want the computer to be called.

Then in /etc/hosts just add the hostname after localhost on the first (and probably only) line in the file. It should look something like:

127.0.0.1       hostname localhost

Where again hostname is the name of the computer.

Do this, reboot, and all should be well.

Holidays and other things

As of 4pm tomorrow I’m on holiday for 10 days. It’s the first break of any length I’ve had for a few weeks, and I am very much looking forward to it. Last time I was off I ended up spending most of the week working on various projects, but I do intend to make at least a half hearted effort to step away from my laptop for a few hours each day and actually enjoy the sunshine.

I will also review some music, seeing as I’ve actually been asked to by some of the people who make it (which still scares me).

Of course, it would be a good time to upgrade all the computers to Ubuntu 9.04, but I think I may wait a couple of weeks for that.

Mass converting .bmp to .jpg

I’m largely posting this because I’ve had to do it twice recently and forgot how to do it both times.

The command to convert a whole folder of images from .bmp to .jpg (on Linux, obviously) is:

mogrify -format jpg *.bmp

It’s really that simple, and is actually a lot quicker than I thought it would be. You need ImageMagick installed, but most distros will have that by default anyway.

Synching with folders outside of /dropbox

This could probably be summed up in a few words (the words being “use symlinks”).

Basically, what I wanted to do was to sync several folders outside my dropbox folder (for various reasons). The solution was to create a shortcut in the folder I wanted to sync, and then moving the link to my dropbox folder.  This can be done of the command line by typing something like:

ln -s /home/folder/to/sync /home/andy/dropbox/synched_folder

This could be used in all sorts of ways, some of which I may blog about over the next couple of weeks.

More productivity

This afternoon I did a bit more work on our home server (the one I built from bits of my old dead PC).

It’s now running:

  • A full installation of Mediawiki, with a few extensions, which Steph is using a lot right now.
  • A streamable repository of Creative Commons licensed music so that any computer in our house can stream a selection of new and interesting music. This works nicely with Rhythmbox and iTunes (I’ve not tested anything Windows based yet).
  • A local access only mailsever (built around dovecot with a squirrelmail front end), which grabs a copy of all my incoming mail and archives it locally. This means I now have an extra level of backup in case I encounter more problems with my externally hosted mail.

All of this is controlled from webmin, so my main laptop is able to configure everything without me actually having to sit in front of the server. This is good, because the server is noisy enough to consider banishing it to the spare room.

Using wcid instead of NetworkManager on Ubuntu 8.10

This post came about due to an issue with NetworkManager connecting to our wpa-enterprise authenticated network at work, but demonstrates that there is more than one choice when it comes to almost everything on Linux. It’s not too fiddly, and I’ll hopefully have a rebuild of Ubuntu incorporating these changes within 24 hours.

First off, you need to add a line to your sources list, by issuing the following command:

sudo nano /etc/apt/sources.list

Add the following line at the bottom of the file:

deb http://apt.wicd.net intrepid extras

Then press ctrl+o to save and then ctrl+x to quit and then issue the following command:

sudo apt-get update && sudo apt-get install wcid

This will download wcid (a network management tool that doesn’t suffer issues connecting to enterprise level networks), uninstall NetworkManager and then install wcid. At some point in this process you will lose network connectivity, but this is fine.

To make wcid start at boot, go to System > Preferences > Sessions and add a new item to startup. The path for the application is:

/opt/wicd/tray.py

Reboot, and you should find that wcid adds an applet similar to nm-applet which will allow you to view available networks, and connect and configure them. I’ve tested this with my EeePC 701 and an Acer Aspire One (both running Ubuntu 8.10), and it is known to work (with a bit of tweaking) on Fedora 10 as well.