Can't run Crashplan desktop under Ubuntu

I've installed Crashplan on my Ubuntu server (it installed its own JVM) and now I'm trying to start the Crashplan desktop client using X11 forwarding. I get:

$ cat /usr/local/crashplan/log/ui_error.log
com.backup42.desktop.CPDesktop main
SEVERE: Failed to launch CPDesktop; java.lang.UnsatisfiedLinkError: no swt-pi-gtk-3448 or swt-pi-gtk in swt.library.path, java.library.path or the jar file
java.lang.UnsatisfiedLinkError: no swt-pi-gtk-3448 or swt-pi-gtk in swt.library.path, java.library.path or the jar file

Solution: Install Java. Specifically the JRE version 1.5. Unlike this report here it has nothing to do with 32/64 bit conflicts, because it's a 32 bit machine. If you don't want to install Java, and its associated clutter, then you could try following the advice in the Crashplan readme file about running the UI locally and connecting to the remote crashplan service via the service port:

Remote GUI Config of CrashPlan on a shell account: What if you have a remote shell account on a box that has SSH access, but no X windows interface or GUI? We're going to show you how to attach your local desktop CrashPlan UI to the remote ...

Read more

Google Chrome OS for Aunties

As a techie type, my ears pricked up when I heard Google announce their intention to release an operating system. I like noodling around with new software when I get the chance, but my main interest in Google's Chrome OS is not for me. It's for people for whom the phrase, "Open Explorer and go to your Documents folder" is filled with intrigue and mystery.

These are the relatives and friends who frequently get themselves into trouble with viruses, malware and trojans because they view the Internet with innocence and optimism. I'm not at all sure that Google Chrome OS will help them find their "missing" documents (although if any company on Earth could, surely it would be Google) but this caught my eye:

And as we did for the Google Chrome browser, we are going back to the basics and completely redesigning the underlying security architecture of the OS so that users don't have to deal with viruses, malware and security updates. It should just work.

That would be worth its weight in gold. Modern operating systems make a real effort to ensure common tasks are quite easy to perform, but slip up, or stray ...

Read more

Batch file comments

In Windows batch files, you can use a double-colon (::) as a comment. I've just spend a few hours trying to figure out why my batch file says, "The syntax of the command is incorrect." when I run it. The answer? I've got a :: comment as the last statement after a group of IF statements. Obscure? Yes. Flaky? Certainly. Oh — hang on, it might be because I've got the :: before a for statement. For some arrangements of the :: comment, I'm also getting "The system cannot find the drive specified."

:: is a bad, bad thing. My advice: Stick to REM

Read more

Find regular expressions

"Why don't my regular expressions work with the 'find' utility in Linux/Ubuntu/Unix/Cygwin/Posix-environment?"

Short answer: You need -regextype posix-extended

E.g. To find files with either of two file extensions, use: find . -regextype posix-extended -regex '.*\.(xsd|java)'

Want to know the differences between POSIX Extended Regular Expressions and basic ones? Read this excellent resource about regular expressions. Want to test your regular expressions, live, in the browser? Try Regexpal.

Similarly, use egrep instead of grep to enable extended regex functionality and use sed -r instead of sed.

Read more

The problem with Truecrypt and Keepass

…Is that there's no back-door. If I forget the passwords, I'm stuck. I wouldn't change them for the world – they're both great pieces of software that I use lots. It's just that my sieve-for-brain can't remember the Access Codes. I end up with old Truecrypt volumes, file containers and Keepass databases lying all over the place. Still, they (clearly) don't contain anything important, because I haven't missed them.

Read more

Sterilising water for feeding babies - is boiling enough?

Our thirteen-week-old daughter had a very slightly dicky tummy, which was enough to make us wonder what the cause might be. One of the first things we needed to rule out was dodgy water in her bottles.

To make up the bottles, we boil freshly drawn water in our kettle. We leave it to cool for about half an hour (boiling water in plastic bottles can apparently release more Bisphenol A) before pouring it into freshly sterilised bottles, which are then sealed.

I remember advice for campers indicating that water should be boiled for some time to kill pathogens. Whilst our kettle boils the water thoroughly, it only maintains a rolling boil for a few seconds. The question is, does this kill the nasty microbes?

According to Survival Topics and The Backpacker's Field Manual by Rick Curtis

“Boiling is the most certain way of killing all micro-organisms. According to the Wilderness Medical Society, water temperatures above 160°F (70°C) kill all pathogens within 30 minutes and above 185°F (85°C) within a few minutes. So in the time it takes for the water to reach the boiling point (212°F or 100°C) from 160°F (70 ...

Read more

Bash prompt

I always forget how to make my bash prompt just the way I like it, so here it is for posterity. In ~/.bashrc:

PS1='\[\e]2;\u@\H \w\a\]\[\e[32m\][\t] \[\e[33m\]\w\[\e[0m\]\n\$ '

On Ubuntu: PS1="\[$(tput bold)\]\[$(tput setaf 1)\][\h]\[$(tput setaf 2)\][\t] \[$(tput setaf 3)\]\w\[$(tput setaf 7 )\]\n\\$ \[$(tput sgr0)\]"

This gives me a prompt like this with the time and path:

[11:00:48] ~/code/database_info

And a terminal title like this:
username@host path

Here’s the long guide to the codes, and here’s the one I use from IBM.

Read more

REISUB - the gentle Linux restart

According to Lifehacker a frozen Linux system that's not responding to the Ctrl-Alt-Delete three-finger-salute can be restarted more safely than by pushing the power button, which is usually the next step.

Holding down Alt and SysRq (which is the Print Screen key) while slowly typing REISUB will get you safely restarted. REISUO will do a shutdown rather than a restart.

Sounds like either an April Fools joke or some very strange magic akin to the old BIOS beeps we used to use to diagnose PC faults so bad that nothing would boot. Wikipedia comes to the rescue with an in-depth listing of all the SysRq keys.

  • R: Switch the keyboard from raw mode to XLATE mode
  • E: Send the SIGTERM signal to all processes except init
  • I: Send the SIGKILL signal to all processes except init
  • S: Sync all mounted filesystems
  • U: Remount all mounted filesystems in read-only mode
  • B: Immediately reboot the system, without unmounting partitions or syncing

(Discovered originally here)

Read more

Obscure python urllib2 proxy gotcha

This is going to be very obscure, technical and humourless1, so unless you suspect your environment-set http proxy is messing with your python, you can stop reading now.

This is actually two problems, and three solutions.

My python script bombs out with:

File "c:\Python23\lib\", line 506, in proxy_open
    if '@' in host:
TypeError: iterable argument required

Your ‘http_proxy’ environment variable must include ‘http://’ at the start.

But why’s it happening in the first place? I’m not even using the environment-set proxy – I’m defining my own, thus:

proxy_handler = urllib2.ProxyHandler({'http': ''})
opener = urllib2.build_opener()

Ah! But urllib2.build_opener() has a set of default handlers, one of which is a proxy handler. Guess what the default behaviour of the proxy handler is, when you don’t give it a proxy url? It gets it from the environment.

So you’re ending up with two proxy handlers. The default one gleaned from the environment, and your custom one. It seems that it only uses the custom one (try it using Wireshark) but it still processes the environment one. So if the format of the environment ...

Read more