Sunday, August 31, 2008

Received first donation!

One of my pet projects - KleanSweep - got a first PayPal donation! I've received a lot of positive feedback throughout past few years, but this is the first time someone decided to support my project by donation. This is very refreshing and encouraging. The donator comes from Netherlands and would like to be anonymous. Here is what he wrote to me - something that really stirred me:
"I think Linux users sometimes forget to make a small donation (if you can afford it of course) to people, like you, who make Linux possible. You put time and effort in it and we can use it, so for me it's normal to donate".

Thank you, the donator!

Wednesday, August 27, 2008

Must-have VIM plugins

A few cool vim plugins I use for programming:
  • Bufexplorer - nice buffer explorer
  • Taglist - source code browser for popular programming languages (C, C++, python...), similar to modern IDEs; relies on ctags.
  • A (a.vim, Alternate Files Quickly) - provides shortcuts for switching between source and header files quickly; supports C, C++, ADA95.
  • C (c.vim, C/C++ Support) - lots of helpers for C/C++ programmers: code snippets, common idioms (e.g. for loop, try ... catch blocks etc.) and more - all of that is customizable.
  • AutoClose - smart auto close for pair of characters - type "(" and it will automatically put ")" with cursor in-between; support quotes, brackets, square brackets as well as custom characters.
  • code_complete - one of my most recent findings - a real lifesaver; provides code snippets with ability to switch between parameters: type "for"< TAB >, and it will automatically insert "for" loop for you with placeholders for loop parameters; pressing < TAB > will move to next parameter. See screenshot. Snippets are fully customizable.
  • LustyExplorer - filesystem and buffer explorer; takes little space, has nice autocompletion and has one feature I like in particular: <Leader > lr opens the filesystem explorer at the directory of the current file. Really useful.
  • NERD Commenter - provides keystrokes for commenting out code for many filetypes. Supports tens of popular configuration files and programming languages.
  • NERD tree - another filesystem explorer
I consider some of them as a must-have vim companion: code_complete, AutoClose, A, LustyExplorer / Bufexplorer. Let me know if you think I missed a useful plugin!

Tuesday, August 12, 2008

Encrypted loop device on boot

There are a lot of tutorials on how to setup an encrypted LUKS home / root / swap partitions available, but I couldn't find any description about setting up an encrypted loop device on boot. It's easy to create an encrypted file and mount it manually, but I just couldn't find a way to configure it with /etc/crypttab to have it mounted on boot. So, here is the solution for Ubuntu 8.04 (should work on other distros that support crypttab too):
  1. Create an encrypted file first - this is covered in a lot of tutorials, but let's do it here (you need to be root to do this):
    • create empty /.cryptdata file
      dd if=/dev/zero of=/.cryptdata count=10 bs=1M
    • mount it via loop device
      losetup /dev/loop0 /.cryptdata
    • create an encrypted volume out of it
      cryptsetup luksFormat /dev/loop0
    • open the volume
      cryptsetup luksOpen /dev/loop0 cryptdata
    • format the volume (create filesystem)
      mke2fs -j /dev/mapper/cryptdata
  2. Add the following entry to /etc/crypttab:
    cryptdata /.cryptdata none luks
  3. Add the following entry to /etc/fstab:
    /dev/mapper/cryptdata /home/cryptdata ext3 relatime 0 2
  4. Create mountpoint for the encrypted filesystem:
    mkdir /home/cryptdata
Starting from now, the encrypted file will be mounted via loop device on system startup; you'll be asked for encryption password.

Distro hopping is over...

For a last couple of months I've been switching distros a lot just to find out that each has its own problems and bugs. Eventually I ended up with latest Ubuntu 8.04 . It's not perfect, but it is closest to what I expect from modern distro; let's hope their new QA efforts will soon bring some improvements. Some complaints regarding distros I recently tried:
  • OpenSuse 11.0 - after initial excitement I started to be fatigued by some irritating bugs (e.g. repository refreshing errors - why does it result in error message-box??). Other than that, changes to zypper were very nice (read: speed).
  • Sabayon 3.5 - I've always felt Gentoo is too much work for a daily use; Sabayon is a nice way to try out Gentoo without getting your hands dirty. I was initially very impressed by it, but it soon turned out that Entropy/Equo didn't play nice with Portage. After waiting for a few weeks for this bug to be fixed (and it's still not fixed), I came to the conclusion that Sabayon probably needs more manpower to work on bugs. Anyway, this is a very nice distro with a lot of potential.
  • Ubuntu 8.04 - a lot of people complain about getting wireless networking to work; Surprisingly to me, I had problems too (I've an Atheros-based NIC that has always been working fine with madwifi drivers for me) - my NIC was connecting to wrong AP on boot, but I finally found a workaround.

So, for now I will stick with latest Ubuntu. Distro hopping is over.