Research blog

April 27, 2010

I started a research-related blog within the domain of ITU.

The topic is Efficient Data Systems.

Perl References

April 6, 2010

To be updated …

Sanity Check for TinyOS environment

April 6, 2010

The tos-check-env command does a primitive, but useful, sanity check of the environment.

It displays a warning about graphviz (dot) not being version 1.10, but honestly 1.10 is from 2004 and most likely pretty hard to install by now.

Reviews, with a hint of Gonzo

March 13, 2010

Never mind the product when the review itself is this interesting.

Facebook chat revisited

February 12, 2010

Earlier attempts at connecting Empathy (under Ubuntu) to the facebook chat have proven short-termed[1,2].

In a bizarre twist of fate, the people at Facebook have put on their white hats and done the right thing by exposing their chat functionality under the banner of XMPP/Jabber. There is an official guide with step-by-step instructions for a few specific clients and the general information needed to connect any other client.

There also exists a step-by-step guide for Empathy. Do note, that when adding the account, you want to “Reuse an existing account”, and not “Create a new account”.

I might come up with some cleaner instructions …

List of References

February 5, 2010

This is the master reference.

  • Blender – a 3D content creation suite
  • GNOME 3 – a desktop environment
  • GnuPlot – a graphing utility
  • LaTeX – a high-quality typesetting system
  • Perl – the swiss army chainsaw of programming languages
  • Python – a scripting language with a rather flat learning curve
  • Git – a distributed versioning control system

To be updated …

Blender References

February 5, 2010

To be updated …

Gnuplot Refences

November 28, 2009

To be updated …

LaTeX References

November 28, 2009

To be updated …

Python References

November 28, 2009

To be updated …

Choosing the right architecture for DEB packages

November 20, 2009

I recently experienced a minor run-in with dpkg-deb. My system tells me, that

$ uname -a
Linux hoazin 2.6.28-16-generic #55-Ubuntu SMP Tue Oct 20 19:48:24 UTC 2009 i686 GNU/Linux

which seems to indicate that the Architecture field of the DEBIAN/control file should read ‘i686‘. Doing this results in the error:

deb Error: Wrong architecture 'i686'

Dismembering official packages reveals ‘i386‘ as the correct value.

Rossum Corporation

November 13, 2009

The way Rossum Corporation describes themselves is quite scary. Could their internship qualifications sound any shadier?

“New for 2008, the Rossum Corporation offers exclusive 5-year paid internships for candidates of superior genetic disposition. Contact a Rossum Human Recruitment office near you for more details.”

Timetraveling with GIT

November 8, 2009

or checking out a specific commit.

First, one has to locate the hash of the commit. This can be done by:

  1. Scanning the log by running “git log” (press q to quit). Look for lines labeled commit.
  2. Scanning the log in giggle. Look for the SHA-line. Example:
    Screenshot of Giggle, click to enlarge

In this case our hash is 7f8d2051582dd030e3c07ded70010af033461e31.

Then, come up with a name for a branch to refer the this specific revision. For this example we will use old-branch.

Last, set up the branch by running:

git checkout -b old-branch 7f8d2051582dd030e3c07ded70010af033461e31

Syntax: The general syntax is: “git checkout -b BRANCHNAME HASH

Making BOINC work under Karmic

November 5, 2009

Since installing Karmic on my laptop, it has consistently failed to connect to the World Community Grid server.

Symptoms: When going the the ‘Messages’ tab of the ‘Advanced View’, one is greeted by lines of the form:

2009-11-05T12:56:47 CET|World Community Grid|Sending scheduler request: Project initialization. Requesting 1 seconds of work, reporting 0 completed tasks
2009-11-05T12:56:50 CET||Project communication failed: attempting access to reference site
2009-11-05T12:56:52 CET|World Community Grid|Scheduler request failed: Peer certificate cannot be authenticated with known CA certificates
2009-11-05T12:56:53 CET||Internet access OK - project servers may be temporarily down.

Solution: After some googling I came across this page, which basically gives a simple workaround:

sudo su
cd /var/lib/boinc-client
mv ca-bundle.crt ca-bundle.crt.backup
wget http://boinc.berkeley.edu/trac/export/16195/trunk/boinc/curl/ca-bundle.crt

I’m not convinced that it will survive an update though.

Measuring the Desktop

November 1, 2009

From time to time one needs to measure stuff on the desktop. You might – for instance – want to know whether some region of an image will fit nicely into some part of a webpage.

In ubuntu (both jaunty and karmic releases) the screenruler application provides an easily available mean to do just that. This application is available through a package of the same name and can be found in the menu under Applications -> Accessories -> Screen Ruler.

Screenshot of two instances of 'screenruler' application

The screenshot above shows two instances of screenruler along with the contextual menu (available through right-click or a menu button which appears when the mouse hovers over the ruler). Through this menu the metric can be changed. The length of the ruler can be changed by pulling in the ends and the orientation can be flipped by middle-clicking.

Sharing a network connection

October 28, 2009

Note: This applies to multiple flavors of Ubuntu; Jaunty as well as Karmic. Also, it might be generic to all distributions based on Network Manager.

At the university we have a eduroam-based wireless network. It has not been very dependable yet; sometimes you can log on, sometimes you cannot. It doesn’t seem to be directly related to signal strength.

It seems that Ubuntu – which uses Network Manager – is quite well suited for this environment. Our setup is based on two laptops; one which can connect to eduroam and one which cannot. These are connected by a standard ethernet cable. The laptop connected to eduroam is then set up to share the connection.

The Guide

First open up the network connections dialog. Do this by right clicking on the Network Manager icon in the notification area and choose ‘Edit Connections …’. In the ‘Wired’ tab, click ‘Add’ to add a new connection. Fill it out like so:

Add connection dialog box

The important parts are

  1. The method. This should be ‘Shared to other computers’.
  2. The unmarking of ‘Connect automatically’. This will make sure other connections (like DHCP) take precedence.

After confirming this dialog (by clicking ‘Apply …’) the list of network connections should look like this:

List of network connections

Thats it! When you whish to share a wireless connection, click on the network manager icon in the notification area and choose ‘Share Connection’ under ‘Wired networks’.

Facebook chat with Empathy under Ubuntu (Karmic)

October 26, 2009

Update 2: New solution.

Update 1: This no longer works for me. I’m getting the feeling that Facebook might be messing around with the protocol …

The solution for Jaunty seems to have degenerated.

I recently installed Karmic (Koala) Beta and decided to give it a try again. For me, installing the pidgin-facebookchat package and following the instructions at the relevant (bottom) part of the official documentations page regarding protocols. The experience is not entirely stable, but for a beta release I guess it’s ok.

Resetting Evolution

October 15, 2009

Not the Darwinian kind, but the mail client. This is useful if you want to move evolution data back and forth between two machines.

A little google-research seems to indicate that Evolution stores its data at several locations:

  • Running processes These may interfere with our work.
    Exit them by running: killall evolution-data-server-2.26 evolution-alarm-notify
    Note that the name of the data server seems to follow the relase of evolution (2.26 in this case).
  • ~/.evolution This is the big one, containing mails and other kind of data.
    Backed up by running: mv ~/.evolution ~/.evolution.bk0
    Note this resets the location.
  • ~/.gconf/apps/evolution Contains GConf data. This is most likely and old format which I have lying around.
    Backed up by running: mv ~/.gconf/apps/evolution ~/.evolution_gconf
    Note this resets the location.
  • gconf2://apps/evolution Contains GConf data, new format.
    I don’t know how to backup this.
    Removed by running[source]: gconftool-2 --recursive-unset /apps/evolution
    Note this resets the location.

When these locations have been cleared, starting evolution will launch a settings importer, which can load settings from a backup. Backups can be created by chosing ‘Backup Settings …’ from the ‘File’ menu.

Note: This process appears to forget all about your signatures. Use other means to back them up if necessary.

Photo trap for Bats

September 19, 2009

Came across an article describing one guys efforts in photographing bats slurping water from a pond while in flight. The pictures are strangely beautiful.

Cloning a VirtualBox Virtual Machine

September 12, 2009

Locating clear guidelines describing the proces of creating a copy of an already existing machine (also known as cloning it) is not an easy task. I gave up when I came across an unofficial guide or two.

In VirtualBox, virtual machine definitions are stored separately from disk images. Cloning the machine can be reduced to the matter of cloning the disk(s) and creating a new machine which uses the cloned disk(s). Since disk images contain a unique identifier (UUID) a simple copy – as performed by the operating system – won’t do. Instead, use the following command:

vboxmanage clonevdi ORIGINAL_IMAGE NEW_IMAGE

The default locating for disk images is ~/.VirtualBox/HardDisks and the files use the .vdi extension.

Example:

$ vboxmanage clonevdi ~/.VirtualBox/HardDisks/Disk.vdi ~/.VirtualBox/HardDisks/DiskClone.vdi
VirtualBox Command Line Management Interface Version 2.1.4_OSE
(C) 2005-2009 Sun Microsystems, Inc.
All rights reserved.

0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100%
Clone hard disk created in format 'VDI'. UUID: cd4972c2-b57f-4b59-90f3-db151ac131e5
$

Then create a new virtual machine which uses the DiskClone.vdi image.

Adapting a Leica R-mount lens to Nikon F cameras

September 12, 2009

This site sells kits to convert Leica R-Mount lenses to Nikon F mount.

Features (according to site):

  • The procedure is fully reversible.
  • The lens will focus to infinity.
  • Nikon cameras will show focus confirmation light in viewfinder.

It seems like a few Hong Kong based brands are offering alternatives on ebay. Don’t know if they are trustworthy though …

leitax also has kits for other exotic lens/body combinations. Just about any combination of:

  • Lens: Contax Carl Zeiss, Leica R
  • Body: Canon EOS, Minolta/Sony alpha, Nikon F, Pentax, Sigma

9/11, 1973 edition

September 11, 2009

Chilean coup d’état

Leica announces M9, X1

September 9, 2009

After a long line of rumors Leica today announced the M9 digital rangefinder camera along with the ‘beginners’ X1. An artful Leica M9 brochure was leaked.

DPReview has a preview of the M9, a brief preview of the X1 and a tour of the Leica Solms Factory. Luminous Landscape also has an article on the X1.

Gizmodo has a well-written article on the event and the phenomenon that is Leica. A quote about the press event:

“I’ll say—I’ve never gotten so many looks of pity for carrying a Sony DSLR as I did at the press event today. No one looked down on me; they just looked … sad.”

The announcement was – for some reason – done as a webcast:

Evolution unable to generate folder list

September 6, 2009

After a system freeze, evolution ceased to be able to generate the folder list for my inbox. The statusbar said Error While Generating message list. Clicking on the message popped up this dialog:

Error dialog

According to this bug report the issue might be linked to evolutions use of SQLite.

In the same bug report it was suggested that the following command might solve the issue.

cd ~/.evolution/mail ; for i in `find . -name folders.db`; do echo "Rebuilding Table $i"; sqlite3 $i "pragma integrity_check;"; done

I didn’t have sqlite3 installed, so I ran sudo apt-get install sqlite3 first. For me this command located a handful of files called folders.db and sqlite3 did find errors in one of them: ~/.evolution/mail/local/folders.db.

To make sure that I had the right file I ran

sqlite3 ~/.evolution/mail/local/folders.db "pragma integrity_check;"

which again presented the errors. In the bug report someone explained that missing folder.db files would be regenerated, so I tried stopping all evolution-related processes (evolution-data-server and evolution-alarm-notify will linger after exitting the main program) and removed the file. I then started evolution and everything came up nicely.

On the inability to create evolution filters after migration

September 5, 2009

I recently moved my evolution setup from one machine to another, in the proces changing my username. Mostly the move was successful, but signatures got cleared and the ability to add filters broke. This post describes a workaround for the latter issue.

Description
First a working evolution setup was backed up (File->Backup Settings …) and restored (File->Restore Backup …) on a different computer as a different user.

After adding a message filter and applying it (Message -> Apply Filters) a warning would pop up (‘asjo’ was my username on the first machine):

Filtering Error

Workaround

Make sure no processes related to evolution are running. Then edit the ~/.evolution/mail/filters.xml file:

  1. Locate the rule in question (enclosed by <rule></rule> tags). It is most likely in the buttom of the file.
  2. Inside it, you will find a <folder/> tag (Assuming your filter is a move-to-folder operation). Mine says <folder uri="email://5/Inbox/tinyos"/>.
  3. Replace the 5 with local@local so that you come up with something similar to <folder uri="email://local@local/Inbox/tinyos"/>.

Then save the file.

Test
In order to test the change, simply start up evolution and try to apply filters as before.

Windows must-haves

September 3, 2009

While fooling around with Windows (XP variant) I found a few missing essentials:

  • For transferring files there is putty (there’s an installer common to almost everything)
  • For calculating checksums (MD5/SHA1) there is HashTab which adds a tab to the file properties dialog box

I intend to update this list as I find additions.

Radeon Mobility 7500 under Jaunty

September 2, 2009

Update 2: On a clean install of Karmic Beta, this was fixed out of the box.

Update: The config below results in some stability issues on my machine. It might be isolated and it might not be. But for me it triggers random restarts once a day or so and a reproducible restart when I try to run

cvs -z3 -d:pserver:anonymous@tinyos.cvs.sourceforge.net:/cvsroot/tinyos co -P tinyos-2.x

which really doesn’t make sense. I have reverted to this xorg.conf (which is slow) and hope for the best in Karmic …

Original post:

Since the arrival of Jaunty Jackelope (Ubuntu 9.04) my laptop has performed miserably on the 2D side of things. It’s an IBM ThinkPad T42 2379-R4U. Thats an ATI Radeon Mobility 7500 with 32MB and a 1400×1050 screen.

Today I found this page and as a result my /etc/X11/xorg.conf now contains this device section:

Section "Device"
Identifier "Configured Video Device"
Option "AGPMode" "4"
Option "AGPFastWrite" "True"
Option "EnablePageFlip" "True"
Option "AGPMode" "4"
Option "AGPSize" "64"
Option "RingSize" "8"
Option "BufferSize" "2"
Option "EnableDepthMoves" "true"
Option "RenderAccel" "true"
# Eyecandy Stuff
Option "AccelMethod" "XAA"
Option "EnablePageFlip" "true
Option "DDCMode"
Option "SubPixelOrder" "NONE"
Option "ColorTiling" "false"
Option "MigrationHeuristic" "greedy"
EndSection

This gives me decent, but not great, performance.

Moore’s Law and Digital Photography

August 5, 2009

Luminous Landscape has been running a series of articles on the practical implications of diffraction in relation to subpixel pitch: article 1, article 2 and article 3.

The issue in question is – with the advances in pixel count promised by Moore’s law – when does the megapixel race stop making sense?

Building DEB packages

July 28, 2009

A good starting point is the Debian Binary Package Building HOWTO. The postinst and prerm scripts can be placed in /DEBIAN/ and dpkg-deb will do the right thing when building the package.

The ubuntu wiki also has a nice introduction.

Empathy gives “Network Error”

July 27, 2009

Recently empathy has been giving randomish errors for certain protocols, mostly MSN and Facebook. The message is “Network Error“.

This forum thread hints a solution: Simply run “killall telepathy-butterfly” and restart empathy.