HowTo: Running Eagle CAD 6.2 on Ubuntu 12.04/12.10/13.04

Update: Eagle CAD version 6.4 is available which runs fine on Ubuntu 12.04., Ubuntu 12.10 and Ubuntu 13.04. I’ve made a small tutorial on how to fix possible dependency problems with this new version.

Ubuntu 12.04 only provides an older version of Eagle CAD, version 5.12.0 to be exact. A newer version 6.2 (32 bit) is available for download, but the installation fails due to the lack of a 32 bit libpng-1.4 library:

error while loading shared libraries: cannot open shared object file: No such file or directory.

Luckily, I found a detailed post at raek’s blog which covers older Ubuntu versions. Great parts of the following instruction were taken from this post and adapted for Ubuntu 12.04. Thanks!

First of all you need to install some packages to build the missing png library. Open a terminal window and enter on a 32 bit Ubuntu 12.04:

sudo apt-get install build-essential perl
sudo apt-get install zlib1g zlib1g-dev

On a 64 bit Ubuntu 12.04:

sudo apt-get install build-essential perl gcc-multilib
sudo apt-get install ia32-libs lib32z1 lib32z1-dev

Then you need to fetch the libpng source code and the Eagle CAD 6.2 installer, either with “wget” (as I have done it) or directly from the respective webpages. A current version of Eagle CAD is available for download here:
libpng 1.4 can be found on this page:
I will use the “/tmp/libpng-eagle” directory for building the library:

mkdir /tmp/libpng-eagle
cd /tmp/libpng-eagle
tar xvfz libpng-1.4.12.tar.gz
cd libpng-1.4.12/
./configure --prefix=/tmp/libpng-eagle/install CFLAGS=-m32
make check
make install

At this point I assume that your Eagle CAD installation will be located at “/home/$USER/eagle-6.2.0“. If not, simply adjust the location in the text below:

cd /tmp/libpng-eagle/install/lib/
mkdir -p /home/$USER/eagle-6.2.0/lib
cp -a* /home/$USER/eagle-6.2.0/lib/

Now the installer should run…

export LD_LIBRARY_PATH=/home/$USER/eagle-6.2.0/lib/
cd /tmp/libpng-eagle/
chmod 755

After the installation finishes, Eagle CAD will still not run unless you tell it where to find the png library we have just created. The easiest way to do this is by creating an executable start-up shell script (e.g. /home/$USER/eagle-6.2.0/ which contains the following commands:

export LD_LIBRARY_PATH=/home/$USER/eagle-6.2.0/lib

Additionally, you could create a Unity/Gnome menu entry, for example “/home/$USER/.local/share/applications/eagle.desktop
(do not forget to adapt the $USER):

#!/usr/bin/env xdg-open

[Desktop Entry]
Comment=Eagle CAD

Update: A friend told me that the installation procedure also works with Ubuntu 11.10.

My Erdős number: 3

Okay, it might be a joke among mathematicians – but it is nice to know that one has a finite Erdős Number. Wolfram MathWorld describes it as…

…the number of “hops” needed to connect the author of a paper with the prolific late mathematician Paul Erdős. An author’s Erdős number is 1 if he has co-authored a paper with Erdős, 2 if he has co-authored a paper with someone who has co-authored a paper with Erdős, etc. (Hoffman 1998, p. 13).

In my case, the following collaboration path results in an Erdős number of 3… 🙂

  • Kai C. Bader and Mikhail J. Atallah and Christian Grothoff “Efficient relaxed search in hierarchically clustered sequence datasets”, ACM J. Exp. Algorithmics, 17(1):1.4:1.1–1.4:1.18. 2012.
  • Mikhail J. Atallah and Samuel S. Wagstaff, “Watermarking Data Using Quadratic Residues”, Proc. of SPIE Workshop on Electronic Imaging (SPIE 99), SPIE – The International Society for Optical Engineering, SPIE Vol. 3657, pages 283-288, 1999.
  • Paul Erdos and Samuel S. Wagstaff, “The Fractional Parts of the Bernoulli Numbers”, Illinois J. Math. 24, pages 104-112, 1980.

Dissecting a PICO-C USB flash drive

The Super Talent PICO-C is a really tiny USB flash drive. Ever since I bought mine about a year ago I always wondered how it might look like inside the neat metal housing.

About a month ago, the drive was not accessible anymore. A short search on Google showed that in many cases a bug in the firmware rendered the flash memory inaccessible. There are tools available to revive faulty firmwares, especially for this kind of stick – if at least the controller is still recognized, which was not given in my case. Nevertheless, I tried the tools. As expected, they did not work. Luckily, nothing important was stored on the drive…

Being not that expensive, I did not exchange it (in spite of still having a warranty). Instead, I dissected it. 🙂 Removing the front cover with a screw driver was not complicated.

I first tried to also remove the metal back with a screw driver, but it was firmly glued together. I only managed to break of a piece of the black epoxy (?) housing. Ouch… The solution was to use a hot air gun to melt the glue. The black interior fell out by itself after 10-15 seconds.

Sadly, the black block containing all the logic is rather unspectacular. It does contain a labelling which was only readable after some photoshopping:

4010 C024L0WAA or CO24LOWAA

At this point I gave up. Without any further possibilities to dissect the part and without any clues from the caption I put the remains aside. I thought about dissolving it in acetone or a similar solvent but I suspect it would work.

By the way: I bought the same drive again. I hope the new one lasts longer… 😉

Update: I’ve found a nice blog post about the build process of these USB sticks (bunnie’s blog): Where USB Memory Sticks are Born

HowTo build the ARB software package from source code

Every now and then someone on the ARB mailing list asks for help on how to compile (or install) the ARB software package. I have created a 10 minute video tutorial that shows typical pitfalls that may occur when building the ARB software package ( from source code. The build system was 64-bit Ubuntu 10.04, but I think the video might help users with other Linux distributions as well.

Scanning network drives and shares with Avira Antivir

I use a NAS to store files I do not directly need on my notebook hard drive (due to limited space on my SSD). From time to time I need to boot Windows and I regularly use this opportunity to scan my complete system for viruses. The installed free version of Avira Antivir, like most other free scanners (as far as I know), prevents scans on network drives. This feature is reserved for the professional version. Apart from the safety aspect, this has been annoying me for a while…

Playing around with different mount techniques to get the antivirus software to scan my network shares, I eventually stumbled over symbolic links (surprise). What I did not know: you can create symbolic links not only of files or directories, but also network shares.

Symbolic links from network shares can easily created in with the mklink /d command. (Found it on MS TechNet and in the Windows 7 forum).

C:\>mklink /d "c:\folder" "\\NAS-NAME\folder"

You need administrative rights (an administrator cmd shell). You can then use the explorer to browse into the newly created (linked) directory and scan it with your virus scanner.

CaSSiS – Comprehensive and Sensitive Signature Search

Comprehensive and Sensitive Signature Search

CaSSiS is a fast and scalable software for computing comprehensive collections of sequence- and sequence-group-specific oligonucleotide signatures from large sets of hierarchically clustered nucleic acid sequence data. CaSSiS determines sequence-specific signatures and perfect group-covering signatures for every node within a cluster (i.e. target groups). For groups lacking a perfect common signature, it is able to find the signatures with maximal group coverage (sensitivity) within a user-defined range of non-target hits (specificity). An upper limit of tolerated mismatches within the target group, as well as the minimum number of mismatches with non-target sequences, can be predefined.


The former CaSSiS project page at the TU München was shut down in the mean time. The source code is now available in my CaSSiS GitHub Repository.

Building CaSSiS from Source

CaSSiS uses the cmake build system. Please make sure to have it installed. The build will be halted if cmake/make is run in the source directory to avoid build errors. Please make sure to build the source code in an empty directory, i.e. create a new (sub)directory and then run cmake from there.
Caution: Running ‘make’ in the source directory is prevented!

Source code build steps:

$ tar xvfj CaSSiS-0.5.1-src.tar.bz2
$ mkdir /path/to/build
$ cd /path/to/build
$ cmake /path/to/cassis-src
$ make

I’ve also prepared a video tutorial on “How To build CaSSiS from Source”:


Please make sure to point ‘LD_LIBRARY_PATH’ to the correct directory, if necessary.

(export LD_LIBRARY_PATH=/path/to/cassis/lib)
 CaSSiS usage: cassis {1pass|create|process|info} [options]
 cassis 1pass (new CaSSiS-LCA approach)
 Mandatory: -seq [... -seq] -tree
 Optional: -all -dist -gc -idx -len -mis -og -rc -temp -wm
 cassis create
 Mandatory: -bgrt -seq [... -seq]
 Optional: -all -dist -gc -idx -len -mis -rc -temp -wm
 cassis process
 Mandatory: -bgrt -tree
 Optional: -og
 cassis info
 Mandatory: -bgrt
 Options (alphabetical):
 -all Evaluate all 4^len possible signatures. (Not recommended, may take forever... Default: off)
 -bgrt BGRT file path and name.
 -dist <number> Minimal mismatch distance between a signature candidate and non-targets. (Default: 0.0 mismatches)
 -gc <min>-<max> Only allow signatures within a defined G+C content range. (Default: 0 -- 100 percent)
 -idx Defines the used search index: minipt = "MiniPt Search Index" (Default)
 -len {|-} Length of the evaluated oligonucleotides. Either a fixed length or a range. (Default: 18 bases)
 -mis <number> Number of allowed mismatches within the target group. (Default: 1.0 mismatches)
 -og <limit> Number of outgroup hits up to which group signatures are computed. (Default: 0)
 -rc Drop signatures, if their reverse complement matches sequences not matched by the signature itself. (Default: off)
 -seq MultiFasta file as sequence data source Multiple sequence sources can be defined.
 -temp <min>-<max> Only allow signatures with a melting temperature within the defined range. (Default: -273 -- 273 degree Celsius)
 -tree Signature candidates will be computed for every defined (i.e. named) node within a binary tree. Accepts a Newick tree file as source.
 -v Verbose output
 -wm Enable "weighted mismatch" values. (Default: off)
 Caution: Combining the -gc and -temp filters can cause unwanted side effects because they influence each other.

CaSSiS Result Files

CaSSiS was designed to compute comprehensive signature sets based on large sequence databases. To be able to further process/parse the result files of CaSSiS, the simple but flexible CSV format was chosen. Smaller result files can be read/edited with spreadsheet software (Excel, LibreOffice, …). Larger files should be parsed with an appropriate editor or scripts.

When directly run, CaSSiS creates two different types of result files in the CSV format in the current directory: result_array.csv and results_xxx.csv where ‘xxx’ is defined by the outgroup hits’ range.

This file gives an overview over the results. Rows represent the range from 0 to max. outgroup hits. Columns represent the nodes of the hierarchical cluster. All information within this file is also included in the following ones.

This file contains the actual results of CaSSiS, separated by the number of outgroup hits ‘xxx’. Within the files, the first column contains the node identifier of the hierarchical cluster. The second and third column show the number of organisms within the group/node (for leafs/organisms: 1) and the number of
actually matched organisms. The appropriate signatures follow subsequently.



CaSSiS is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. CaSSiS is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with CaSSiS. If not, see


MiniPT is derived from the ARB PT-Server search index: The ARB software and documentation are not in the public domain. External programs distributed together with ARB are copyrighted by and are the property of their respective authors unless otherwise stated. All other copyrights are owned by the Lehrstuhl für Mikrobiologie, TU München. See the respective license.txt files in the binary/source packages for more details.

Klipsch S4i: Repair broken earbud headphones

Note: Please also read the comments as there are updates & fixes available!

Update: I’ve fixed the graphics showing how the different bundles of cables should be attached to the connector. A big thank you to Rock for correcting me on this!

I am a fan of good-sounding in-ear headphones and bought a Klipsch S4i for my iPhone 3GS. I am really impressed by its quality and they are not overpriced (around 80.- € when I bought them). Last month, the connector on the headphone cable began to loosen. I tried to fix it with cyanoacrylate adhesive but a few days ago the cable finally broke (resulting in a dead left channel and microphone).

I am pretty sure this type of defect is not covered by the manufacturers guarantee (another point: I purchased them over two years ago) so I didn’t bother disassembling the connector. The first thing I did was removing the plastic cover of the connector with a utility knife.

The soldering spots are enclosed in clear plastic. I tried to remove the plastic and gently desolder the cables from the connector, but the connector broke (actually it melted). At least I was able to identify the six bundles of thin twisted wires.

Corrected Cable Assignment for the Klipsch S4i Headphone
I separated the colors and twisted them together into four bundles (one for each contact on the connector) and resoldered them onto another spare connector. The fixed connector lacks the ‘stylish’ finish it previously had, but the shrinkable tubing makes a good protection for the thin wires. And the complete functionality is back, including the microphone and the control buttons.

Update: The new Klipsch S4i model has a revised (improved) kind of connector. Maybe I was not the only one with a broken cable…


Update for users of the Android version (Klipsch Image S4 II) headphones.
A big thank you to “WCSTUR” (whoever you are) for sharing this information per e-mail:

Changes to your wiring diagram for the Klipsch Android version:
TIP – green wire (always left earbud)
Band 1 – red wire (always right earbud)
Band 3 – the 2 earbud copper wires AS WELL AS the red and blue-green shield wires for the microphone. This band is the ground. (Your diagram shows the microphone red and green-blue shield wires connected to the earbud wires. Your diagram may also work since the earphone impedance to ground is only about 18 ohms for each of these earbuds.)
This wiring follows what I dissected from the original plug.

HowTo: Compact Virtualbox VDI images

I just ran into an issue while trying to compact my Virtualbox hard drive images. On virtual NTFS filesystems I usually run defrag twice, then rely on a tool called sdelete (download page) to zero the free space within the image. Afterwards I use vboxmanage to reduce the image size.

This time either zeroing the free space or the shrinking process seemed to fail. The supposedly compressed images needed even more space than before. It took me a while to figure out what happened – the parameters of sdelete had changed:


SDelete - Secure Delete v1.6
Copyright (C) 1999-2010 Mark Russinovich
Sysinternals -

usage: sdelete [-p passes] [-s] [-q] <file or directory> ...
       sdelete [-p passes] [-z|-c] [drive letter] ...
   -a         Remove Read-Only attribute
   -c         Clean free space
   -p passes  Specifies number of overwrite passes (default is 1)
   -q         Don't print errors (Quiet)
   -s or -r   Recurse subdirectories
   -z         Zero free space (good for virtual disk optimization)

It feels like 99% of the tips concerning zeroing the free space (by calling sdelete -c, the old option for zeroing) seem to be outdated. Even worse: the “clean free space” feature shows the same output as “zero free space”.

So this should (currently) be a working procedure:

  1. On the guest system: Run the Windows “defrag” tool twice.
  2. On the guest system: (Download and) run “sdelete -z” to zero the free space.
  3. On the host system: Use vboxmanage “modifyvdi IMAGE.vdi –compact” to reduce the image size.

What happens when heating amber chunks in an oven

In 2004, my girlfriend wife and I went on holidays to Lithuania. Among other places, we visited Klaipeda (Memel) to spend a few days at the Curonian Spit (Kurische Nehrung). It is a famous UNESCO world heritage site. We were lucky, the Baltic Sea was rough and during a morning walk we discovered something glittering in the seaweed: Amber chunks.

In Klaipeda, street vendors offered pretty much any kind of amber “collectibles”. Most of them were counterfeits in egg-shape, with inclusions of wasps or scorpions. But they also had really nice jewelry made of processed amber. A friendly vendor described the manufacturing process: Most amber findings have a milky white or yellow color. They are too shabby for jewelry. These chunks are carefully cooked in sand to gain a clear honey-like color. Back from our vacation, I had to try this out. 🙂

The first picture shows a few pieces of yellow amber, lying on baking paper. They have a diameter of about 3-5 millimeters.After half an hour at about 250°C their color noticeably changed to the typical brown.After an hour their tone was even darker, but did not significantly change anymore.

D-Link DI-614+ Router – Firmware modding

This is a summary of the firmware modification I had made ​​some years ago. The router does not exist anymore and the modifications are no longer maintained. But some people still seem to be interested in the old postings…

Warning: all modifications on your router may void your warranty. I do not claim any responsibility for any form of damages that may result out of the use of the modified firmwares. These firmwares only work with the DI-614+ Rev.A router (two antennas).

Second warning: increasing the output power also results in a higher processor temperature. Additional cooling by adding a heat sink and/or fan to the router might be necessary. I mean it! I think I blew my router that way…

[2004-11-11] a new modded firmware version is available: (and untested:

This modified firmware is based on the original firmware v2.33 which is available on the D-Link website. The DDNS problems are now fixed by the official release, the modified version has the following additional changes:

Powerhack (19dBm)
Wireless LAN channel 1-14 support
Increased log readability

[2004-05-05] modified firmware

Just a minor fix compared to the other changes. I modified the ‘Status->Log’ tab a bit. Now all entries a displayed in a grid. This increases the readability of the log.

[2004-04-30] modified firmware

I was told that the DDNS firmware settings were still not working, although they were saved now. Comparing the older firmware version (v2.20) to the newer one I found out that D-Link used different names for the fields of the DDNS entries. I exchanged the new field names with the ones from the older firmware ,et voilà, I get a wonderful ‘DDNS: good’ in my logs now.

[2004-04-29] modified firmware

Just added another feature to the 2.30 firmware, the so called ‘power hack’. As I was told this seems to be something cool others are waiting for, so I looked at an interesting page about a software hack on the DWL-900AP. Thanks to that hacked firmware I’ve been able to modify the DI-614+ firmware as well. The option ‘Max. 19dBm’ is now available. I have not validated the power gain yet but will do so as soon as possible.

[2004-04-28] modified firmware

Shortly after repairing the DDNS form yesterday I recognized that another feature I liked was missing in the original v2.30 firmware, the wireless LAN channels 12, 13 and 14 (I never had 14 before ;-)). I found out that these channels are not deactivated in the router, they are just hidden from the user. So I modified the firmware once again and added the missing channels in the user interface. I have successfully tested the channels up to 13 using NetStumbler, channel 14 was not found (well, it’s not that widespread anyway).

Known side effects:
Sometimes the channels 12 and 13 appear twice in the drop-down list. You can select either, this has no effect on the routers functionality.
After enabling the wireless LAN with channel 12 or 13 for the first time the router jumps back to channel 6. Reselecting the channel 12 or 13 will fix this. (Verify the channel by selecting ‘status’ in the router configuration.)

[2004-04-27] modified firmware

I have modified the firmware version 2.30 from D-Link and corrected the malfunctioning dynamic DNS form. Although I am currently running it on my own router and it seems to work fine, I do not guarantee for anything.

You can use the flash binary converter tool arj2bin.tar.gz to create valid firmware files on your own.

If something goes seriously wrong…
…the D-Link DI-614+ factory default reflash procedure:

The DI-614+ has a tiny flash program saved in the boot sector of the flash that cannot be overwritten. You can restore your flash eeprom by doing the following:

  • Get an original firmware from the D-Link website
  • Power off the router and remove all but the network cable to your computer
  • Give your computer the static IP address
    (It might be necessary to remove all other settings, e.g. gateway, DNS, …)
  • Push and hold the reset button down with a paper clip or something similar
  • While holding the reset button down plug the router back in and keep holding the reset button down for 10 seconds
  • Open a browser and go to

You should see a simple web page with an edit box, a browse button and a send button. Use this to flash your router with the D-Link firmware and all should be well again.