Alfresco – You Will Not Beat ME!

Christ.

I was working and playing with some settings on an Alfresco server to try and harden it security-wise. BIG mistake. I couldn’t get the bugger to start up afterwards. With other work commitments in the way, it’s been down for about a day now. I’ve tried downloading the BETA of Alfresco Labs and read various forums with no joy.

The error was

org.alfresco.error.AlfrescoRuntimeException: A previous schema upgrade failed. Revert to the original database before attempting the upgrade again.

FINALLY I found the solution at Bits n Bobs. It’s ridiculously simple: drop the table alf_bootstrap_lock and restart the server.

Now to deal with the next crisis.

Creating a Bootable Windows Setup Disc with Linux

It’s quite annoying having to create Windows installation discs.

One thing I find is that every single time I do it – I keep having to check the internet, so here’s a note of the important bits.

  1. Extract the service pack
    <code>servicepack.exe /extract:C:\SP\</code>
  2. Integrate the service pack with the copied installation disc
    <code>update.exe /integrate:C:\OS_source\</code>
  3. Extract the boot image from the CD and copy it into the new O/S directory
  4. Create an iso with mkisofs
    <code>mkisofs -b bootimage.bin -hide bootimage.bin -no-emul-boot -boot-load-seg 1984 -boot-load-size 4 -iso-level 2 -J -l -D -N -joliet-long -relaxed-filenames -V "NRMSVOL_EN" -o newCD.iso C:\OS_source\</code>

Creating the ISO works in both Windows (with a 32-bit version of mkisofs) and Linux.

BlackBerry Update

Well, the BlackBerry is coming along nicely. I’m gradually getting it to work the way I want it to work.

So far, the cool bits are:

  • Google Maps uses either GPRS or GPS (you can connect a GPS receiver with Bluetooth)
  • Yahoo! Messenger works off the bat and can stay connected at all times. Never miss an IM again.
  • Google Sync syncs up with phone with my online calendar – finally a computer-less way to do this!
  • Impressive battery life. Even though I have been caning the phone with online and Bluetooth as well as loads of phone calls – it breezes through the day without any problems.
  • The Pearl is noticeably smaller than the N80 and the Razr. This goes against my reputation of having a brick-like phone.

There are some other neat things as well. I had some trouble transferring contact data from my N80 to the BlackBerry, but after some experimentation I found a way to do it that didn’t require a computer. It was somewhat tedious having over 100 contacts though.

I still want to get an IM program installed that will use MSN, as some of my business contacts use this. This will tie in with Yahoo! and Google Talk nicely and round it all off.

The built-in browser is a bit useless, so I’ve installed Opera Mini which can render pages properly when the browser gets stuck. I often find myself flitting between the two though, as Opera doesn’t seem to handle downloads properly.

The only downer is that the BB Pearl doesn’t seem to connect to Ubuntu properly through USB – and the Bluetooth connection is a real pain in the arse. This is probably going to make any kind of synchronisation very difficult – to nigh on impossible. There are the Linux Barry tools in development, which have some way of backing up data and things – but I haven’t had the chance to have a play with these yet.

All in all – the experience is going well, and I’m hoping that I can import my MSN contacts into Google Talk soon. Unfortunately to do that, I need to update our company domain SRV records which is opening another can of worms…

Hiding the tricky PDF data

Sometimes, you don’t want people reading the fine detail on a PDF document. Especially if you’re lying about when the document was created.

Can you image the conversation?

“Hey, Jeff – I got your report on the bug monsters.”

“No worries, Dave. Just annoying when the email goes missing like that.”

“Er, yeah. By the way – I checked the document summary and it said you only created it an hour ago.”

“Ummmmmmmmmmmm…”

Well, fear not! Help is here! After spending about an hour searching for a useful open source tool, jPDFtweak came to the rescue!

To us this very effective tool, simply download onto your computer and unzip the files. Once done, you can run the application with the following command:

<code>java -jar jpdftweak.jar</code>

Once loaded, you can open a PDF on the import tab

Now,

  • Click the Document Info tab
  • Tick the Change Document Info box
  • Click Load from Document

All the document data that is in the file is now loaded into jPDFtweak. Just double-click on the bits of data that you want to change, and type in the new data.

Once done, click on the Output tab, give your new PDF a name and then click Run.

Yeah, baby!

Converting WMV with mencoder

Steve and I have been working on a YouTube video downloader based in PHP. One of the features that I’ve been adding in is the ability to upload videos of any format and be encoded into a FLV, just like those big YouTube sites.

One of the problems I’ve been having is that the WMV videos race through at over 10 times the speed of the video, and leave the audio playing at normal speed. This, apparently, has to do with WMVs (and any ASF-based video) using a variable frame rate.

To get around this, you simply need to set a frame rate manually with -ofps. So, to convert a video from WMV to Flash video, you’d need a command like this:

<code>mencoder MyVid.wmv -o MyVid.flv -of lavf -oac mp3lame -lameopts abr:br=56 -ovc lavc -lavcopts vcodec=flv:vbitrate=400:mbd=2:mv0:trell:v4mv:cbp:last_pred=3 -srate 22050 -ofps 25</code>

This will keep the frame rate to 25 fps. Now, all I need to do is work out how to get the correct frame rate for the whole video…

Using Rhythmbox as a Media Renderer

I upgraded to Ubuntu 8.04 Hardy Heron over the weekend. The process was relatively painless, and some of the upgrades made little, but nice, improvements.

Finally, the UPNP media rendering functionality in Rhythmbox is working!

To set this up, you need to access the command line, and install the pyhton-coherence package:

<code>sudo apt-get install python-coherence</code>

Once installed, fire up Rhythmbox, and click on Edit > Plugins.

Once there, tick the box for DLNA/UPnP to enable UPnP.

Rhythmbox Plugins Menu

Click Close and you should see a new shared tab on the left, which will list your network UPnP servers.

It’s somewhat limited in that it doesn’t present you with the various folder views that other media renderers will – but at least you can pick out music from network devices.

Rhythmbox Shared Tab

Cool.