October 15, 2008

Ubuntu Intrepid upgrade problems solved

Oct 15, 2008

I recently upgraded two of my computers to Ubuntu 8.10 (Intrepid) which was in alpha at that time and is beta at present. Some small thing always seems to break for me with an upgrade and this time there were two issues, which I have finally managed to sort out this week.

1. Google calendar in Thunderbird

I had my google calendar nicely set up in Thunderbird using the Lightning and Provider for Google calendar extensions. After the upgrade, my google calendar wasn't displaying anymore and moreover all the calendar related menu items were disabled. Finally I found the answer here.
I uninstalled lightning and provider, did a 'sudo aptitude install libstdc++5', then reinstalled the extensions. On restarting thunderbird, the calendar was now there as before.. a relief.

2. Fingerprint reader and thinkfinger

After the upgrade, my fingerprint reader appeared to not be working. Swiping the finger elicited no response at all. Searching in launchpad brought me here showing others were having the same issue. Surprisingly it seemed that the fingerprint identification was working, but needed a carriage return (Enter key) after the swipe to work. Some workarounds are beginning to appear (though nothing final) and what worked for me was a simple change in xorg.conf. Adding the line
'InputDevice "Generic Keyboard"' to the "ServerLayout" section got the reader working again after a restart of xserver.

Hope these help someone with simlar issues.

October 4, 2008

Eepee - the electrophysiologist's tool

04 Oct 2008
Eepee is my attempt to make a tool for cardiologists to analyze ECG and Electrophysiology tracings.


The study of these tracings requires one to make various measurements and compare them. While this is available along with the acquisition software in the lab, review of these tracings for teaching or learning is usually done with printed / scanned tracings without an easy way to dynamically measure things. The usual approach is to use project a series of these tracings on powerpoint, while any measurements have to be made on a paper copy with hand-held calipers.

Eepee is an attempt to smoothly provide all this functionality with digital images. At its current state (version 0.9), the user can load any digital image, calibrate the x-axis with known measurement in the image and then use digital calipers to make measurements. Notes can also be made for any image. Notes and calibration are automatically stored for each image and are reloaded the next time.

It is still not past version 1.0 meaning that it is beta, but it is getting relatively complete and stable. It works on windows and linux and can be got here. I welcome any suggestions / comments.

August 3, 2008

Worth a thousand words !

Reading a mail from a couple of friends who have been on a long trip gave me an idea. For someone geographically dyslexic like me, a map to show the places visited is essential. And more pictures to illustrate the text will not hurt. Like Alice said, what good is a story without pictures?

Why not write some code that will draw a map, plotting the places visited and then pull out some pictures from flickr tagged with the place name? With all the pictures, now it will be easy to make an illustrated travel journal in html or pdf (with latex).

Python as always made the task amazingly easy. Python's 'battery power' was in full display as I was able to use diverse libraries to do all the stuff. Google maps provided me with the latitude and longitude of each place through geopy, a geocoding toolbox for python. Then, the basemap toolkit of matplotlib allowed me to plot these coordinates on a map. For each place, I searched flickr for most interesting pictures tagged with the place name and then made a photosheet with 8 of the pictures. I used flickrpy to access the flickr API and then used PIL (Python Imaging Library) to combine the pictures.

Those interested can download the code here and look at it. Map is a class that draws a map with a list of places like this -


The class PhotoSheet pulls in the pictures from flickr and makes a sheet like this (for Istanbul).

June 16, 2008

Gmail notifier for dzen - updated

I have an updated gmail notifier script for dzen. You can download the files from here. The username and password are now arguments that are supplied to the script. An icon is also displayed with the icon being different for no mail versus new mail. Note that you need the development version of dzen for all of this to work.

April 29, 2008

A first look at Kubuntu KDE4

While I have tried out KDE in the past, Gnome has always been my everyday working environment. Kubuntu Hardy KDE4 version was an opportunity to test if KDE4 was going to change that.
I installed Kubuntu KDE4 on my Thinkpad. KDE4 does look nice with a Mac like feel. But it felt sometimes like there is too much accent on looks. This is the default desktop with a couple of widgets.


Dolphin looks much better than konqueror as the file browser.


One application that really grabbed my attention was Okular. It looked really nice and was very functional too. The ability to use a highlighter in PDF documents was something I have been looking for. This is one application I might want to install in my Gnome environment too.


At the end of the day, KDE4 still failed to impress. It still looks far too incomplete and is definitely not going to replace Gnome on my desktop in the near future.

March 15, 2008

Ubuntu Hardy on Thinkpad x61s

Update:
The brightness hot keys problem referred to below is fixed in kernel 2.6.24.14 that is available now.

Installation:

New install using the PC desktop cd of Ubuntu Hardy alpha 6.
Since the X series thinkpads dont have an inbuilt optical drive I created a live USB from the iso using the isotostick script from here. Bootup into the live environment and installation from there was faster than I have ever experienced.

What works out of the box:
No installation issues.
Compiz-fusion runs beautifully.
Sound, wireless need no additional work, thanks to Intel.
Suspend and hibernate work out of the box!

Needed tweaking:
While the volume control keys work, the Fn-Home and Fn-End key combinations to change LCD screen brightness did not work. This is the bug reported in https://bugs.launchpad.net/ubuntu/+source/linux/+bug/198476 and as I mentioned there, the fix (temporary) reported in https://bugs.launchpad.net/ubuntu/+bug/172985 worked for me.

Setting up the fingerprint reader:
I got my thinkpad with the fingerprint reader, but the ease of setting it up was a pleasant surprise. Just followed the instructions here with the difference being that you dont need to add any additional repos - thinkfinger is added in the official Hardy repos.

Not working, could not fix:
Well, really nothing for now! I am happy I removed Vista (after just booting into it to update the bios drivers). After 30 mins of Vista, booting into Ubuntu seemed like moving a century into the future ! All developers associated with Ubuntu and linux can be proud of the work they have done and the product they have created. And of course, Thinkpads are made for Linux.. too bad they come with Vista pre-installed and Lenovo refused to sell me one with no OS or with an option to refuse the license and get a refund. But thats another story...

January 26, 2008

Wrapping workspaces in Gnome

One source of frustration sometimes with gnome is that there is no way to wrap workspaces like in KDE, compiz or even the other window managers like XFCE. This means that, if like me you use 'move to workspace right' and 'move to workspace left' frequently while working, it can frustrating not to be able to get back to workspace 1 from the last one in one simple step.

Searching for some way to do this, I came upon this post describing the use of wmctrl to do this. I had never heard of wmctrl before, but it turns out to be pretty cool. So go ahead, install it (sudo aptitude install wmctrl) and now -


raja@eee:~$ wmctrl -d
0 - DG: 800x480 VP: N/A WA: 0,2 800x476 Desk 1
1 - DG: 800x480 VP: N/A WA: 0,2 800x476 Desk 2
2 - DG: 800x480 VP: N/A WA: 0,2 800x476 Desk 3
3 * DG: 800x480 VP: 0,0 WA: 0,2 800x476 Desk 4

raja@eee:~$ wmctrl -s 1 && wmctrl -d
0 - DG: 800x480 VP: N/A WA: 0,2 800x476 Desk 1
1 * DG: 800x480 VP: 0,0 WA: 0,2 800x476 Desk 2
2 - DG: 800x480 VP: N/A WA: 0,2 800x476 Desk 3
3 - DG: 800x480 VP: N/A WA: 0,2 800x476 Desk 4



As we can see, 'wmctrl -d' lists the desktops and places an asterisk to indicate the current desktop. And 'wmctrl -s n' allows us to switch to the desktop n, with the desktops being numbered from 0 onwards.

With this knowledge, it is easy to write a couple of scripts to switch to the desktop on the left and the one on the right, with wrapping enabled.


#!/bin/bash

#ws_wrap_lt.sh

#get number of workspaces
ws=$(wmctrl -d | wc -l)

#current workspace index
cws=$(wmctrl -d | awk '/\*/ {print $1}')

#work space on left
lws=$(($cws-1))

#wrap if required
if [ $lws = -1 ]; then
lws=$(($ws-1))
fi
echo $lws

#change to next workspace
wmctrl -s $lws


and ..


#!/bin/bash

#ws_wrap_rt.sh

#get number of workspaces
ws=$(wmctrl -d | wc -l)

#current workspace index
cws=$(wmctrl -d | awk '/\*/ {print $1}')

#work space on right
rws=$(($cws+1))

#wrap if required
if [ $rws = $ws ]; then
rws=0
fi

#change to next workspace
wmctrl -s $rws


Save the files somewhere and now you can use gconf-editor to map commands to these scripts. Then you can set up a desired key or key combination to run these commands. An option is also to use only one of the scripts and rotate through the workspaces with one key. On the eeepc, I have mapped the 'menu' key to ws_wrap_rt.sh and use just that key to get to any workspace I want. If you use only two workspaces,one key works to toggle the workspaces.

January 14, 2008

Ubuntu on my eee

I bought an eeepc a couple of days back after my thinkpad was stolen. While it is considered to be a secondary computer at best, it seemed worthwhile trying it out. I think it was an unfortunate choice of linux distribution by asus and there was no way I was going to be stuck with xandros. So the decision was only between Ubuntu and Archlinux. I decided on the former because it seemed to be better documented on the eee and would take less time to set up (so I thought).

It was finally 4 hours before I had Ubuntu running. Briefly, what learned were -

1. Netboot does not work
Well, the eee can PXE boot once boot from lan is enabled in the bios, but the netboot image of either gutsy or feisty dont seem to have the modules for the ethernet card, so its a no-go after that.

2. Cannot find casper/.vml
If you followed the instructions here to make a bootable USB drive and get the error message 'cannot find casper/.vml' when trying to boot, just move vmlinuz and initd.img from the casper folder into the root directory of the usb drive and then modify the locations accordingly in syslinux.cfg.

3. Booting from the usb drive
I struggled a bit to boot from the usb drive - it wouldnt boot even after setting 'removable drive' as the first in boot order in the bios. It seems like the usb drive was being added as a second hard drive. The more reliable way to boot into the drive was to hold down the Esc key which offers a choice of devices to boot from.

4. Nothing older than gutsy
I had a gutsy beta iso already downloaded, so used it the first time. Which was unfortunate because it does not have the module for the ethernet and so I ended up without a working wired or wireless connection. Re-installing with the final gutsy iso solved the issue.

After all these unexpected difficulties, I finally had Ubuntu on the eee and spent the next day tweaking it. It boots in just under 40 seconds and seems to last about 2hrs30min on the battery.

All in all, it looks like a good deal!