Nixpanic's Blog

Sync Google Contacts with Thunderbird

Google Contacts is an Add-On for Thunderbird which creates an additional address book with your Google contacts.

Great tool!

Support special functions keys on laptops with Linux

It's very uncool that some of the keys on my HP/Compaq nc6400 are not working by default. I get following messages in dmesg:

atkbd.c: Unknown key pressed (translated set 2, code 0xd9 on isa0060/serio0).
atkbd.c: Use 'setkeycodes e059 ' to make it known.
atkbd.c: Unknown key released (translated set 2, code 0xd9 on isa0060/serio0).
atkbd.c: Use 'setkeycodes e059 ' to make it known.


Jiri Koshina pointed me to
HAL Keymap Quirks which is written by a Red Hat engineer.

My Results


For these (and a lot more) keys I (and you) need at least hal-0.5.10 as said in the link above from Jiri. The keys supported by hal are available in the 30-keymap-*.fdi files from the hal-info git:

http://cgit.freedesktop.org/hal-info/tree/fdi/information/10freedesktop

Takis blog: CVS to GIT and back

Takis blog: CVS to GIT and back contains very nice info for using a CVS-server and a git-client.

Thanks Takis!

A Fujitsu Siemens webcam on Linux

Today I got a webcam (loaned from work) working under CentOS. It's a nameless model from Fujitsu Siemens Computers (USB Vendor/Product 0c45:613b).

The sn9c102-driver


I have packaged the suitable driver from Luca Risolia. There also seems to be a binary-only driver which is only available for Ubuntu 7.04. This driver should be better, however it can't be used for free on other Linux distributions.

Downloaded the .src.rpm for the driver from my homepage (direct download).

GTK+ UVC Viewer


Having only a driver is of no use. There should also be a easy to use viewer software. I was unable to find a packaged version for guvcview, so created the RPM myself. The .src.rpm is also available from my site.

No Skype :(


Unfortunately Skype 2.0.0.72 does not support the MJPEG-format delivered by this camera. Looking for possible solutions, I found the ov51x-jpeg-driver and gstfakevideo. Tried both and got the same unsuccessful result.

gstfakevideo seems most promising as it does everything in user-space. It is mainly a library which gets loaded before any others libraries (see LD_PRELOAD in man ld.so). This makes it possible to change the behavior of any function-call. In this case Skype uses libgstreamer and the API can be changed on the fly. But as it doesn't work and the camera is not my personal posession, I won't look into this much more.

Developing with Google App Engine on CentOS-5

Unfortunately CentOS-5 does not have python-2.4 yet. When using wsgiref.handlers.CGIHandler for handling get() and/or post() requests the following ImportError occurs:


ImportError: No module named wsgiref.handlers


This can be solved by installing the
Python Extension wsgiref. I've created an SRPM which can be rebuilt quite easily.

After the installation of WSGI, the google_appengine/dev_appserver.py still does not find the library. This can be solved by configuring the wsgire as a third party module.

cd /path/to/my/google/app
ln -s /usr/lib/python-2.4/site-packages/wsgiref


Now it should be possible to run the Google App:

google_appengine/dev_appserver.py /path/to/my/google/app



More links:
* Google App Engine
* Application Gallery

Let Firefox add RSS-Feeds to Thunderbird

I'm using Thunderbird as mail client and RSS-reader. Firefox is the web browser of my choice. Now I would like Firefox to add links to RSS-feeds to Thunderbird. The next script makes that possible.


#!/bin/sh
#
# Open an RSS-Feed with Thunderbird.
# Idea from: http://ubuntuforums.org/showpost.php?p=4368033&postcount=7
#

exec thunderbird -mail "feed:${1}"


Unfortunately I was unable to make it work (using about:config) without a script.

NSPluginWrapper in CentOS-5.2 (x86_64)

This is an update for an older post by me: Installing Flash on CentOS-5.x86_64

CentOS-5.2 already includes NSPluginWrapper. Yust install it as usual with:

yum -y install nspluginwrapper

Sync time without VMware Tools installed

Just a little note for those who are always looking for missing configuration parameters (like me).

Guests can sync time with the host automatically if you set the following parameter in the .vmx file of the guest:

tools.syncTime = "TRUE"


The same can be achieved by using the VMware Tools, however these might not be installed and installing them could be troublesome on systems not containing a development environment.

Starting SafeBoot with GRUB

Installation of SafeBoot


SafeBoot can be installed over Tivoli. After installation, you need to authenticate on every boot and Windows will be started.
Only the partitions used by Windows will be encrypted, the Linux partitions are not affected.

Boot from a Rescue System


Booted my CentOS x86_64 with the installation DVD, giving on the boot-prompt linux rescue. This rescue system automatically detects my /-filesystem and all used partitions. The dialogs explain how to change to the installed system:
chroot /mnt/sysimage
Now you are prepared to backup SafeBoot and setup GRUB as default bootloader.
Note:
If your Linux is installed with a x86_64 version, you'll need a x86_64 rescue system.
Note:
It is adviced to use a CD or DVD for booting. A USB-Stick (which is emulated like a harddrive) could give troubles installing GRUB.

Backup the SafeBoot MBR


dd if=/dev/sda of=/boot/safeboot.mbr bs=512 count=1
The master-boot-record will be saved in the file called /boot/safeboot.mbr.

Install GRUB on the MBR


/sbin/grub-install /dev/sda
This overwrites the MBR with GRUB. By default GRUB will boot (no authentication needed).

Starting SafeBoot from GRUB


Edit /boot/grub/grub.conf (on Red Hat/CentOS) or /boot/menu.lst on other distributions. Add the next entry too the file:

title Microsoft Windows XP Professional
rootnoverify (hd0,0)
makeactive
chainloader (hd0,5)/safeboot.mbr

Here (hd0,0) is the Windows partition and /safeboot.mbr is the backup of the SafeBoot-MBR. In this case it is missing the /boot directory, as /boot is a seperate partition ((hd0,5) which is /dev/sda6).

Compose key magic

A very good article about typing special characters under Linux: Compose key magic by cyberborean.