Sep 27

Looks like the Google Street-View guy is spreading some cheer on Google’s 10th birthday!

Google Street-View guy is spreading some cheer

Google Street-View guy spotted with party hat and balloons!

Happy 10th, Google!

Aug 24

Lately, I have developed a liking for the Alpine Messaging System. It is a text based email client that runs on a variety of platforms. I use it with Gmail IMAP at home and MS Exchange at work. In both cases, it works beautifully.

Pre-compiled binaries for a good number of platforms are available on the apline website. But if you are not in a position to use the pre-compiled binaries - say because you do not have root privileges, or binary is not available for your platform, or may be you just
want to use the bleeding edge development code - you can build the alpine application from source. The following steps are specific to building the latest SVN snapshot on Ubuntu Hardy Heron. It may/may not work on other OSes.

Prepare your system

Get all the (known) prerequisites. From my experience, these are required:

  • libncurses5-dev to get rid of the following error:

configure: error: Terminfo/termcap not found

  • libpam0g-dev and libssl-dev to get rid of some SSL related errors.

To get the above use the following in terminal:

  % sudo apt-get install subversion libncurses5-dev \
                         libpam0g-dev libssl-dev

Get the source code

Get the latest source snapshot. Following few steps are one time. After the initial snapshot is acquired with svn checkout, svn update can be used to update the source snapshot:

  % mkdir ..../alpine
  % cd ..../alpine
  % svn checkout \
        https://svn.cac.washington.edu/public/alpine/snapshots/

Accept the certificate (permanently) if required.

Configure, compile and install

Now use the familiar configure, make, make install routine to build and install Alpine.

  % cd .../alpine/snapshots
  % svn update
  % ./configure --prefix=/opt/apps/alpine
                --with-local-password-cache-method
  % make
  % sudo make install

I was overly optimistic in using --with-local-password-cache-method. I was hoping that Alpine would store my account passwords in Gnome Keyring! It did not work quite like that. I need to enter my email passwords every time I start Alpine.

Other way to automate password entry is to use the --with-passfile configure option. But it is known to be unsafe.

Happy messaging!

EDIT: Trying to recompile alpine on Intrepid, I discovered that libssl-dev is also required.

Aug 23

I have been using Tomboy Notes on my Linux machines for more than a couple of years now. Needless to say, I often wished that notes on the other computer were also accessible to be on the one I am working on, at that moment. I was aware that it has a Synchronization option - using WebDAV. But, a few times I tried it, I was not successful at getting that to work.

Few days back, I had some success using non-Mozilla server with Weave. In the process, I got a WebDAV account at mydisk.se. Now that I had a WebDAV account, I thought I’d give Tomboy Synchronization another shot.

I built Tomboy from the latest svn source. This was easy, thanks to very clear instructions on the Tomboy Wiki.

  % cd /my/source/directory
  % svn co http://svn.gnome.org/svn/tomboy/trunk tomboy
  % cd tomboy
  % ./autogen.sh --prefix=/opt/apps/tomboy \
                 --disable-scrollkeeper
  % make
  % make install

On the first synchronization attempt, I got an error indicating that fuse/wdfs was not installed. To fulfill this dependency, I did the following:

  % cd /my/source/directory
  % wget http://noedler.de/projekte/wdfs/wdfs-1.4.2.tar.gz
  % tar xzvf wdfs-1.4.2.tar.gz
  % cd wdfs-1.4.2
  % ./configure
  % make
  % sudo make install

To get wdfs installed, I had to install the glib2.0 development modules:

  % sudo apt-get install libgtk2.0-dev

With this, I was all set for the first sync. However, due to a bug, that was not quite possible. But since I had the source, and bug report has the fix, I tried it out. I built Tomboy again, with the suggested fix. It worked! I have that build available in the downloads section for trying out.

A little work, and now my Linux machines have access to all my notes and stickies! I haven’t found a Mac app that has WebDAV synchronization of notes. If there is one, I’d love to try it out. The stickies utility in Mac OS X could really use some synchronization feature - not via .me.

I use Google Notebook a lot too. So some of the Ideas for new plugins sound interesting!

Aug 11

If you use Weave, you’ve probably noticed that Mozilla servers are currently overloaded. Accounts are not working. My account authenticates (If I access

https://services.mozilla.com/user/<user_name>/

it asks for and accepts my credentials), but I get a “Not Found” 404 error. The accounts that do work, are very slow.

Like always, I went forumming, trying to get to the bottom of this trouble. I came across some helpful posts at the Weave forums. Posts from covidium and netoak are especially useful. This post is just a compilation of steps I followed to get my Weave working again.

Get a WebDAV host
I guess there are only a handful of these, that are free. I tried to find one in the US, but couldn’t. I just used the one that covidium suggested. I opened a free account at myDisk.se.

Create directory structure
Weave expects the files to be in a specific directory structure. If you have myserver.com as your server, it will look for

myserver.com/user/user_name

To cater to this, I created a directory called user, then inside it, I created one called user_name.

In retrospect, I should have instead made

weave/user/user_name

directory structure. That would keep everything Weave together.

Set Weave’s Server Settings
Open Weave’s Server Settings (Tools -> Weave -> Preferences…) and then go to the Advanced tab. Replace the default Server Location with

https://mydisk.se/user_name/

mydisk makes my files available at https://mydisk.se/user_name/, other hosts may use some other path.

If I had used

weave/user/user_name

directory structure, I would set the Server Location to

https://mydisk.se/user_name/weave/

Try Weave again
In Weave preferences’ Advanced tab, click on the Advanced… button. Click on Reset Login and Reset Server Lock buttons. I did not think it would be required, but I had to quit Firefox and restart it.

Now, sign in to Weave again (Tools -> Weave -> Sign In). Follow the setup wizard as if you are opening a new account. Use username and password from your WebDAV server. Pick a strong passphrase.

At this point, you should be all set.

Do leave feedback to point out errors in the above process, so other readers can benefit too.

My current web host does not provide WebDAV. From what I read, DreamHost does. I wonder if Weave users who have DreamHost accounts already host their own Weave servers.

Jul 10

It bugged that over the past few days, I was seeing different Google News at work and a different looking one at home. An entry on the Google News blog explained why:

Google News Blog: Testing… testing… is this on?:

… They’ll only be visible to a small number of random Google News readers. (In case you’re wondering, experiments are selected randomly, so we can’t give you any advice for how to get in!)…

Although, what is selected randomly? Username? IP address?

Jun 17

Since its Alphas, I’ve been comparing font rendering in official Firefox 3.0 Linux builds and the ones I used to compile myself. Fonts in the official builds were, and still are, very crudely rendered. Upon reading a little, I learned that this difference is due to the use of different version of Cairo, a graphics library that Firefox uses under the hood.

Using --enable-system-cairo option when building Firefox greatly improves the look of fonts. I used to compile my own nightly builds using this option, hoping that the official builds will move to using that option too, before the final 3.0 release.

I just tried the final release and found that it still does not use --enable-system-cairo option, and the fonts are still not neat.

Thankfully, I also noticed that Ubuntu’s Firefox 3.0 - that got updated today as well, does use --enable-system-cairo option. Now I don’t have to compile my own builds. I wish I had noticed this the first time I installed Hardy - the Firefox 3.0 beta that came with it probably used system Cairo too. But I am glad I noticed this, better late than never.

Here are a couple of screenshots that illustrate the difference:

Firefox fonts with and without system cairo - Click for full size

Click on the image to view full size - The one on top is the Ubuntu build, using --enable-system-cairo option. The one a the bottom is the official Firefox build, not using that option. Notice how the fonts in the Ubuntu build are so much better than the fonts in the official Firefox build

Now, go download Firefox 3.0 while it’s hot. You don’t get to set a world record everyday!

Jun 11

Its official, Firefox 3.0 will be released on June 17th, 2008.

Join more than a million others by pledging to download Firefox 3.0 on the day of release. Celebrate the Download Day by setting a world record. Click on the image below:

Download Day

To see what to expect from the new version of Firefox, watch this screencast.

Cheers!

UPDATE (06/12/2008):

There’s an excellent post on dria.org that lists the new features in Firefox 3.0, it is called Field Guide to Firefox 3.

Apr 23

Just over a year ago, I spilled coffee on my keyboard at work. Almost entire left side of the keyboard was ruined. The buttons had become sticky from the mocha and were acting stubborn. I replaced it with a new ergonomic keyboard. Life was good.

In the meanwhile, I built a cheap computer at home. Instead of buying a new keyboard, I decided to clean the coffee on my old keyboard at work and put it to use with my home computer. Most of the keys work fine after cleaning. I don’t end up using the keyboard at home as much as I do at work, so things are working pretty well.

That was until the past Monday. On Monday, I found that one - just one - key on the new (well, not so new anymore, but comparitively) keyboard at work is being insensitive. That key had to be the colon (:) key! As a Vim user, that spells trouble.

I am OK using the almost 50% ruined keyboard at home. But using an otherwise perfect keyboard with just an insesitive colon is proving to be a big pain in the… oh boy… no pun intended what-so-ever!

But then again, at least it is not the <ESC> key!

Apr 15

There’s been a lot of people on the blogosphere reporting shell history. The idea is to know what kind of commands different people use on their shell - kinda geeky, but none the less. Here’s the command most are using:

  history|awk '{a[$2]++ } END{for(i in a){print a[i] " " i}}'|sort -rn|head

A Perl enthusiast that I am, I started out to do the same in Perl instead of awk. I started writing a script hotlist that will get the shell history, count unique commands and sort them in descending order of the count. Seems very straightforward. Turns out, its only straightforward - without the very.

Since history is a built-in shell command, it cannot called it with the qx// or back-tick (``) syntax of Perl to fetch shell history. I resorted to Google to find a solution, but could not find one easily. After some help from clpm, I came up with this:

#!/usr/bin/perl

use strict;
use warnings;

my %hist = ();
my @hist;

$hist{(split /\s+/)[3]}++
  foreach ((-p STDIN) ? <STDIN> : `$ENV{'SHELL'} -c history`);

print map {"$hist{$_} : $_\n"}
        sort {$hist{$b} <=> $hist{$a}}
          keys %hist;

To use shell’s built-in commands, you must invoke the shell and have it execute the built-in command. In the above script, that is done with `$ENV{'SHELL'} -c history`, which in my case expands to `/usr/local/bin/tcsh -c history` since I use t-shell. The shell can be invoked by qx// or back-tick (``) to collect the output.

You can use this script in two flavors:

  % hotlist
  % history | hotlist

The first flavor starts a new shell and calls the history command in it. So you get the information from saved shell history. It does not contain commands form the active shell. If you want to include the active shell too, use the second flavor. Where you pipe the current shell’s history into the script.

Hopefully, this will help the next person who wants to use shell built-in commands in Perl. Like I said, I am a Perl enthusiast, not an expert, so this may not be the best solution.

I am sure some Perl guru will manage to cram all that in a one-liner, but that was not my intent.

Apr 13

This is very impressive. With Vimpress, you can publish/edit WordPress blog posts from within Vim, like I am doing now. It works great too. This brings together my favorite editor and my favorite blogging platform… Its been around for a while, I only found out today!

UPDATE:

I did find that the plugin does not play well in Vim compiled with python disabled. Vim throws a lot of errors when loading the vimpress plugin (blog.vim file). Adding the following lines before the command! lines in blog.vim addresses this:

if !has("python")
  finish
endif

Cheers!