August 7th, 2010 | Tags:

Here’s how to disable the annoying Update Manager pop-up (technically a “pop-under”) and instead have the update icon displayed in the notification area.

  1. Hit Alt-F2 to open the “Run Application” dialog.
  2. Type in gconf-editor to run the GNOME Configuration Editor.
  3. Navigate to Apps > Update Notifier.
  4. Untick the auto_launch checkbox.

August 5th, 2010 | Tags: , , ,

This post is an update on integrating Thunderbird with Ubuntu’s notification system. For Ubuntu 10.04 Lucid Lynx it supersedes my earlier post on the topic which was applicable previous versions of Ubuntu (Jaunty and Karmic).

The big difference in Lucid Lynx is the Indicator Applet and the “Me Menu”, both of these incorporating features related to the “social from the start” marketing tagline. In particular, the Indicator Applet integrates with Evolution, Ubuntu’s default mail client, to show new email notifications and allow quick access to the mail client. Once again, no out-of-the-box integration with Thunderbird. So the challenge is twofold: integrate with the notification mechanism (black pop-ups) as well as the Indicator Applet. The Mail Notification extension unfortunately falls short in the latter part.

Luckily, Ruben Verweij has developed libnotify-mozilla, a Thunderbird extension which works just great for both of the above requirements. Be sure to check out the blog (here and here) and the project’s Launchpad page to get the details and latest news. Here are the steps to set up the extension:

  1. Download the Mozilla Notifications Extensions .xpi file and save it in a temporary location on your system.
  2. Open Thunderbird and install the extension (Tools > Add-ons > Install).
  3. Disable the native Thunderbird notifications by unticking “When messages arrive: Show an alert” in Edit > Preferences.
  4. Install libnotify-bin package (execute in Terminal):

    sudo apt-get install libnotify-bin

  5. In order to have Thunderbird entry in the menu even when it is not running. First create a new file as follows (run from Terminal):

    mkdir -p ~/.config/indicators/messages/applications
    gksudo gedit ~/.config/indicators/messages/applications/thunderbird

  6. Then paste the following text in the file and save it:

    /usr/share/applications/thunderbird.desktop

  7. (optional) If you wish you can remove the Evolution entries from the indicator menu. Note: because of bug 533021, this is a workaround which will remove Evolution from the menu for all users on the system, not just yourself.

    mkdir -p ~/.config/indicators/messages/applications-blacklist
    sudo mv /usr/share/indicators/messages/applications/evolution ~/.config/indicators/messages/applications-blacklist


    (Once the above bug is resolved in the future, move the file back to its original location and create a softlink to it from the blacklist directory: ln -s /usr/share/indicators/messages/applications/evolution ~/.config/indicators/messages/applications-blacklist/evolution)

  8. Log out from your user session and back in.
August 3rd, 2010 | Tags:

Outline fast view with Sripts item expandedThe ability to add custom scripts to report elements is a very powerful feature of BIRT. It allows the report developer to modify or override the default behaviour of the element; this blog features many examples of when this might be useful. However, as the number of scripts in a report increases, the report becomes harder and harder to maintain.

The Layout view or the Property Editor window do not indicate whether and what scripts exist on a particular element, and so it would seem the only way to check is to select the element and switch to the Script tab and look through the methods. Of course this would be incredibly tedious and impractical in a complex report.

Luckily, the Outline fast view has a Scripts item tucked away at the bottom of the list. When expanded, this shows all items in the report which contain custom scripts (expanding the item shows the overridden methods). Right-click brings up an option to go to the report element in the report Layout, and thus actually figure out which item it is referring to.

The deeper lesson is that one should use scripts only when necessary and if there is no other way to implement the required functionality. And of course thorough documentation also helps with maintenance…

August 2nd, 2010 | Tags:

The technique for alternate row styling described in a previous post is applicable for tables with detail rows (a detail row in a table corresponds to a row in the bound data set). However, it is often the case that the table does not contain any detail rows at all and instead displays only aggregated data, i.e. header or footer rows of a group.

In such scenario the row.__rownum value cannot be used, because __rownum is incremented for each row in the data set, meaning its value will depend on how many rows are being aggregated into the summary row.

Instead, the highlight logic can be defined using a variable incremented on each summary row.

  1. First, initialize the variable. This can be done e.g. in the onCreate method of a label in the static column header.

    reportContext.setPersistentGlobalVariable( "aggRowNum", "0" );

  2. In an object on the summary row (either a label, aggreation or the row itself) the following code is placed in the onCreate method to increment the value of the variable (the funny stuff is to force explicit conversion between string and number and back):

    var n = reportContext.getPersistentGlobalVariable( "aggRowNum" );
    n = (n*1) + 1;
    reportContext.setPersistentGlobalVariable( "aggRowNum", "" + n );

  3. Finally, the highlight property of the row is set as follows:

    reportContext.getPersistentGlobalVariable( "aggRowNum" ) % 2; | equal to | 1

July 31st, 2010 | Tags:

Password proliferation is a serious problem on the web today. Most websites require users to register and create a username/password combination for future authentication. Unfortunately not many websites support reusable logins such as OpenID.

The main problem is that of human memory. It is of course not reasonable to expect the user to remember 100+ unique passwords. In most cases, the end result is that users will reuse the same password for multiple sites and systems. The issues with this are obvious: if a malicious third party gets hold of one password, it compromises all where the password was used; also, by piecing together the other bits of data entered at registration (such as date of birth, gender, physical address, mother’s maiden name etc.) for different sites, the attacker might be able to create a very accurate profile which could then be used to gain access to even those systems where a different password was used.

That’s why I use a password management program, in particular KeePass/KeePassX. It allows one to securely store credentials and is itself protected by strong encryption and can only be accessed using a password. In reality one finds that on a daily basis it is sufficient to remember 5-10 most frequently used passwords (computer login, email, Google, social network, internet banking and of course the password manager itself) and the rest can be referred to from KeePass. The program has a feature to generate random passwords, which is ideal to have strong passwords for infrequently accessed systems where one might not even realise the account was hacked for a long period of time. KeePass can even be installed in portable mode, which means you can carry the program and your encrypted passwords file on a USB stick.

I found that KeePass (version 1 for Windows) and KeePassX (Linux and Mac) suit my needs perfectly. There is also a version for Android and iPhone (refer to the Wikipedia article). Best of all? It’s free software licensed under GPL.

May 19th, 2010 | Tags: , ,

As always after a kernel update, VMware Player 2.5.xx asks to be recompiled after upgrading to Ubuntu 10.04 (Lucid). However during the compilation I got errors about virtual network device, even after trying to recompile several times including from command line.

After struggling for some time, I thought I would check on the VMware website whether there is a new version of the software; and indeed VMware Player is now in version 3. After installing it (by downloading and running the .bundle file) everything works fine in Lucid. As a side note, the compilation dialogue does not come up and the look and feel of the Player is also quite different.

May 15th, 2010 | Tags: ,

Recently I discovered that by default Thunderbird accepts cookies from web content (version 3.0.4 in Ubuntu 10.04 Lucid). I am a bit baffled by what would be a valid use case for storing cookies in an email client, and so here are steps for disabling this option.

  1. Edit > Preferences.
  2. Select Security icon and “Web Content” tab.
  3. Untick “Accept cookies from sites”.
  4. While you’re there, also check “Show Cookies” and “Remove All Cookies” to get rid of whatever has been stored up until now.
May 15th, 2010 | Tags:

In order to show dates as yyyy-mm-dd instead of the default (for US locale) mm/dd/yyyy I use the following script to launch Thunderbird in Ubuntu (tested with Thunderbird 3.0.4 on Lucid):


#!/bin/sh
export LC_TIME=en_DK.utf8
[ "$LC_ALL" != "$LC_TIME" ] && unset LC_ALL
exec thunderbird "$@"

This handy tip comes from mozillaZine.

April 11th, 2010 | Tags: ,

UPDATE: The issue has been fixed in a subsequent Ubuntu system update, so there should be no reason to go through the steps below if your system is up-to-date.

After a recent system update in Ubuntu 9.10 (Karmic) I started getting an error message in Thunderbird starting with “Could not initialize the browser’s security component”. Among other things, this means that Hotmail integration with Thunderbird no longer works.

Thunderbird error message

The error dialog itself has a few suggestions, however none of these fixes the issue.

Luckily the solution can be found on Ubuntu forums and is very straightforward. All that is required is to remove the package “libnss3-0d”. This can be achieved from Synaptic (System > Administration > Synaptic Package Manager) or from the command line:

sudo apt-get remove libnss3-0d

Here is the link to the original post on Ubuntu forums and the corresponding bug on Launchpad.

March 30th, 2010 | Tags: ,

Microsoft Outlook allows saving of contact in vCard format (vcf) only one at a time through the Save As… dialog. The Import and Export menu options do not provide the ability to export all contacts as vCard. Obviously with a large address book it would be very impractical to go through the contacts and save them one by one. Luckily it’s not too difficult to script this functionality through a macro. The quick-and-dirty macro below does just that. Note that the script considers the “current” folder, i.e. you need to be in the Contacts folder you want to export when executing the macro.


Sub save_as_vcf()
  Dim i, ncount As Integer
  Dim fullname As String
  Set ofolder = Application.ActiveExplorer.CurrentFolder
  Set oitems = ofolder.Items
  ncount = oitems.Count
  MsgBox "Count is " & ncount
  For i = 1 To ncount
    Set oitem = oitems.Item(i)
    fullname = oitem.fullname
    oitem.SaveAs "D:Export" & fullname & ".vcf", olVCard
  Next
  MsgBox "Done"
End Sub