Thursday, February 28, 2008

Audio format conversion

I recorded some audio (my daughter singing), and wanted to send the audio to someone in a generic and friendly format, namely mp3. The Nokia handset records as an amr (Adaptive Multi Rate) file. A good player, like VLC will play this quite happily as-is, but a lot of people wouldn't know what to do with an amr file.

Ubuntu talks happily to my phone, so getting files off is easy. I have a USB data cable (CA-53) for the phone (Nokia 6234). Ubuntu mounts the micro SD card automatically, if you choose "Data mode" from the phone menu once plugged in. "Default mode" doesn't work. Depending on how your handset is setup, you may have to use the handset interface to copy stuff from the phone's built-in memory to the memory card.

I found a program called Mobile Media Converter, which does a great job. I simply downloaded the archive, extracted it somewhere and ran the executable from there. The interface is straightforward, and even supports drag'n'drop if you're into that sort of thing. No settings to tweak, it just works. It's based on ffmpeg, which you may or may not already have installed, but comes with it's own version, so should work regardless.

Tuesday, February 26, 2008

Fixing Microsoft Fonts

I needed to use fonts from documents from Microsoft office, as well as make available some other specialist fonts.

Essentially it's matter of copying the font files to an appropriate directory. I put them in:

/usr/share/fonts/truetype/subfolder


After getting them there it's just a matter of reloading the font cache:

sudo fc-cache -fv


This link on another (far superior to this one) Ubuntu blog had all the info I needed.

Sunday, February 17, 2008

What's in a name?

Renaming a batch of files.

I needed to rename a bunch of images before uploading to flickr. The following worked well enough:

To preview: (Specified by the -n)

rename -n 's/Image/Saturday_/' Image*.jpg
Image000.jpg renamed as Saturday_000.jpg
Image001.jpg renamed as Saturday_001.jpg
Image003.jpg renamed as Saturday_003.jpg


To perform the task, delte the -n. or swap the -n for -v, verbose, which tells you what it's done.

rename 's/Image/Saturday_/' Image*.jpg


Essentially it's:

rename 's/old/new/' SearchFilter


Reference here.

Thursday, February 7, 2008

Roaming Multi-OS Thunderbird

Happy days.

I just managed to setup a relatively painless way to use Thunderbird as my mail client on both my Ubuntu machine, and a Windows XP laptop.

Background:

Late in 2007 my laptop had a coronary. It's had a long and fruitful life, but was suffering from a cracked mainboard, which caused the occasional instant shutdown if it was flexed at all. The LCD screen backlight was also dead, and I'd been using it with an external monitor (or KVM switch in most cases) for 6 months or more. Oh yeah, it also had a missing1 "Y" keycap. Since this time I've been using my Gmail account to check my main email address, and a handful of others.

To be honest, I didn't miss application based email all that much, the Gmail interface is pretty good. However, the ability to work off-line is nice, and I'd like to be able to randomly access archived business stuff, and a few other niceties, so I'd always intended to go back to Thunderbird at some point.

Back to the setup...

So firstly I installed Thunderbird onto a functional XP laptop I've been using, and setup Thunderbird to synch with Gmail in IMAP configuration. Gmail checks my other accounts, so I only need one account in Thunderbird. This also means if I'm at some other PC, I can still get to everything using the Gmail web interface. Good instructions for setting up Thunderbird/gmail IMAP can be found at bother lifehacker and google.

Once I was happy with the IMAP synchronisation I took the laptop home. It's worth making sure that you get all the settings just right, so that if you delete something in Thunderbird, it's available in the Gmail web trash bin, and that sort of thing. All the instructions are in the previous 2 links.

On my Ubuntu machine, I installed Thunderbird using Synaptic, and setup a default mail profile with the bare minimum to get it running. I didn't download any mail. Then I:
1. Copied everything from the Windows Thunderbird profile directory into the Ubuntu profile directory under a sensible name. (Here is where to find these directories)
2. Modified the profile.ini file to point to this directory.
3. Started Thunderbird and started using it on Ubuntu.

Actually, I did the transfer via a portable hard disk, and intend to keep doing tis, so that at any given time, there are at least 3 versions of my profile. You can never have too many backups. And, because I'm using Unison to automate all the synchronisation at the Ubuntu end, I've only got to manually copy stuff on the XP machine. I'll probably automate that using SyncBack, now that I come to think of it.

Still todo:

Settle on a contact management tool. I'm considering using my Gmail address book, I believe there are plugins to access it from Thunderbird. I'm not sure about this, I'm more inclined to do something more flexible to solve this problem. Maybe a home Zimbra server is in order.

Footnotes:
1: Not truly missing, it's in a glassine bag in my laptop bag, somewhere.

Monday, February 4, 2008

Unplanned power disruption testing

I guess that's what you get for having a UPS on the floor under your desk, with the "test" button right about toe height. Unfortunately, the UPS in question has a battery more than a decade old, and my little test amounted to little more than pulling the mains plug straight out of the box.

Ubuntu 7.10 booted right back up, and I logged in again with no unusual messages or warnings. I pulled up firefox and restored it's crashed session, and here I am. Apart from an article I hadn't saved in Joomla, I didnt lose anything.

Note to self, I need a new UPS for the office. I should probably get one for the media centre box in the lounge room too.

Joomla is great, but . . .

Blogger is just damn too easy.

I'm messing around with a Joomla site at the moment (randomloci.com), and was posting thoughts as articles, thinking I'd present them in some sort of bloggish layout, but a self inflicted power outage caused me to lose the post (no fault of Joomla's) and decide to go for something quick and easy.

I may integrate this into the Joomla site, or may just keep them separate, who knows, for now, I'll use this for random posts. As I said, blogger is just too damn easy. Picking a colour scheme is not. I'm an engineer, OK. Bite me.