Friday, December 10, 2010

Ubuntu netbook SD card reader issue in Acer AspireOne

Recently I got a new netbook Acer AspireOne D255

Installed Ubuntu 10.10, unfortunately the new clutter windows manager - mutter was a big disappointment, it has an obvious performance issue when comparing without mutter even on a slower atom processor! this made me go back to 10.04.

The new model seem to be using a different brand of SD card reader which has no driver support from linux...
lsusb shows the following:

ENE Flash
UB6250
606569746801


After google around, several of suggested grub and modprobe config changes doesn't work at all, finally found the driver has just been recently added to the kernel from version 2.6.36, which 10.04 came with 2.6.32 obviously wouldn't work.

The new kernel isn't available in the standard repository, but to add it, just follow these simple steps:

sudo add-apt-repository ppa:kernel-ppa/ppa 
sudo apt-get update
apt-get install linux-image-2.6.37-8-generic

reboot with the new 2.6.37-8 kernel then you'll see the SD card!


Reference:
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/633852



Monday, July 19, 2010

capture images from avi using ffmpeg

this script would use ffmpeg to split a video into series of images on the second provided.

#!/bin/bash

for i in `seq -w 1 1 100`
do
   ffmpeg -itsoffset -00:02:03.$i -i video.avi -vcodec png -vframes 1 -an -f rawvideo pix-$i.png
done

Monday, May 31, 2010

Issues with installing DB2 8.1 Development Client on Linux

When running the most obvious command db2setup, it shows the following then nothing happens:

DBI1190I db2setup is preparing the DB2 Setup wizard which will guide you through the program setup process. Please wait.  

Perhaps it is because I am not running X as GUI, but strange it didn't complain about the DISPLAY message.

It can be installed by using db2_install

Post-install is unusual compare to other database installs, you need to run this to create an "instance" with an userid already exist on the system.
However, I get the following error on Red Hat Enterprise Linux Server release 5.4 (Tikanga)

/opt/IBM/db2/V8.1/instance/db2iutil/db2icrt -a SERVER -s client appuser
DBI1069E Unexpected error. Function = chk_fsystype, Return code = 
          22.  

It seems to be the version of tail issue, you need to change this script:
/opt/IBM/db2/V8.1/instance/db2iutil/db2iutil
global search for "tail +2", change it to "tail -n +2"

[root@hostname]# ./db2icrt -a SERVER -s client appuser
DBI1070I Program db2icrt completed successfully.  


Reference
http://oss.sgi.com/LDP/HOWTO/DB2-HOWTO/db2instance.html

Saturday, February 6, 2010

Subversion userid case-sensitivie validation for Active Directory

Subversion's user authentication is case sensitive for both userid and password.  While this is the standard in the *nix world, unfortunately Windows users tend to put their userid in whatever case they feel like.  I couldn't find a configuration option for this in Subversion, also no luck from the net...  So I went into the source code and did a quick & dirty workaround since all our users are validating their accounts against Windows Active Directory which is case-insensitive for their userid.

replace strcmp with strcasecmp in the following two lines.  This is for Subverison 1.4.0.  Just search for strcmp in the same file for newer version.

./subversion/libsvn_repos/authz.c

line 156:       else if (strcasecmp(user, group_user) == 0)
line 189:       else if (strcasecmp(name, b->user) != 0)

Monday, January 18, 2010

compiling tesseract for Linux 32-bit

compiling tesseract for Linux 32-bit under a 64-bit Linux environment wasn't the most straight forward thing... even with -m32 flag set for gcc flags,it failed during linking:

ld -r -o libtesseract_full.o tesseractfull.o \
    libtesseract_main.a \
    ../textord/libtesseract_textord.a \
    ../pageseg/libtesseract_pageseg.a \
    ../wordrec/libtesseract_wordrec.a \
    ../classify/libtesseract_classify.a \
    ../dict/libtesseract_dict.a \
    ../viewer/libtesseract_viewer.a \
    ../image/libtesseract_image.a \
    ../cutil/libtesseract_cutil.a \
    ../ccstruct/libtesseract_ccstruct.a \
    ../ccutil/libtesseract_ccutil.a
ld: Relocatable linking with relocations from format elf32-i386 (tesseractfull.o) to format elf64-x86-64 (libtesseract_full.o) is not supported
make[3]: *** [libtesseract_full.o] Error 1


setting -m32 for LDFLAGS didn't do the trick, ld likes this flag better "-melf_i386", but setting this in LDFLAGS would cause tesseract fail when running configure
I had to manually go under ccmain do the following with -melf_i386:
tesseract-2.03]$ cd ccmain
ccmain]$ ld -r -o libtesseract_full.o tesseractfull.o \
     libtesseract_main.a \
     ../textord/libtesseract_textord.a \
     ../pageseg/libtesseract_pageseg.a \
     ../wordrec/libtesseract_wordrec.a \
     ../classify/libtesseract_classify.a \
     ../dict/libtesseract_dict.a \
     ../viewer/libtesseract_viewer.a \
     ../image/libtesseract_image.a \
     ../cutil/libtesseract_cutil.a \
     ../ccstruct/libtesseract_ccstruct.a \

     ../ccutil/libtesseract_ccutil.a -melf_i386

after that go back one level up and run make ; make install again.
cd ..
make