Saturday, January 21, 2006

Thunderbird Default Account

I've been playing with Thunderbird this week. For the last year, I've been aggregating all my mail account onto a Sidekick mobile Messaging Device, but I had to get rid of it because of the T-Mobile's horrible coverage. I've moved to one of Sprint's new EVO phones, which isn't going to work as well for reading mail. Thus, I'm working on using Thunderbird as my mail aggregator.

My goal is to move Thunderbird's config files to a USB Thumb drive. When on the road, I'll use my laptop, when home I'll use my workstation. Which ever machine has the thumb drive, will have all the Thunderbird information.

The first step was getting Thunderbird to recognize which account should be the default account. This is important because the default account is expanded and all the other accounts are collapsed on the display. The normal behavior is that the first account configured on the system is the default.

I found that I could change the behavior by editing the defaultaccount setting in the prefs.js file. By looking at the account list in the Thunderbird account pane, I counted down the list, found the account I wanted, assigned it to this setting, and restarted. First problem solved.

More to follow.

Tuesday, January 10, 2006

The Space Review: Astronauts and Area 51: the Skylab Incident

Here's an interesting article from "The Space Review", Astronauts and Area 51: the Skylab Incident. It tells of a Skylab crew that accidentally snapped a picture of the Groom Lake test facility, near Tonapah, NV. Groom Lak is better known by Area 51. Good analysis of policy and national security.

Wednesday, January 04, 2006

TILDWSB: Creating PDF Reports in Linux

From the Things I Learned During Winter Solstice Break department, I've been toying with generating my system reports in PDF. Normally, my reports are generated in ASCII text, but for some bizarre reason, there are some organizations that are wanting reports in PDF.

I ran into two problems. The first is that the native Linux tools will change text to PostScript, and PostScript to PDF, but not text to PDF. The second problem was that I could not get the PDF converter to accept piped input. This meant it would be a two step process.
    ls -l /etc | enscript -o x.ps; ps2pdf x.ps x.pdf
The first pipe captures the text output, converts it to PostScript, then redirects it to a file. Next, the ps2pdf utility reads the PS file and converts it to PDF. It's actually pretty sharp.

I was showing this to some folks and explained my two step dilemma. The next day, one of them caught me in the hall and showed me how to get ps2pdf to accept piped input:
    ls -l /etc | enscript -o - | ps2pdf - x.pdf
The second pipe has changed to output to "-". We now pipe to ps2pdf, and replace our input with "-". This has the effect of attaching the output of one to the input of the other. Sweet!

This generated a four page PDF (on my laptop-- YMMV). The next trick was to use mpage to get this onto a single sheet. As it turns out, mpage can do the ASCII to PS conversion:
    ls -l /etc | mpage - | ps2pdf - x.pdf
We use the same dash trick to get it in one step. I felt like this needed one more option, to install a margin around each pane on the page:
    ls -l /etc | mpage -M20 - | ps2pdf - x.pdf
Adding the "-M20" option to mpage, provided a clean, even margin on all sides of the output.

TILDWSB: LVM on Software Raid

From the Things I Learned During Winter Solstice Break department, it turns out that LVM on Raid is not as straight forward as it may seem. I had thought I would migrate one of my systems remotely, but decided it would be smarter to try it on a development box first. Lucky me for being prudent, as it did not work the first time.

The server had software raid running across two drives, containing /home. I wanted to get /var/spool/mail on the raid, also, and felt LVM seem a good solution. I realized it would be destructive, so I did a backup and moved it offsite. I then replicated the hardware configuration, and restored the backup onto the development server.

First, I issued pvcreate /dev/md0, which (as I expected) corrupted the ext3 filesystem. Second, I created the new volume group with vgcreate vg1 /dev/md0 (I already had a vg0). Third, I set up the new home filesystem with lvcreate -L +256M vg1 -n lv.home. Everything is still on track.

Since pvcreate had wiped out the ext3 filesystem, the lv.home had to be reformated. This required mke2fs -j /dev/vg1/lv.home. Oh no! An error!
    mke2fs: bad fragment size - /dev/vg1/lv.home
Good thing this wasn't the production system. Unfortunately, this didn't seem to have any bearing on the actual command, as I had not specified an block sizes at all.

Turns out, there is a problem building an LVM on an existing raid. The solution was to dismantle the LVM, stop the raid, use fdisk to delete the partitions, then start over. This time, I did not format the raid. On the second attempt, the logical volume formatted without error.