Daily Archives: Friday, 26th Dec 2008

AutoKey – Nifty text expander for Linux

One thing I’ve been missing on the netbook[1] is an equivalent of ShortKeys Lite on Windows or TextExpander on Mac OS X. Both automagically expand a short code to a larger piece of text. I find this quite useful, and I’ve been missing it while using Ubuntu.

So, I did some searching and found quite a lot of people looking for much the same thing, but not that many answers. But a little more searching did turn up a few possibilities. The first was Snippits, referred to in a Lifehacker article, and with rather more detail in a Ubuntu Forum thread. So, I gave it a try.

Well, it sort of worked. It’s a wee bit faffy, in that each block of text you want to expand has to be saved as a separate text file, and it was a wee bit slow some of the time. But the big problem for me was that it seemed to be limited to around 256 characters. And as some of the blocks of text I need to insert are longer than that, it clearly wasn’t going to do the job for me. If your needs are different, it might be just the thing, so don’t let me put you off giving it a try.

The next thing I tried was AutoKey. Now if you’re not comfortable with a bit of fiddling, you might not like this – there’s no automagic installation of the package or its dependencies here – the download is a compressed archive which you need to unpack in a folder under your home folder. Not a major operation – the usual archive tools on Linux make it simple enough to unpack to a location of your choice (not hugely different from the equivalent tools on Windows or Mac OS X, really). But before you can use it, you’ll need to install some packages that it needs – normally, an installation would go and find these for you, but this time you’ll need to install them manually. There’s a helpful list on the download page, but you can just copy this line of code and run it from your terminal:

sudo apt-get install python-xlib python-gamin python-notify python-configobj

Now you’ll want to get AutoKey to start automagically when you log on. Assuming you’re using the standard Gnome desktop on Ubuntu (and it’ll be somewhere similar in other distributions and/or desktops), go to Preferences, then Sessions, and click the Add button on the Startup Items tab. Type in a friendly name in the Name box, then click the Browse button to find where you saved the autokey.sh file. Add a comment if you feel like it, then click the Save button.

Now close everything and log out and in again. When you get back in you should see a new icon in your tray thingy area. Right-click on it to get a pop-up menu. Make sure Enable expansions is ticked, then click on Edit abbreviations file.

If you have a look at the file, you should be able to work out what to do from the examples. You’ll probably want to delete some of them, and add your own. There are also some settings towards the bottom of the file, which you may want to play with. When you save the file, your abbreviations are instantly reloaded into AutoKey, and they’ll work immediately.

So far, it seems to do exactly what I want, and I’m quite happy with it. I’ve written this post in the hope it’ll help people find the answer I was looking for. Hope it helps.

If you try it and have any problems, you’ll need to refer to the developer’s support forum – I know far too little about Linux to offer any useful suggestions.

[1] Apparently the once-great company Psion have fallen to the level of litigation and are threatening people who use the term “netbook” as a generic term for particularly small notebook/laptop computers, rather than for their own, largely forgotten products of that name. Silly Psion….

Wallace and Gromit: A Matter of Loaf and Death

Yesterday was a good one for TV. Not only did we get the traditional[1] Doctor Who Christmas Special, we also had that much rarer treat: a new Wallace and Gromit short film.

And what a joy it was: filled with the usual mixture of movie references, puns so bad that even I would hesitate to utter them, yet another doomed romance for Wallace, gadgets that would make Thunderbirds jealous, and a deranged Cereal Killer (bumping off bakers…).

It’s amazing work – you completely forget that what you’re watching is painstakingly made stop motion animation[2] and find yourself completely believing in the characters – especially the long-suffering Gromit, who manages to convey a huge range of expressions, despite not having a visible mouth.

Wonderful stuff, which will repay repeated viewings to catch some of the references you missed the first time.

[1] Yes, it’s a tradition. Has been since the first one.
[2] Well, except when you can see fingerprints on the figures. I like that.

Doctor Who: The Next Doctor

Well, that was fun. The build-up to the 2008 Doctor Who Christmas special turned out to be an even more impressive piece of misdirection than I was expecting.

I was expecting it to be some kind of trick – I knew that David Morrissey’s character was most unlikely to really be the Doctor, but I really had no idea who he could be, or how he came to be doing such a good Doctor impression. Russell T Davies kept me guessing for long enough to keep things very interesting indeed, and there was more than enough chasing, running and Cyberman action[1] to make it the usual thoroughly entertaining seasonal romp[2].

And no, I’m not doing the usual plot summary – you’ll have to see it for yourself if you haven’t already done so. :tongue:

But to end on a serious note – when the “Doctor” asks the Doctor why he’s now travelling alone, he explains that people move on, or find someone else, or (in a touching reference to Donna) that they forget him.

They break my heart

Beautiful stuff. Remember, there will only be four special episodes of Doctor Who in 2009, which will involve Russell T Davies and David Tennant leaving the show, which suggests to me that they’re going to be very, very big – not just as a send-off, but also to give Steven Moffat and the actual Next Doctor (whoever that turns out to be) a tough act to follow. Which should also help make sure Steven gets the budget he needs. :bouncy:

[1] Delete! Delete!
[2] Not a word I use a lot, but it seemed appropriate