Category: Open Source

Multiple GnuCash files on Mac OS X

This is one of these 'just in case you're Googling for it' posts. Most readers can probably ignore!

I've been experimenting again with GnuCash, the Open Source accounting package that runs on the Mac, Windows, Linux and others. There's rather a paucity of good accounting packages for Mac users, especially now that the good old MYOB ("Mind Your Own Business") is no more, but last time I looked at GnuCash it was something that you'd have to be a pretty die-hard Open Source enthusiast to want to use.

Well, it's come on a long way, and I've been merrily importing statements downloaded from my banks and setting it up for both personal and business use. If you're familiar with double-entry bookkeeping it all works very nicely, and it stores all the data in Gzipped XML files, so I can be pretty confident that I could get it out and into another format if I ever needed too.

Only one hiccup so far - the standard build for the Mac (which no longer requires X11) assumes that you only want one set of accounts (ie. one file) open at one time, and it helpfully closes your current project when you open a new one. But it can be very handy to have your personal account and business account, or more than one business, open at the same time, especially if you're shifting money between them.

Here's how to do it:

Instead of running the GnuCash app and using File > Open, start it from the command line, e.g.:

open -a Gnucash -n --args MyBusiness.gnucash
open -a Gnucash -n --args Personal.gnucash
The '-n' means 'start a new instance even if the app is already running'. Note that some of the preferences etc are still per-user rather than per-file, but assuming you're not doing anything too complex, this works fine. You could use Automator to create a handy one-click launcher in your dock for each account to do the same thing. Or, create an Automator application using the 'Run Shell Script' action, and specify the script as:
open -a Gnucash -n --args $*
Save the application, and any .ledger files dropped onto it will be opened in their own session.

Alright, Mr. DeMille, I'm ready for my close-up.

OpenCV is a wonderfully full-featured computer vision library. I've just written a very simple demo of the built-in face recogniser. It finds a face and scales it to a fixed size. If you watch my eyes in the viewfinder window, you'll see they stay pretty much in the same place however I move around the room.

All sorts of things could be done to improve the frame-rate if needed, but this was just a quick test I put together over a couple of hours while learning about the library. Back in ancient history, when I did my PhD, this kind of thing would have taken weeks... The title of this post, if you're not familiar with it, is from the famous closing scene of Sunset Boulevard, which you can see here. Of course, as soon as I thought of using this title, I realised that I could also grant Gloria Swanson's greatest wish. So here's my version...

It needs some smoothing, but still quite fun.

Speed up slow console in VirtualBox

This is one of those geeky posts that is here for the benefit of (a) my failing memory - so I can search for it later - and for (b) anyone who happens to Google for the right keywords.

At Camvine, most of our development is done on Linux, but many of us have Macs as our preferred desktop machines. So we regularly install Ubuntu Linux Server as a virtual machine using VirtualBox. We're not interested in a graphical interface to the VM - the console is fine. Unfortunately, the default video driver that Ubuntu uses when running under VirtualBox is painfully slow, to the extent that we usually minimize the window and SSH into the machine.

Fortunately, the guys on this thread found a solution - thanks everyone!

On the VM, edit /etc/modprobe.d/blacklist-framebuffer.conf and add a line: blacklist vga16fb

Reboot the VM and speedy scrolling should be yours again.

(Of course, you may still want to ssh in to get more convenient cut & paste, etc., but it's nice to have a speedy console anyway, and you may not always have network access to the VM.)

Duplicate mail messages

In my various shufflings, copyings, archivings of email messages between my IMAP folders, I often end up with duplicates.

Sometimes, a copy or move goes badly wrong and I end up with hundreds of duplicates.

Many years ago I wrote a bit of Java code which would find and remove duplicates, but I've now converted it to a Python script and released it as Open Source, in case it's useful to anyone else.

You can find IMAPdedup here.

Feedback and improvements welcome!

VNC2DL

vnc2dl2Warning - for geeks only...

I've just posted an alpha version of VNC2DL on github.

This is a VNC viewer which uses the new Open Source library from DisplayLink to display a VNC session on a USB-connected display, rather than in a window.

Just in case it's useful to anyone...

Mac Mini 9

My Mac Book Pro has a new baby brother. It's a Dell Mini 9 on which, thanks to the instructions here, I was able to install Mac OS X.

I already had a properly-licensed copy of the OS, in so far as any operation like this could be properly-licensed. I ordered the Dell with 2G RAM, an improved webcam, a larger (16GB) SSD and a bluetooth module. Total cost: £277. Including VAT. And shipping. Oh, and a nice carrying case.

As soon as you pick the device up, you can tell from the construction that it's not an Apple. But my first solid-state 'Mac' runs the OS really quite nicely. I had a vague idea that Apple software was only licensed to run on Apple-badged products, so I fixed that too:

However, there was one downside to the bargain special price I got from Dell. After ordering, I discovered that some varieties of this machine, such as those purchased from PCWorld or from Vodafone, have a 3G modem and a slot for a SIM. This doesn't have it, and it would have been really quite nice. But then I might not have got some of the other upgrades, and since everything else, including a 3G connection via Bluetooth to my phone, seems to work fine, I'm really very happy.

Open Source as a strategy for the future

One of the most interesting discussions I've heard on the subject of Open Source for some time is the interview with Simon Phipps, the chief open source officer at Sun, on the FLOSS Weekly podcast.

Highly recommended for anyone with an interest in Open Source - this goes beyond the level of the usual debates.

Ahead of its time?

In 2001 at the AT&T Labs in Cambridge, we created a system we called the Broadband Phone:

Basically, it was a Linux-based VOIP phone with a VNC viewer and touch screen built in to it, and we built a GUI toolkit which rendered directly over the network in VNC. A standard Dell PC operated as the phone exchange (I wish we'd had Asterisk then!) and also provided the graphics for a variety of specially-written applications. It drove about 100 phones without any trouble, and we used this as our internal phone system in the lab for some time. The plan was to spin out a company based around the technology, but this was 2001, and you couldn't get funding for new companies, whatever you did!

Anyway, at one point I created a cordless version based around a Compaq iPaq. I came across a publicity photo of it recently, and it took me a moment to realise why it looked so familiar:

Perhaps we were just too far ahead of the curve... :-)

You can find my original pages about the Broadband Phone project here on the Internet Archive.

Adieu? Or Adeona?

What are the chances of getting your laptop back if it's stolen? Pretty slim, probably. But you can at least improve the odds.

There are various utilities out there which, when installed on your machine, will call home from time to time. If somebody steals your machine and connects it to a network, you can then use information from these connections to help track it down.

I've created various home-brewed versions of these in the past but I guess a perfect utility would be:

  • not dependent on any one company
  • usable on multiple platforms
  • secure
  • open source
  • free
Ah! That would be Adeona you'd be wantin', so it would. More info here.