Sunday, December 26, 2010

Easy mechanism to record new routes in to Google Map

I was looking for an easy mechanism to record new routes in to Google Maps. I think I found a one. My Tracks for Android.

This can be downloaded from Android Marketplace. Search for "mytracks". When you have taken a route which is not on Google Maps the application can be used to record the route you are travelling. Then it can be published via Google My Maps.

Saturday, October 30, 2010

Recovering an unmountable partition from Linux

If your computer suddenly get switched off during the system boot up you may end up having unmountable partitions. This could happen to a laptop/netbook with very low battery or in this part of the world to a desktop without an UPS.

So this happen to my wife's netbook and I felt it will be useful for someone else to know the steps I have taken to recover it. In this case it was the root partition and system couldn't go beyond grub.

Since the system is unable to proceed beyond grub, I have to use a bootable usb-stick. In my case Kubuntu but this should be possible with any Linux distribution.

First I tried running e2fsck to repair the file system. Got in to root by 'sudo su'.

# e2fsck /dev/sda1

It refused to run stating "Device or resource busy while trying to open /dev/sda. Filesystem mounted or opened exclusively by another program?".

-f option won't help here since it cannot open the device. -F option simply freezes the command and I have to restart the system (kill didn't work).

# e2fsck /dev/sda2

did work. I was happy since it is '/home' so her data can be saved. So I immediately took a backup of the entire home directory to an external drive.

Then I though of using a very powerful Unix command 'dd'. It can do low level (byte level) read from a device or file and write to a device or file.

# dd if=/dev/sda1 of=/media/disk/sda1.img

This command creates an image of the partition sda1 as a file named 'sda1.img'. 'e2fsck' can be run on this image and correct errors.

# e2fsck -f /media/disk/sda1.img

This image can be mounted as a loop device. I created a directory in the 'media' directory as 'sda1-img' (Mount point, this could be anywhere any name you like) and mount the image as below.

# mount -o loop /media/disk/sda1.img /media/sda1-img

Now via '/media/sda1-img' the backup image of the partition sda1 can be browse. At this point if any files need to be backed up, that can be done. For example if the home directory is also in this partition I should have taken a backup of that. However, in my case the home directory is in sda2 and I have taken a backup of that.

At this point I have an image of sda1 without any errors and the file system in it can be accessed. So I wrote the image back in to sda1 using 'dd'.

# dd if=/media/disk/sda1.img of=/dev/sda1

At the end I got an error message stating it cannot write the last block. This could be due to a modification done by e2fsck to the file system in the image. I just ignored it since sda1 was never full.

Then I tried accessing it through the file manager (Dolphin). YES, it got mounted and I can access the files. Then I unmount it again through the file manager. I could have done this through the command line as well. I don't think that could have made any difference.

Just to be safe (since I got a dd error) I ran e2fsck on sda1.

# e2fsck -f /dev/sda1

It said that the file system is clean.

Shutdown the machine, remove the usb-stick, and boot the machine. It works fine now!

Thursday, July 22, 2010

Zimbra Calendar Synch for Android

Last week I bought a hTC phone with Google Android. One thing I really like is, now my Mobile OS is independent of the Hardware device. Set it up to sync with my email and social media (Facebook, twitter, Flickr, etc). Only issue was my office calendar integration since Google calendar doesn't support accepting secure certificates from certificate providers other than those international big ones. Hope Google will facilitate this soon. However, I found a solution.

Search for CalDav in the Google market place from your android phone. Install the application and configure it to access CalDav Calendar of Zimbra. Usually its in a URL, https://mailserver/dav/username/Calendar. In order to accept the secure certificate of your provider, go to the menu option "more" "Advance Settings". Go to "Advanced Connection Settings" and enable "Accept SSL Certificates from untrusted sources". Now get back to the main menu and click "Synchronize Now". You will see your office schedule reflected in the Android Calendar App.

One more thing I discovered is that you get an option to switch the on-screen keyboard by holding the finger couple of seconds on an edit field. Of course that is provided you have multiple keyboards installed.

Tuesday, June 22, 2010

Generation Baby Boom, X, Y, and Social Media

Facebook, which started in February 2004 claims to has more than 400 million active users world wide now. Flickr, which started in February 2004 claims to host more than 4 billion images now. YouTube, which started in February 2005 claims to serve more than two billion videos a day now. Twitter, which started in 2006 claims to has more than 100 million users world wide now.

All these cool applications now allow us to keep a close relationship with our relatives, friends, find friends who we haven't met for years, find new friend world wide, get to know about exiting things, get to know about important things, etc all on-line. Some times you may find your next door neighbor on Facebook who you may have never met in person before :). Also I found some people who are running business completely based on this new paradigm (

It is very evident that these technology innovation are causing a major tremble effect on every one. While some has seen the potential and using it to create opportunities, some has take this by surprise and treat it as a threat. There are organizations who has blocked access to these social media sites to the staff.

While thinking through this I come to think of, how each generation has taken this up. Generation Z who have born in to this finds all these very natural. Generation Y are the ones mostly coming up with all these innovations and they demonstrates really good ability to adopt new things. Generation X who appreciates all these new innovations from generation Y mostly facilitate all these and they demonstrates good maturity in empathizing the situation. Generation Baby Boom are the ones who are mostly struggling and culturally shaken. Some of them has taken these as a threat and really struggling to empathize the next generation.

I think the issue here is that the whole world his going through some rapid generation changes and its accelerating. There could be a time in the future even generation X will find it difficult to cope up with these changes. Since typical leaders in the society are from older generations this issue could continue to exist. Then, could there be a danger of an electronic civil unrest?

Friday, February 26, 2010

Meaning of "Public Information" with Google and Social Media

Most of the legislations consider birth certificate as a public document. But will you be comfortable if it is publish on the internet? Having your email publicly available also is now becoming an issue due to spammers. This is a good eye opener for some facebook users.

So it may be worth starting a discussion on this topic now to bring in more disciplinary guidelines in to internet applications.

Thursday, February 25, 2010

OpenOffice Sinhala: Interface Issue on Kubuntu => Workaround

I installed the Sinhala pack for OpenOffice 3.2 on Kubuntu 9.10 and switch my interface to Sinhala. But I found that it is not rendering Sinhala properly. Looks like in some places it just uses the system default font instead of the Sinhala font.

There is a font replacement feature available in OpenOffice which can be used as a workaround until developers fix the issue.

Go to Tools(මෙවලම්)=>Options(විකල්ප) and select Fonts(අකුරු) under

Enable "Apply replacement table (ප්‍රතිස්ථාපන වගුව ඇතුළත් කරන්න)", select your system font under "Font (අකුරු)" and select LKLUG or your preferred Sinhala font as the "Replace with (සමග ප්‍රතිස්ථාපනය)" font. Then select "Always (සැමවිටම)". Now click OK (හරි) and you should get the OpenOffice Sinhala interface beautifully rendered.

You can find your system font from System Setting panel.

Thursday, February 11, 2010

BandLuxe C120 on Kubuntu 9.10

Getting multi-mode usb modems working on Linux is still a challenge. After reading many articles in the internet, I manage to get BandLuxe C120 HSDPA modem working on Kubuntu 9.10. This should work on Ubuntu as well.

This blog entry actually provide me with all the information.

The installer for Linux is available at;

Use the Eee PC driver not the Linux driver.

However, I couldn't use the option.ko in the package since the kernel version is different. I tried with the options.ko which comes with Kubuntu 9.10 and it did work for me :).

Here is the modified installation script which you can use, such that the installer will not override the original option.ko driver. So we only use the udev rules which will stop mounting this device a storage device and only use it as a usb modem.


MODDIR=/lib/modules/`uname -r`

echo "Backup file modules.alias"
cp -v ${MODDIR}/modules.alias ./modules-original.alias
echo "Patching file modules.alias"
sed -f vidpid.sed ./modules-original.alias > ${MODDIR}/modules.alias

echo "Unload the kernel module"
/sbin/rmmod option

echo "Rules for auto switch from CDROM to Modem"
cp -vf 10-bandluxe.rules /etc/udev/rules.d/10-bandluxe.rules

mkdir -p /usr/share/hal/fdi/preprobe/20thirdparty/
cp -vf bandluxe.fdi /usr/share/hal/fdi/preprobe/20thirdparty/bandluxe.fdi


Good luck!

Friday, January 22, 2010

Government service delivery with ICT

An example of how information and communication technology can be used to deliver efficient government services.

Monday, January 11, 2010

Kubuntu - Dolphin Search

If you want to get search feature in Dolphin working you need to have the desktop search enabled in Kubuntu. Dolphin is the file manager comes with Kubuntu. However, if you try the search without the desktop search feature enable, you will simply get an error message which doesn't give you any clue as to what went wrong. I have file a bug highlighting this.

Until the developers fix this, I thought of educating others as to how to get it working, hence the blog. Go to system settings, click the advanced tab and then you will find the desktop search feature there. Please see the below image.

Go in to desktop search and enable Nepomuk Semantic Desktop and Strigi Desktop File Indexer.