Monthly Archives: March 2007

Vim Copying Issues

I came across an interesting issue today – I opened a file in Vim, and yanked (copied) around 140 lines. Then I opened up another file and pasted those lines – however I only ended up with 49 lines!

This caused me a lot of annoyance, until I finally found the fix – in the Vim configuration file, there was the following lines:

set viminfo='20,\"50    " read/write a .viminfo file, don't store more than
                        " 50 lines of registers

The 50 tells Vim not to store any more than 50 lines of data in the copy buffer. Boost that up to whatever you like, and that solves the limitation. :-)

For reference the system-wide configuration file should be in one of the following locations (depending on your distribution):

/etc/vimrc
/etc/vim/vimrc

Or you can create a local configuration file at:

~/.vim

Evolution Broken on Ubuntu 6.06

So I had just sat down at my computer, with pizza, ready to relax, and clicked on Evolution expecting to read my email…. but alas, it fails to start. :-(

After running it from the CLI, I got the error:
(evolution-2.6:9203): camel-WARNING **: Failed to initialize NSS

And then evolution just quits. :-(

The Workaround
Undoubtably Ubuntu will release a fix for this ASAP. But for those of you who can’t go 5mins without email, here’s a workaround (in newbie-compatible instructions):

Open a terminal (Applications->Accessories->Terminal).

Type the command: (press enter at the end of it)
LD_LIBRARY_PATH=/usr/lib/firefox evolution

This will start evolution. Keep the terminal window open in the background – if you close it, it will close evolution. Just use this workaround until an update is released to fix this. :-)

WTF is happening?
For the technical readers, here’s what’s happening:

This problem is caused by the upgrade of firefox just recently (upgrade to 1.5.dfsg+1.5.0.10-0ubuntu0.6.06.1), and the problem is that the location of the NSS libraries have moved from /usr/lib to /usr/lib/firefox. Evolution requires the NSS libraries to provide support for SSL and other encryption technologies.

Here’s the bug entry from Ubuntu for this problem.

The command “LD_LIBRARY_PATH=/usr/lib/firefox evolution” works by tells evolution to look in the /usr/lib/firefox directory for the dynamic NSS libraries.

Today’s technical lesson
In case you are interested, LD_LIBRARY_PATH is an environmental variable that tells programs where to look for dynamic libraries. It can be configured in /etc/ld.so.conf. By default, it looks in /lib and /usr/lib. Many distros also specify /usr/local/lib. (Interestingly, I just checked, and it doesn’t appear that Ubuntu has this file created by default).

After making a change in it, you can run ‘ldconfig’ to update the library cache based on the new settings.