Powered by
Movable Type 3.38 mod_perl/2

 April 2007 Archives

2007, April 04 (Wed)

Linux On C++ ABIs Or Debian, SCIM Input Method and a crashing Firefox

If you want to use the SCIM Input Method Editor on Debian (Etch) together with the official Firefox, you will ineviably be presented with:

/opt/firefox/run-mozilla.sh: line 131:  7083 Segmentation fault      "$prog" ${1+"$@"}
zsh: exit 139   /opt/firefox/firefox

Apparently the problem is caused by firefox being linked against libstdc++.so.5 while scim is linked against libstdc++.so.6. So what happens is that when Firefox tries to load the scim GTK_IM_MODULE, the libstdc++.so.6 is loaded into Firefox, and this won’t work because the ABI changed between version 5 and 6 of libstdc++.

This leaves us with three possible solutions:

  1. Compile Firefox yourself and link it against libstdc++.so.6

    I don’t like this solution because it is cumbersome, requires time and space, and has to be repeated for each new version of Firefox.

  2. Refrain from using SCIM and resort to good old XIM X Input Method instead.

    This solution works basically exactly as descibed on the SCIM website.

    You will have to export XMODIFIERS=@im=SCIM and export GTK_IM_MODULE=xim.

    Remember that with XIM, you must also have set LC_CTYPE to the corresponding language, i.e. export LC_CTYPE=zh_CN.gb2312 or else you won’t be able to activate the IME with Ctrl+Space.

    Because of the heavy environment tampering required here, it is most easy to create a little startup script for Firefox that sets the variables accordingly before invocing the firefox.sh script

    The disadvantage of this method is that it uses XIM (for details why this is bad refer to the SCIM documentation) and that you have to fiddle with your locale environment. It also dictates a single language that you have to use. Furthermore, the XIM edit style is always “outside of the application window” — you might or might not like this editing style.

  3. Use the C scim-bridge instead!

    Instead of using the scim GTK_IM_MODULE, there is another GTK_IM_MODULE available called scim-bridge. It is written in C and uses a socket communication with the C++-scim instead of being written in C++ like the scim GTK_IM_MODULE and therefore avoids the libstdc++ problems explained above.

    This package is available in Debian as scim-bridge.

    The scim-bridge is my prefered solution to this problem as it avoids recompilation of Firefox or XIM and features “on the spot” editing style.

    As you’d still want to use the regular scim module for all the other applications, I also recommend using a small Firefox wrapper that sets up the environment like this:

    [ x"$GTK_IM_MODULE" = "xscim" ] && export GTK_IM_MODULE="$GTK_IM_MODULE-bridge"
    /opt/firefox/firefox "$@"

Bonus: To use SCIM with Opera, keep in mind that Opera is a Qt (“KDE”) application. You can either use the XIM method described above and set QT_IM_MODULE to xim, or (prefered) install the packages scim-qtimm and scim-bridge-client-qt. Then you can set QT_IM_MODULE to scim (editing style: “outside of application window”) or scim-bridge (“on spot” editing style).


2007, April 08 (Sun)

Linux Juhuu, es ist ein Etch

Etch wurde so eben veröffentlicht und die Leute vom heise Newsticker arbeiten wohl auch an Ostern, wenn auch verwirrt: (heise online: Debian GNU/Linux 4.0 (Etch) veröffentlicht)

Die neue Distribution läuft nach Aussagen des Entwickler-Teams auf nahezu jedem Computer vom Handheld bis zum Supercomputer, weitere Informationen dazu enthält die Mitteilung zur Veröffentlichung.

und wohl noch nicht ganz wach: heise-doof.jpg


2007, April 20 (Fri)

Linux Booting floppy images using GRUB

Booting floppy images without having a real floppy drive can be handy for example when updating the BIOS or maybe even installing operation systems.

First get memdisk which is part of syslinux (also in the debian-package syslinux: dpkg -L syslinux|grep memdisk). memdisk is a small driver which emulates a disk in the RAM.

Then configure GRUB to take memdisk as kernel and the floppy image as initrd. memdisk and the floppy images need to be accessed by grub, so put them in /boot.

A sample GRUB configuration is:


title Upgrade BIOS
root (hd0,0)
kernel /memdisk
initrd /1KUJ09US.IMG


2007, April 30 (Mon)

Linux, Netzwelt Evolution & SyncML

For a long time, I've been trying to synchronize contacts and calendar entries between my mobile phone and evolution.
The right way to do this is obviously SyncML, as most modern mobile phones support it, and there are a lot of webservices who will provide you a SyncML-server for free.
However I always had issues getting SyncML to work with evolution (thunderbird/sunbird would be nice, too but I guess that's impossible at the moment).
Neither multisync, nor opensync worked for me in any way.

Now I finally found a solution that really works. There is a project called SyncEvolution. You will find the sources at http://www.estamos.de/projects/SyncML/index.html
Debian packages do not seem to be available right now.
Compiling and installing worked for me without problems. However you need some libraries and headers to compile it. On debian etch, you need to install these packages:

libecal1.2-dev
libecal1.2-6
evolution-dev
evolution-data-server-dev
libedata-book1.2-dev
libedataserver1.2-dev
libdb3-dev
libcurl3
libcurl3-dev

Then you can compile and install it with the usual `./configure; make; make install`

The configuration is a bit weird:

basically you will have to create these files in your home directory:
.sync4j/evolution/<server>/spds/syncml/config.txt
.sync4j/evolution/<server>/spds/sources/addressbook/config.txt
.sync4j/evolution/<server>/spds/sources/calendar/config.txt
.sync4j/evolution/<server>/spds/sources/memo/config.txt
.sync4j/evolution/<server>/spds/sources/todo/config.txt

The last 4 files are optional, depending on which items you want to synchronize.

<server> is the identifier, just in case you have more than one SyncML-server.

syncml/config.txt contains the server configuration.

You can use etc/syncml-config.txt in the source directory as a template.
There are also templates for funambol and scheduleworld in the same directory.
I'm using www.scheduleworld.com.
mobical.net didn't work for unknown reasons.
See http://www.estamos.de/projects/SyncML/Compatibility.html for a list of compatible servers.

The configuration templates are well-commented, so I didn't need any further documentation.

I sometimes have problems, when syncing calendar entries that last a few days and are marked as 'all day'-events. Just enter a start and end time and it will work fine.