Why doesn’t Eclipse/Installation Manager work on Linux?


For the next time I’m grumbling about yet more incompatibilities causing problems with Eclipse on Linux, adding the following properties to the bottom of the launcher configuration file seems to help:

-Dorg.eclipse.swt.internal.gtk.useCairo=false
-Dorg.eclipse.swt.internal.gtk.cairoGraphics=false

For example, edit the install.ini file for Installation Manager, which is where I first encountered problems after updating Red Hat Enterprise Linux last year. The problem appears to be due to incompatible GTK and Cairo versions, and there’s a related IBM technote for Installation Manager on RHEL 6.6.

Unfortunately, while that was enough to get Installation Manager working, the Eclipse IDE still seems somewhat unstable. I been exporting the following environment variable for a while but, based on the SDK Known Issues wiki page, maybe that doesn’t make any difference with recent versions:

export GDK_NATIVE_WINDOWS=true

Another suggestion I’ve seen recently, related to tooltips, is to export another environment variable, although so far I haven’t tried it:

export GRE_HOME=/dev/null

Need to experiment a bit more with those last two, and see if I can narrow down whether there are any other real problems.

Certifiable


I recently switched to a new ISP, who have so far been excellent, however they use certificates signed by CAcert. While I generally agree with the principle behind that decision, it does make life difficult. They cheerfully say, “You can check the certificate is signed by CAcert, if you like, before accepting it.” But how?

Warning: the following approach to checking the certificate is signed by CAcert is quite likely to be rubbish, so it’s probably not a good idea to follow it! In my defense, it seemed like a reasonable balance between just accepting some random certificate and complete paranoia but if you know a better way, please let me know.

They aren’t on Windows but the CAcert root certificates are already included in various places, so it turns out that the simple answer might be to grab the certificate from a suitable Linux distribution. Just to be on the safe side, I wanted to find a distribution I could download securely. The best option I found was Tails, which has a secure download and, for extra peace of mind, can be verified with OpenPGP.

My chosen method for trusting the tails signing key was a tad more interesting on Windows due to the lack of an sha256sum command. Luckily it seems you can do anything in PowerShell, so with a little help from Brian Hartsock’s blog, this did the trick instead:

$ha = [System.Security.Cryptography.HashAlgorithm]::Create(“SHA256”)
$stream = New-Object System.IO.FileStream(“tails-signing.key”, [System.IO.FileMode]::Open, [System.IO.FileAccess]::Read)
$sb = New-Object System.Text.StringBuilder
$ha.ComputeHash($stream) | % { [void] $sb.Append($_.ToString(“x2”)) }
$sb.ToString()

 

All good, certificate verified. I would still rather Andrews & Arnold just used a proper certificate though: there are clearly problems with trusting all the certificate authorities that are included in browsers/operating systems by default but CAcert doesn’t exactly look like a fantastic example either, and normal users really don’t have any chance of making a more informed choice.

Building Mosquitto on a Raspberry Pi


Just a few notes in case anyone wants to build the latest version of Mosquitto on a Raspberry Pi before Roger makes it even easier. Luckily there were already a couple of articles describing how to build Mosquitto, and the comments definitely saved some head scratching:

Hopefully the following steps should get MQTT on your Raspberry Pi in double quick time…

Firstly install a few packages. The unscientific list I went with were these, since Python was definitely installed already:

$ sudo aptitude update
$ sudo aptitude install build-essential quilt libwrap0-dev libssl-dev devscripts python-setuptools

Next the sneaky tweak to avoid Python 2.6 errors while building. You can edit /usr/share/python/debian_defaults by hand to move the python2.6 entry from the list of supported versions, or the following should do the trick:

$ sudo cp /usr/share/python/debian_defaults /usr/share/python/debian_defaults.orig
$ sudo sed -E -e '/^old-versions|^unsupported-versions/ s/$/, python2.6/' -e '/^supported-versions/ s/python2\.6,+ +//' /usr/share/python/debian_defaults.orig | sudo tee /usr/share/python/debian_defaults

Now it’s time to grab all the Mosquitto source and packaging files needed to run the build. These were the latest at the time of writing:

$ mkdir mosquitto-build
$ cd mosquitto-build/
$ wget http://mosquitto.org/files/source/mosquitto-1.1.tar.gz -O mosquitto_1.1.orig.tar.gz
$ tar -xvf mosquitto_1.1.orig.tar.gz
$ wget http://mentors.debian.net/debian/pool/main/m/mosquitto/mosquitto_1.1-1.debian.tar.gz
$ tar -zxf mosquitto_1.1-1.debian.tar.gz -C mosquitto-1.1/

Hopefully everything should be ready to go, so kick off the build:

$ cd mosquitto-1.1/
$ debuild -us -uc

That’s all there is to it. Assuming everything worked, just install the packages:

$ sudo dpkg -i ../*mosquitto*.deb

Update: Alternatively, you could just use the new, experimental, debian repository for mosquitto. (13 January 2013)

Joggler OS


For the last couple of days I’ve finally begun to seriously consider deserting the standard O2 Joggler OS. I’ve tried a few alternatives since I first got the Joggler last year but, despite the limitations of the O2/OpenPeak software, none of them have tempted me to switch permanently. The pros have outweighed the cons enough to keep it in regular use… so far…

Pros:

  • It’s simple
  • It works pretty reliably
  • The traffic app is quite handy
  • The  internet radio is better than DAB
  • It streams music from my router

Cons:

  • It’s limited
  • The traffic/radio/music apps are pretty basic
  • No new apps – O2 are clearly not interested in the Joggler any more
  • The calendar is terrible
  • The SDK is disappointing

The O2 calendar app itself was more usable than many I’ve tried but it ultimately failed, mainly because it never actually shows you what’s in the calendar unless you go looking. It really needed to display reminders on the clock screen. It also relied on the O2 servers for all the data, which tended to be really unresponsive, and was certainly no good with an unreliable broadband connection. As for the SDK, I’ll admit to being a bit biased, not being a Flash developer. It still wasn’t great though.

First up, a couple of strong contenders. There are others but for me the Joggler isn’t just a small server to run some Linux variation on.

Jolicloud

I really like the idea of Jolicloud, and it was pretty simple and finger friendly. Unfortunately it always felt a bit sluggish on the Joggler, and it didn’t seem to replace the combination of O2 apps I was happy with, or open the door to new and interesting possibilities.

MeeGo

MeeGo is another OS that should be well suited to an always on touch screen device. I tried the image hosted on bug10738.openaos.org a while ago and it did work really well but, again, it always felt like the Joggler was struggling a bit. Definitely lots of potential though, and I would probably have spent a bit more time experimenting with MeeGo if I hadn’t tried Android…

Android

I wasn’t really expecting much from Android, having seen less than enthusiastic reviews of previous attempts with Android 1.6, but I tried a more recent 2.2 version. First impression was that it was way more responsive than either Jolicloud or MeeGo, and the Android UI is a perfect fit for the Joggler. The first image I tried did have a couple of problems: the screen was a bit fuzzy and the the replacement for the usual Android buttons wasn’t ideal (I liked the gestures but you have to switch between them and being able to get at the notifications). Still, I had seen my Jogglers future, and it had a little green robot in it.

Downloading the second image was marginally more tricky because it wasn’t in English, but it has been well worth it because the screen is rock solid now. It also has virtual buttons in the status bar, which aren’t as fun as the gestures, but work all the time which is a bonus.

So now I just need to find replacements for the O2 apps I use the most. I’m planning to try out Dale’s traffic checker at some point, but TomTom now make their live traffic service available free on the web, which works ok:

Certainly more detailed than the O2 traffic app! It looks like there are a few music apps to try out as well, and I’m definitely keen to download the Android SDK to finally write my first ‘Joggler’ app!!

New clock radio


I managed to resist temptation during O2’s first Joggler special offer, but after having a look at someone else’s I failed to resist the second time round. If you can find an O2 cashback deal on their mobile broadband dongle, it’s even possible to get a Joggler for £35, although I must admit I’m a bit of a cynic when it comes to cashback offers.

The Joggler doesn’t appear to have got particularly good reviews and in trying to describe what a Joggler is, it’s easy to see why people are skeptical; it’s a bit like a really bad iPhone that you a) can’t use to phone anyone and b) can’t use outside your house. The software that comes with the Joggler is disappointing, which doesn’t help. It’s a shame because I think the basic principles for the apps are good as far as they go, but the execution is just not there yet. For example, the guide rightly notes that a tap-and-hold is not intuitive, but to move or delete apps that is exactly what you have to do. I also quite like being able to tap the time to display the clock screen saver straight away, but that isn’t exactly obvious either. The on screen keyboard is inconsistent, although I have on seen two so far. There’s a ‘commonly used’ information icon, but it’s so uncommon that I don’t think I’ve actually seen it. Right up there next to the home icon for every app would be nice. Browsing through music or photos is painful. The messaging app doesn’t allow short SMS codes. Let’s just say that there’s plenty of areas for improvement, although it is just possible that things will get better: the Joggler does get updates and something decent may yet turn up in the Joggler app store!

You might think that I’m disappointed by the Joggler, but I’m actually very happy with it, especially for the price. One big bonus is that the hardware is excellent, although even here there is one tiny omission… how can it possibly not have some kind of SD card slot? That just seems mad. Still, unlike a few people I know, I’m not quite ready to ditch the O2 software and replace it with something completely different. Despite shortcomings with the current apps, I like the concept and it’s certainly good enough for the (reduced) price. For example, I’ve been using the internet radio a fair bit; it disconnects now and then but is otherwise far better than DAB radio. I’ve also been checking the traffic app most mornings. It’s not great (I wish it at least had motorway junctions marked on the map) but it’s good enough to see when the worst of the morning rush is over. I would really like to use a calendar app as well and, having tried the google one, I may actually sign up for an O2 calendar to see how it compares. Google calendars are fine, but I don’t want to see all my google calendars on the Joggler and I couldn’t see any way to pick which calendar(s) to show in the app.

So for now, apart from a bit of tinkering (downloading Ubuntu for the Joggler at the moment for a quick look), I’m planning to leave it mostly as is. In the future it would be nice to get it to run the few bits I have on my other home server,  some home automation apps would be interesting, a decent feed reader instead of that Sky news rubbish would be handy, an Opera mini app would be great, etc. etc. Thinking about getting hold of the Joggler SDK to see what that’s like.

I was collecting a few handy looking links while investigating whether to buy one…

…but Graham and Nathan have that pretty well covered already.

All in all, £35 for a hackable internet radio isn’t bad. And I do really like the clock!

ThinkPad 240 netbook


I’ve had a ThinkPad 240 for many years and in the past it’s been a bit fiddly to install Linux on due to the lack of a CD drive. It also doesn’t help that the BIOS won’t boot from a USB device, although it is a very old machine so I’ll forgive them that small oversight. In the past I’ve messed around with floppy disks and a USB CD but in comparison the last install was an absolute breeze, and it’s now working the best it ever has with Linux.

This time I used GRUB for DOS and a Knoppix live CD. I had been using Grub in one of my earlier Linux partitions but it was getting a bit messy, so I restored the mbr and added a GRUB for DOS entry to the Windows boot manager BOOT.INI file:

[boot loader]
timeout=30
default=multi(0)disk(0)rdisk(0)partition(1)\WINNT
[operating systems]
multi(0)disk(0)rdisk(0)partition(1)\WINNT="Microsoft Windows 2000 Professional" /fastdetect
C:\GRLDR="More..."

I’m much happier handling all the boot configuration from the Windows partition since it’s the most ‘stable’, i.e. the one I mess about with the least! Next I copied the contents of  the Knoppix CD to a directory on the C: drive and created a GRUB for DOS menu.lst file with the following details:

timeout 30
default /default

title Knoppix
root (hd0,0)/Linux/KnoppixCD
kernel /boot/isolinux/linux fromhd=/dev/sda1 knoppix_dir=Linux/KnoppixCD/knoppix ramdisk_size=100000 lang=uk vt.default_utf8=0 apm=power-off vga=788 screen=800x600 nomce quiet loglevel=0 tz=localtime
initrd /boot/isolinux/minirt.g
boot

title Command line
commandline

title Reboot
reboot

title Halt
halt

And that’s pretty much it. In the past that was just the start of getting the wireless card and everything else working, but I’m seriously impressed with the latest Knoppix; it handled the Linksys WPC54G without even blinking and for basic netbook work it’s running on the 240 very nicely. Should have another few years in it yet!

Home server OS


Choosing the hardware took a while but that was nothing compared to tracking down a Linux distribution to use! I’m a big fan of DSL and, being damn small, it runs a treat on the Netvoyager but it’s purpose in life isn’t really as a home server. So began a hunt for a Damn Small Home Server Linux distribution which has eventually led me to…

SLAMPPLite uses the XAMPP server suite, and is low fat version of the “instant home server” SLAMPP. Sounded promising! So far it’s lived up to expectations, running the XAMPP samples without any noticeable delays- here’s how it looked with everything running (though not necessarily doing anything!)…

top - 02:55:44 up 9 min,  1 user,  load average: 0.49, 1.38, 0.94
Tasks:  80 total,   1 running,  79 sleeping,   0 stopped,   0 zombie
Cpu(s):  2.6% us,  3.9% sy,  0.0% ni, 93.6% id,  0.0% wa,  0.0% hi,  0.0% si
Mem:    119544k total,   116608k used,     2936k free,     9428k buffers
Swap:        0k total,        0k used,        0k free,    55916k cached

So a pretty tight squeeze, but on a £95 box (they reduced it after I bought one!) I’m more than happy. As an added bonus, SLAMPP/SLAMPPLite are based on SLAX, which made recompiling the broker for publishing CurrentCost data a snap, plus you get some handy tools for customisation, including the MySlax Creator gui for those of us who spend too long with Windows, so I’ve been tinkering with an extra lite version! (I may well be installing SLAX on my venerable old ThinkPad 240 as well since it seems so flexible.)

Now that I have the LX1000 BIOS password, thanks to the very helpful Netvoyager customer support, I should be able to get it set up to boot back up after a power cut as well. Andy has also been asking about file serving but I haven’t given that a try yet. Plenty more to do!

Update: Another quick look at memory usage, this time after stopping a few unwanted services:

# free -t -m
             total       used       free     shared    buffers     cached
Mem:           116        100         16          0         17         62
-/+ buffers/cache:         19         97
Swap:           78          0         77
Total:         195        100         94