Burning an XVid to DVD in Ubuntu Jaunty from the command line

I needed to burn an XVid of one of my performances to DVD last night, remotely, as my MythBuntu box was being used by someone else to watch some crappy TV and I wanted to show off! It was a pretty simple process, just involving a bit of a wait during the transcode 🙂

First you will need to make install the relevent packages:

sudo aptitude install dvdauthor ffmpeg ~nlibav.+-unstripped.+

If you already have dvdauthor and ffmpeg installed, you must install the unstripped libav packages as they contain a tool called mpeg2video and it’s this that does the heavy grunt work!

google-apis-mavenized does not compile

I need to write some backup software for our hosted Google Apps, so as we’re a Java shop I’m going to be using the Java API. Also we’re heavy users of Hudson and Maven so want to get the checked out source building with that.

There is a Google Code project called google-apis-mavenized which looks like it has done most of the work for us, but it does not build when it’s checked out.

New Ubuntu Jaunty Screen

At the moment I’m trying out the beta for Ubuntu Jaunty and one the first thing I noticed was the new version of screen available!

Initially you are provided with a menu to choose a theme!

I went with option 3, Ubuntu Dark! You’re then presented with an interesting new screen display, with 2 rows of status at the bottom, in lots of colours, displaying information about the CPU and RAM etc!

Changing variables in a BASH while loop

There is an error that I often run in to when working with files and while loops in BASH. Often I have scripts similar to the following, where I cat a file and read it in using a while loop to process variables in the file:

#!/bin/bash
count=0;
cat testfile | while read line
do
    count=$(($count+1));
    echo $count;
done
echo "Total $count";

and using the following test data in testfile as:

Error: Could not stat() command file ‘/var/lib/nagios3/rw/nagios.cmd’!

I’ve been doing a lot of Nagios deployments recently, and this error always bites me, on all Ubuntu versions, including Hardy and Intrepid (haven’t quite bit the bullet to try the Jaunty beta yet 🙂 )

<br /> Error: Could not stat() command file '/var/lib/nagios3/rw/nagios.cmd'!

The external command file may be missing, Nagios may not be running, and/or Nagios may not be checking external commands.

An error occurred while attempting to commit your command for processing.

Burger At The Mash Tun

Burger At The Mash Tun

For lunch today we all decided to go to the Mash Tun pub. I argued blind that they didn’t do any food, but it turns out, fortunately, that they did!

Burger At The Mash Tun

I had a most fantastic burger, which was almost the size of my pint glass. The patty was really nicely flavoured, with onions and green bits and all sorts, and not over blown with pepper, which seems to be the norm nowadays. The chips were also really good, a lot of places seem to be mimicking the style of Heston’s Thrice Cooked Chips!

Resize LVM ReiserFS Partition

Mucking about with LVM and partitions isn’t really taxing, it’s all well documented. Trusting it however is a different matter. I’ve resized loads of Ext3 LVM partitions in the past, but was asked to resize a ReiserFS one today, which made me ask the question:

Is there anything writing to it currently, as I will have to unmount it first ..

Wrong assumption, or so says the guy sat next to me! ReiserFS can be dynamically resized on the fly! Woohoo says I, lets have a look at the resize_reiserfs man page!

Tomcat HelloWorld Servlet with Eclipse

I’m really trying to get in to this whole Java web development frame of mind, as it’s a bit of fun, a bit of a giggle, and it’s massive in this area of the world! So obviously my first port of call was dusting off Eclipse and kicking out a HelloWorld style Java servlet!

I grabbed a copy of O’Rielly’s Java Servlet Programming to get started and found it really invaluable, and definitely recommend this book to anyone starting out in Java servlet programming.