Wednesday 22 November 2006

Vim spelling

Vim 7 comes with Ubuntu Edgy. On new feature is spelling highlighting. Add the following commands to your ~/.vimrc

" enable spelling
set spell
" set the language to Australian English
set spelllang=en_au
" set the personal dictionary file
set spellfile=~/.vim.spell.en.add


Vim is very particular about the spellfile name, it must end in .en.add (for Engligh).

To switch off spelling run

:set nospell

Spelling can be switched on or off on a per window basis by using :setlocal instead of :set

Wednesday 8 November 2006

Hibernate to disk broken in edgy

After upgrading from dapper to edgy hibernate to disk stopped working. The computer appears to hibernate to disk, but when resuming it ignores the save images, replays the ext3 journal, and boots up. Swap is no longer activated - because it has a SWSUSP signature, and not a SWAP signature.

The solution I found is to:
  1. Edit /etc/fstab and change the start of the swap line from UUID=xxxx to /dev/hdaX (where /dev/hdaX is your swap partition).
  2. Re-create the swap partition with mkswap /dev/hdaX. Make sure /dev/hdaX is your swap partition as this command will erase the contents of that partition.
  3. Edit /boot/grub/menu.lst and edit the # defoptions= comment to include resume=/dev/hdaX
  4. Run update-grub to re-generate the grub menu file
  5. Reboot
  6. Confirm that swap is active
  7. Hibernate to disk and resume as you used to
Update:
This is discussed in Ubuntu bug 66637 where the suggested fix is to set RESUME=UUID=yyyyy in /etc/initramfs-tools/conf.d/resume and run update-initramfs -u

Tuesday 7 November 2006

Ubuntu Upgrade

Recently I upgraded most of my computers from Ubuntu dapper (6.06) to Ubuntu edgy (6.10).

This appears to have mostly gone well, though there have been a number of minor glitches, some of which may be detailed in later entries.

mutt using wrong browser

Problem: After upgrading to edgy when viewing urls in mutt (using ^b) they start in konqueror, not firefox.

Fix: run: "sudo update-alternatives --config x-www-browser" and select firefox.

Start Blogging

Having created a blog, my first step is to experiment, and see what it looks like.