Shallow Thoughts : : 2005

Akkana's Musings on Open Source Computing and Technology, Science, and Nature.

Tue, 13 Dec 2005

Linus on Gnome Usability

I spent an entertaining morning reading the thread on Gnome-usability that Linus Torvalds started with his posting beginning, "I personally just encourage people to switch to KDE."

The whole thread is interesting reading for anyone who's been frustrated with the lack of usability and missing features in recent Gnome user interface redesigns.

Linus continues:

This "users are idiots, and are confused by functionality" mentality of Gnome is a disease. If you think your users are idiots, only idiots will use it. I don't use Gnome, because in striving to be simple, it has long since reached the point where it simply doesn't do what I need it to do.

Naturally, various Gnome people speak up to defend Gnome. Linus clarifies his position in a followup posting:

No. I've talked to people, and often your "fixes" are actually removing capabilities that you had, because they were "too confusing to the user".

That's _not_ like any other open source project I know about. Gnome seems to be developed by interface nazis, where consistently the excuse for not doign something is not "it's too complicated to do", but "it would confuse users".
He gives several examples of functionality the Gnome team has removed which every competing project still allows, such as binding mouse buttons to functions in the window manager, and typing a filename in the file selection dialog.

A few messages later, Jeff Waugh defends the file selection dialog, calling it "top stuff". Carl Worth responds to that with a nice summary of long-standing and long-ignored bugs on file selection dialog usability. Several other posters follow up with additional issues not yet fixed.

Somewhere along the line, the spectre of Mac OS is raised (of course). Michael Bernstein posts the obligatory "I gave my mom Mac OS X and she loved it" message, adding the novel but unlikely suggestion that the cure for Linux usability issues is to draft non Linux programmers to develop the UI. (No one points out in the Mac OS subthread that Mac OS X itself includes quite a few of the options which have been dropped by the Gnome usability team, such as readline key bindings in every text field, or a typable text field in the file selection dialog, yet no one seems to be complaining about OS X's lack of usability.)

The thread eventually peters out without a conclusion. It's fairly clear that neither side is convinced by the other. Gnome has chosen their path, and "dumbing down" the UI and removing features needed by users such as Linus is part of that choice. Too bad for the users, though: especially users for whom switching entirely to KDE/Qt apps is not a viable choice.

Tags: ,
[ 18:40 Dec 13, 2005    More linux | permalink to this entry | ]

Tue, 22 Nov 2005

Changing Scanner Brightness

It's Mars season (Mars was at opposition at the beginning of November, so Mars is relatively close this month and it's a good time to observe it) and I've been making pencil sketches of my observations. Of course, that also means firing up the scanner in order to put the sketches on a web page.

Last weekend I scanned the early sketches. It was the first time in quite a while that I'd used the scanner (which seldom gets used except for sketches), and probably only the second time since I switched to Ubuntu. I was unreasonably pleased when I plugged it in, went to GIMP's Acquire menu, and was able to pull up xsane with no extra fiddling. (Hooray for Ubuntu! Using Debian for a while gives you perspective, so you can get great joy over little things like "I needed to use my scanner and it still works! I needed to make a printout and printing hasn't broken recently!")

Anyway, xsane worked fine, but the scans all came out looking garish -- bright and washed out, losing most of the detail in the shading. I know the scanner is capable of handling sketches (it's a fairly good scanner, an Epson Perfection 2400 Photo) but nothing I did with the brightness, contrast, and gamma adjustments got the detail back.

The adjustment I needed turned out to live in the "Standard Options" window in xsane: a Brightness slider which apparently controls the brightness of the light (it's different from the brightness adjustment in the main xsane scanning window). Setting this to -2 gave me beautiful scans, and I was able to update my 2005 Mars sketch page.

Tags:
[ 14:13 Nov 22, 2005    More tech | permalink to this entry | ]

Fri, 18 Nov 2005

(Really) Reinstalling on Debian

I found myself in a situation where a package was mostly installed, but it was missing some files, notably the startup file in /etc/init.d/packagename. No problem, right? Just reinstall the package.

Well, no. dpkg -i packagename spun and looked busy for a while, but the missing file didn't appear. Removing the package first with dpkg -r packagename, then reinstalling, didn't help either, nor did dpkg -i --force-newconfig packagename. (I didn't try dpkg -r --purge packagename because I already had invested some time into setting up the files in the package and was hoping to avoid losing that work.)

Of course, I could have extracted the .deb somewhere else and pulled the single init.d file out of it; but I was worried that I might be missing other files, and end up with a flaky package.

Well, as far as I can tell, there really isn't any way to do this "right" in Debian: there's no way to tell dpkg "Really install this package, every file in it, even if you think maybe some of the files already got installed before", or "Install any file in this package which doesn't currently exist on disk." It's amazing (I'm pretty sure RPM offered both of these options) but apparently this isn't something dpkg allows.

I found a way to trick it, though:

rm /var/lib/dpkg/info/packagename.*
dpkg -i packagename

You get a lovely warning that
dpkg: serious warning: files list file for package `packagename' missing, assuming package has no files currently installed.
and then dpkg finally goes ahead and reinstalls all the files. Whew!

Update: Aha! It is possible after all. dpkg i --force-confmiss is the option I wasn't seeing. Thanks, Yosh!

Tags: ,
[ 19:01 Nov 18, 2005    More linux | permalink to this entry | ]

Wed, 16 Nov 2005

MP3 Players Reviewed

I've been meaning to write up my impression of a few MP3 players I've tried, since although the web is full of MP3 player reviews, hardly any of them give you any idea of how the beast actually works when playing music -- does it remember its position in a song? Does it stay in random mode, and how hard is it to get into that mode? Can you fast forward? All those details that are critical in day to day use, but which are impossible to tell from the packaging or, sadly, from most reviews.

The review came out rather long, so instead of making it a blog entry I've put it on its own MP3 Player Review page.

Tags:
[ 18:48 Nov 16, 2005    More tech | permalink to this entry | ]

Mon, 07 Nov 2005

UDEV and Multiple Flash Card Readers

Update: Some of this has changed; see my newer entry, Update on writing udev rules for flash card readers.

Dave had one of those nifty front-panel multiple flash card readers sitting on a shelf, so I borrowed it. It's USB based, fits in a CD drive bay, and has slots for all the common types of flash memory, as well as a generic USB socket.

With the device installed, I booted into my usual Ubuntu (hoary) partition, inserted an SD card and checked dmesg. Nothing! The four logical units of the device had been seen at boot time, but nothing new happened when I inserted a card.

I tried mounting /dev/sda1, /dev/sdb1, /dev/sdc1, /dev/sdd1, and /dev/sde1 anyway, but got "No such device" each time.

Dave muttered darkly about udev and hal and said I should try it under an older Debian with a normal /dev. I rebooted my old sid partition, with a kernel I built myself. I needed a kernel with "Probe all LUNs on each SCSI device", of course. I still got no messages or hotplug events when inserting the card, but /dev/sdd1 mounted the SD card.

(For anyone reading this who's not familiar with Linux' handling of USB storage devices, sd in /dev/sdd1 stands for "SCSI disk" and has nothing to do with the fact that I was using a "secure digital" media card. Any USB disk or flash card is supposed to show up under /dev/sdsomething and the main trick is figuring out the something. Which is part of what udev and hal are supposed to help with.)

Then I discovered that doing an fdisk -l /dev/hdd gave the right answer (one partition) for the SD card. And as soon as I did that, the /dev/sdd1 device appeared and I was able to mount it normally.

Apparently, when udev sees the logical units at boot time, with no cards inserted, it decides that there's a /dev/sdd, but it has no partitions on it so there's no such device as /dev/sdd1. Since inserting a card later doesn't generate a hotplug event, udev never re-evaluates this, unless somehow forced to (apparently running fdisk forces it, though I'm not sure why). Dave was right: udev/hal are the culprit here, and the kernel was fine.

A helpful person on #ubuntu pointed me to this tutorial on writing rules for udev. It mentions the problem with multi USB card readers not getting additional events when cards are plugged in, and suggests modifying the NAME key in the rules (which seem to be in /etc/udev/rules.d/udev.rules to:

BUS="usb", SYSFS{product}="USB 2.0 Storage Device", NAME{all_partitions}="usbhd"
Elsewhere in the document, it suggests getting that SYSFS{product} string by running a command like udevinfo -a -p /sys/block/sdd

Unfortunately, that seems to be completely ignored. udevinfo told me the string was "CardReader SD ", but plugging that in to udev.rules did not create any /dev/usbhd* devices. It also seemed clear that udev is using BUS="scsi" rather than BUS="usb" for these devices, based on the device names that are being created (sd* rather than ub*). But making that change didn't help.

Eventually I found a combination that worked. Ubuntu's current rules for usb-storage devices are:

BUS="scsi", KERNEL="sd[a-z]*", PROGRAM="/etc/udev/scripts/removable.sh %k", RESULT="1", NAME="%k", MODE="0640", GROUP="plugdev"
BUS="usb", KERNEL="ub[a-z]*", NAME="%k", MODE="0640", GROUP="plugdev"
(I don't know what devices create the ub* devices. It's nothing I've used so far).

I changed the "sd[a-z]*" to "sd[e-z]*", so that it wouldn't apply to the four devices grabbed by the multicard reader. Then I added these four lines:

BUS="scsi", KERNEL="sda*", PROGRAM="/etc/udev/scripts/removable.sh %k", RESULT="1", NAME{all_partitions}="cfcard", MODE="0640", GROUP="plugdev"
BUS="scsi", KERNEL="sdb*", PROGRAM="/etc/udev/scripts/removable.sh %k", RESULT="1", NAME{all_partitions}="smcard", MODE="0640", GROUP="plugdev"
BUS="scsi", KERNEL="sdc*", PROGRAM="/etc/udev/scripts/removable.sh %k", RESULT="1", NAME{all_partitions}="mscard", MODE="0640", GROUP="plugdev"
BUS="scsi", KERNEL="sdd*", PROGRAM="/etc/udev/scripts/removable.sh %k", RESULT="1", NAME{all_partitions}="sdcard", MODE="0640", GROUP="plugdev"

That worked. Now udev creates /dev/sdcard[1-15] as well as /dev/sdcard (and likewise for the other three flash types), and I can make a normal /etc/fstab entry:

/dev/sdcard1    /sd             auto    rw,user,noauto   0       0

Now as a user I can say mount /sd without needing to su to root or do any extra fiddling. Hurrah!

Tags: , ,
[ 16:49 Nov 07, 2005    More linux | permalink to this entry | ]

Thu, 03 Nov 2005

Astronomy for Middle School Girls

I presented an astronomy program for a group of middle school girls -- and survived!

The American Association of University Women runs a program with some of the local high schools to encourage girls to study science, math and engineering. I've volunteered at the star party at their "Tech Trek" summer camp at Stanford quite a few times; the girls at the camp are always energetic, smart and enthusiastic.

Last summer I asked the camp organizers whether they did any programs during the school year. Before I knew it, I was (gulp) signed up to run one!

AAUW's format: the girls rotate among four different "stations", spending about fifteen minutes at each station. That wasn't long enough to do any real problem solving or teach them any mathematical techniques, so I had to stick to fairly simple concepts while trying to give them a taste of several different aspects of astronomy.

Then the school played a dirty trick on us, and told us when we showed up at dawn-thirty that most of the girls were having an important test (having something to do with state standards) that day and so we'd only get ten girls instead of 25. What, do they not plan the standards tests any earlier than the day they give them? It seemed rather rude of the school to spring this on a group of volunteers who have to show up early in the morning for a program that's been planned for months.

The stations:

Telescopes: I showed them several different types of telescopes, and explain the difference between reflectors and refractors and what each is good for. My little Coulter CT-100 came in handy since it's so open that it's easy to see the arrangement of the mirrors. For the refractor, I used an 80mm f/7 because it's easy to transport and set up (though something on an equatorial mount would have been nice). Then I had my cheapie homebuilt 6-inch f/4 Dobsonian so that they could play with a dob mount and see how it was built (and to show that telescopes don't have to be expensive). I had hoped to show the sun through the 80f7, but the sky didn't cooperate (no big surprise, in November). I also had a collection of eyepieces and binocular parts for them to disassemble and play with. Some girls were a lot more willing to play with things than others; several didn't seem to want to look or touch until specifically instructed "Stand there, look there, push there".

Mars: With Mars just past closest approach, of course there had to be a Mars station. I had them make Mars icosohedron globes and brought a selection of "Mars rocks" (mostly red oxidized basalt). They liked learning that Mars is red because it's rusty, but some of them had trouble assembling the icosohedrons.

Moon: A 100W light bulb and some ping-pong balls created a model of why the moon goes through phases, and what the difference is between phases and an eclipse. (I think the adult AAUW helpers may have learned as much from this exercise as the girls.) Moon maps and displays and "moon rocks" (basalt) rounded out the station.

Spectra and the Doppler Shift: A few weeks ago I made a "Doppler ball" to illustrate the Doppler effect with sound. Split a whiffle ball in half (the hard part here is finding one: toy stores and Target only sell them in quantity, but I found a 2-pack at a dollar store). Then install a buzzer (from Radio Shack) and a 9-volt battery inside the ball (and a switch, plug, or some other way to turn it on). Tie a string to the ball and whirl it around your head, or have people toss it back and forth, and listen to the frequency change according to whether the ball is coming or going. It's very effective!

In addition, we had diffraction gratings (from Edmund Scientific; there doesn't seem to be any place in the bay area where you can just walk in and buy consumer-quality diffraction gratings) and prisms, and incandescent lamp and fluorescent (mercury vapor) lamps to show the difference between a line spectrum and a continuous one. One of the other women got the idea to burn calcium citrate tablets to show a calcium line, but I didn't get a chance to see how that worked. Another woman brought a wonderful bell: she's in a bell-ringing choir, and showed how you can demonstrate the Doppler effect and also, by immersing a low-frequency bell in water, illustrate sine waves very effectively. Cool stuff!

(I had tried out the Doppler ball and the gratings on my Toastmasters group a few weeks earlier, and it worked well there too. The ball swinging, one spectrum, and some discussion of why spectra are important and what they can tell us about the universe, all just barely fit in a seven-minute speech.)

Overall the day went well, considering that we started late and had a much smaller group than we expected. The smaller group meant that we got more chance to talk and explain things and encourage them to play around. The evaluations were all fairly positive, there weren't any stations that seemed unpopular or just didn't work, and lots of them said they liked all the activities. (I was too busy running the telescope station to get a chance to peek in on any of the others, alas.)

I'd like to get a chance to lead a group of girls in a project with more depth, where they actually have to solve a problem, build something, or calculate something. That would require a few hours rather than fifteen minutes. But the "several small stations" approach is great for someone inexperienced in leading school programs, like me, or when you're not familiar with the girls and their interests and capabilities. It wasn't nearly as scary as I thought it would be, and was fun for all concerned.

Tags:
[ 18:48 Nov 03, 2005    More education | permalink to this entry | ]

Fri, 28 Oct 2005

A Value of "Close" With Which I was Previously Unfamiliar

A very strange article in today's SF Chronicle describes "Mysterious, bright lights in the night sky Wednesday that alarmed or bemused scores of Bay area residents".

It atributes to Andrew Fraknoi, chairman of the Foothill College astronomy department and media hound (it doesn't say that second part), information that "the lights were probably Mars and Venus, two planets that currently appear close together and will probably remain brilliant for another week or two until their orbits begin moving them away from the Earth again."

Aside from the "probably" (I was under the impression that the basic orbits of the major planets were fairly well understood, and that it's fairly rare that a planet suddenly deviates from its regular orbit in a visible way), I found this curious because Venus is currently in the early evening sky -- since its orbit lies inside that of the Earth, it can never appear to move very far from the Sun -- while Mars, a week before opposition, is rising in the early evening and overhead at roughly midnight.

Just to be sure, I checked with XEphem. The angular distance between Mars and Venus is current 146°. They're almost at opposite ends of the sky. This is a definition of "close" with which I was previously unfamiliar.

I don't know if Fraknoi really said this, or if he was simply misquoted by the reporter, David Perlman, the Chronicle's Science Editor. If so, the misquote is quite pervasive -- he repeats several times throughout the article Fraknoi's assurance that the lights (shown in a photograph accompanying the article, indeed close together though we aren't told anything about the lens used to take the photo) must be Venus and Mars.

Other giggle-inducing quotes from the article:

No one except astronomers could offer an explanation.
Well, gosh, you certainly wouldn't want to listen to those egghead astronomers about a question involving lights in the sky.

(Well, okay, in this case you shouldn't listen to them, because the Mars/Venus explanation obviously doesn't fit the observations.)

According to Fraknoi, Mars now far outshines even the brightest of all the stars in the sky, and when skies are clear, the fourth planet from the sun could look even bigger than normal.
Mars at opposition is certainly brighter than any star (except the Sun, of course). It currently shines with a magnitude of about -2.2 (a smaller number means a brighter object; the brightest star, Sirius, is magnitude -1.4. Venus, at the moment, is much brighter than either one at -4.2, as is usual since it's larger, closer, and more reflective than Mars. That might have been worth mentioning.

I can't figure out whether "even bigger than normal" is supposed to refer to size or brightness. Mars is normally a tiny object as viewed from Earth, too small to see much detail except for a few months around opposition every couple of years. Indeed it is much bigger than normal right now (and a lovely sight in a telescope!), as well as brighter; but "even bigger" seems like an odd phrasing for something normally so small.

But since Mars' size isn't visible except in a telescope, Dave thinks "bigger" here was meant to refer to brightness: the misconception that brighter objects look bigger. I shouldn't make fun of this: the great astronomer Tycho Brahe, in the 1500's, was convinced that stars had angular size instead of being point sources. He thought brighter stars appeared bigger, and based his geocentric solar system model on that. That view wasn't disproved until Galileo invented the telescope. It's a common misconception even today, but I'd hate to think the Chronicle's science editor was encouraging it, so I'll stick to the assumption that he really meant size and that the "even" was just an odd journalistic embellishment.

So what were the mysterious lights? I don't know. I didn't see them, and the article doesn't give enough detail to make a good guess. But the photo looks a lot like airplanes or helicopters; at least one of the lights has a couple of smaller lights to either side, usually a dead giveaway for an aircraft.

Update the following day: I wasn't the only one to complain about this article, and the Chron published a paragraph in the Corrections section this morning clarifying that Venus is nowhere near Mars and could not have been related to the lights people reported.

Tags:
[ 11:57 Oct 28, 2005    More headlines | permalink to this entry | ]

Fri, 14 Oct 2005

More On Low Orbits

Wacky Chinese orbital physics are in the BBC again. Today's story tells us how they've corrected yesterday's orbital problems. Quoting from China's "official Xinhua news agency", the BBC tells us:
Xinhua said the craft had deviated from its planned trajectory because of the Earth's gravitational pull.

I can hear them now ... "Darn it! I guess we forgot to take the earth's gravity into account when making our orbital calculations!"

Tags:
[ 21:40 Oct 14, 2005    More headlines | permalink to this entry | ]

Thu, 13 Oct 2005

Darn Those Low Orbits

BBC News Science tells us about the orbital problems of China's manned Shenzhou VI spacecraft.

Gravity has drawn Shenzhou VI too close to earth, the agency said.

Shenzhou VI, which has two astronauts on board, is in a low enough orbit to be affected by the Earth's gravitational pull.

Don't you hate those low orbits that are affected by gravity? Maybe next time they should choose an orbit high enough that it isn't subject to gravity.

Tags:
[ 20:39 Oct 13, 2005    More headlines | permalink to this entry | ]

Wed, 12 Oct 2005

Autumn Winds

The mockingbird is singing. He's been doing that for three weeks now. What's he doing bursting into song all of a sudden in late September and keeping it up for weeks?

All over, animals in the parks are restless. Squirrels are madly digging up nuts from one place, carrying them to another and re-burying them. Chipmunks have appeared, chipping from the bushes as we walk by. I normally don't see chipmunks in the local parks, just ground and tree squirrels. Are they always here, but usually quiet so we don't see them? Or did they migrate in for the season?

An unusual species of large yellow-billed blue bird appeared on the wire above the house. How odd! What's blue, jay sized but has a big bulky yellow bill?

Binoculars provided the answer. A scrub jay with an acorn in its bill! Since then I've seen quite a few yellow-billed Stellar's jays in the local parks as well.

The central area of Alum Rock is filled with a large family of acorn woodpeckers drilling holes in trees, posts, and the walls of the Youth Science Institute building to store their acorns for the winter. The YSI building looks like swiss cheese. A few days after I saw the woodpeckers at work, we went back and the buildings had all sprouted dangling silvery tinsel from all eaves. It seems to be keeping the woodpeckers away. Bad for me (they're cute), good for the YSI.

I saw a couple of nuthatches at Arastradero. A first for me. I don't know if they're migrants, or if they're always there and I've just never noticed before. Arastradero was also thick with white-tailed kites. There are always a few testing the slope currents there, but this time I saw at least four different pairs, maybe more, each with their own territory staked out. Somehow even with that many kites they all managed to stay too far away for me to get a good picture.

The reason for all the time spent at Alum Rock and Arastradero is that we're on the hunt for tarantulas. Every fall, just as the weather starts to get cold, the male tarantulas come out of their burrows and go marching across the trails looking for females. (Maybe the females are marching too. I'm not clear on that.) They're only out for a short time -- maybe a week -- and they're easy to miss. Last year we missed them altogether (but then we lucked out and spotted one later that month while travelling in Arizona).

Anyway, we've had no tarantula luck yet this year. Henry Coe state park had its annual Tarantula Festival already, a week and a half ago. But they always seem to have the festival while the weather's still hot, long before tarantulas show up in any other parks. Maybe Coe tarantulas are a different species which comes out earlier than the others. At any rate, we've seen no sign of them at Alum Rock or Arastradero so far this year.

But back to that singing mockingbird. He doesn't seem to be the same mocker who set up house here this spring and raised three nests of chicks. That one had a very distinctive call note which I haven't heard at all this fall.

But what's he doing singing in autumn? Is he singing as he packs his bags to fly to LA or Mexico? Or confused about the weather? Someone asked that on a local birding list, after noticing thrashers (closely related to mockingbirds) suddenly finding the muse. I reproduce here the edifying and entertaining answer. (Googling, it appears to have been a folk song, though I can't find a home page for the author or anything about the music.)

The Autumnal Recrudescence of the Amatory Urge

When the birds are cacaphonic in the trees and on the verge
Of the fields in mid-October when the cold is like a scourge.
It is not delight in winter that makes feathered voices surge,
But autumnal recrudescence of the amatory urge.

When the frost is on the punkin and when leaf and branch diverge,
Birds with hormones reawakened sing a paean, not a dirge.
What's the reason for their warbling? Why on earth this late-year splurge?
The autumnal recrudescence of the amatory urge.
---
Written by Susan Stiles, copyright December 1973

Tags:
[ 23:54 Oct 12, 2005    More nature | permalink to this entry | ]

Mon, 10 Oct 2005

How to Search Your Mozilla Cache

Ever want to look for something in your browser cache, but when you go there, it's just a mass of oddly named files and you can't figure out how to find anything?

(Sure, for whole pages you can use the History window, but what if you just want to find an image you saw this morning that isn't there any more?)

Here's a handy trick.

First, change directory to your cache directory (e.g. $HOME/.mozilla/firefox/blahblah/Cache).

Next, list the files of the type you're looking for, in the order in which they were last modified, and save that list to a file. Like this:

% file `ls -1t` | grep JPEG | sed 's/: .*//' > /tmp/foo

In English: ls -t lists in order of modification date, and -1 ensures that the files will be listed one per line. Pass that through grep for the right pattern (do a file * to see what sorts of patterns get spit out), then pass that through sed to get rid of everything but the filename. Save the result to a temporary file.

The temp file now contains the list of cache files of the type you want, ordered with the most recent first. You can now search through them to find what you want. For example, I viewed them with Pho:

pho `cat /tmp/foo`
For images, use whatever image viewer you normally use; if you're looking for text, you can use grep or whatever search you lke. Alternately, you could ls -lt `cat foo` to see what was modified when and cut down your search a bit further, or any other additional paring you need.

Of course, you don't have to use the temp file at all. I could have said simply:

pho `ls -1t` | grep JPEG | sed 's/: .*//'`
Making the temp file is merely for your convenience if you think you might need to do several types of searches before you find what you're looking for.

Tags: , , , , , , ,
[ 22:40 Oct 10, 2005    More tech/web | permalink to this entry | ]

Wed, 05 Oct 2005

Blank Survey Messages

I love the messages I keep getting from having attended LinuxWorld a few months ago. They say:
Dear LinuxWorld Attendee:

That's it. That's all they say.

Well, unless you dig deeper. It turns out there's an html part, too, which actually does have content (asking me to participate in a survey). But I would never have seen that if I didn't know how to read the MIME structure of email messages.

You see, the message is sent as Content-Type: multipart/alternative, which means that there's a text part and an html part which are supposed to be equivalent. You can read either part and they should say the same thing. Lots of modern mailers, including Mozilla, mutt, pine, probably Opera, and even Apple Mail can now be configured to give preferences to the text part of messages (so you don't have to squint your way through messages written in yellow text on a pink background, or in tiny 6-point text that's too small for your eyes, and so that you can be assured of safety from web bugs and other snoopware which can be embedded in html mail). Any mailer so configured would show this message as blank, just as I'm seeing it in mutt.

It seems amazing that their web developers would go to the extra trouble of setting up MIME headers for multipart/alternative content, then not bother to put anything in the content. Why not just send as plain html if you don't want to create a text part?

I'd let them know they're sending blank messages, but tracking down a contact address seems like more trouble than it's worth. The mail purports to come from LinuxWorldConference&Expo@idg.com; the message references URLs from www.exhibitsurveys.com; the actual message (as seen in the headers) came from outboundmailexhibitsurvey.com. It's probably exhibitsurveys.com generating the bad email messages, but it's hard to say for sure.

Suggestion for web developers: if you write code to send out mass mailings, you might want to check the mail that's actually getting sent out. If your program generates more than one MIME attachment, it's a good idea to check all the attachments and make sure you're sending what you think you are. Look at the actual message structure, don't just glance at the message in the mail program you happen to use. The fact that a message displays in one mailer does not imply that it will display correctly for all users (especially for a survey aimed at Linux users, who use a wide variety of mailers on many platforms and are quite likely to set non-default options). If you don't know MIME, find someone who does to sanity-check your output ... or don't send multiple MIME attachments.

Tags:
[ 12:30 Oct 05, 2005    More tech | permalink to this entry | ]

Tue, 04 Oct 2005

Hacking Mozilla Extension Versions

Mozilla Firefox's model has always been to dumb down the basic app to keep it simple, and require everything else to be implemented as separately-installed extensions.

There's a lot to be said for this model, but aside from security (the need to download extensions of questionable parentage from unfamiliar sites) there's another significant down side: every time you upgrade your browser, all your extensions become disabled, and it may be months before they're updated to support the new Firefox version (if indeed they're ever updated).

When you need extensions for basic functionality, like controlling cookies, or basic sanity, like blocking flash, the intervening months of partial functionality can be painful, especially when there's no reason for it (the plug-in API usually hasn't changed, merely the version string).

It turns out it's very easy to tweak your installed plug-ins to run under your current Firefox version.

  1. Locate your profile directory (e.g. $HOME/firefox/blah.blah for Firefox on Linux).
  2. Edit profiledirectory/extensions/*/install.rdf
  3. Search for maxVersion.
  4. Update it to your current version (as shown in the Tools->Extensions dialog).
  5. Restart the browser.

Disclaimer: Obviously, if the Firefox API really has changed in a way that makes it incompatible with your installed extensions, this won't be enough. Your extensions may fail to work, crash your browser, delete all your files, or cause a massive meteorite to strike the earth causing global extinction. Consider this a temporary solution; do check periodically to see if there's a real extension update available.

More information on extension versioning (may be out of date).

Tags: , , ,
[ 19:47 Oct 04, 2005    More tech/web | permalink to this entry | ]

Fri, 30 Sep 2005

Set C Styles Automatically in Emacs

I just figured out a nifty emacs trick: how to set C styles automatically based on the location of the file I'm editing. That way, emacs will autoindent with the proper style whether I'm editing my own code, GIMP code, Linux kernel code, etc. assuming that I keep the source for these projects in predictable places.

First, define a derived mode for each style you might want to use. Each minor mode inherits from c-mode, but adds a c-set-style call. (Obviously, this assumes that the styles you want to use are already defined.)

(define-derived-mode gnu-c-mode c-mode "GNU C mode"
  (c-set-style "gnu"))
(define-derived-mode linux-c-mode c-mode "GNU C mode"
  (c-set-style "linux"))

Then add entries to your auto-mode-alist for each directory you want to treat specially:

(setq auto-mode-alist
[ . . . ]
      (cons '("gimp.*/" . gnu-c-mode)
      (cons '("linux-.*/" . linux-c-mode)
            auto-mode-alist) ) )

Your normal default style will still work for any files not matching the patterns specified in auto-mode-alist.

It might be possible to skip the step of defining derived modes by switching on the file's pathname in the C mode hook, but I've never figured out how to get the pathname of the file being loaded in any reliable way.

Tags:
[ 13:42 Sep 30, 2005    More programming | permalink to this entry | ]

Mon, 26 Sep 2005

Exorcising the Evil Alternate Screen

I've long wondered why people like the "alternate screen" misfeature which has become mandatory in so many Linux terminals. That's the one where you want to find out the options to ls, so you do man ls, get to the option you were curious about, hit q to get out of man so that you can run ls with the right option -- and the man page disappears, clearing the screen so you can't see the documentation you were just trying to read! What's up with that?

(Sigh ... just another addition to the list of clever innovations that make Linux terminal programs harder to use than any other system's ... like the page up key that doesn't actually page up.)

Anyway, a long time ago I worked out how to get around this irritating misfeature (referred to as "rmcup" on newer terminfo systems; the workaround on older termcap systems was called "tite inhibit"). It's easy in xterm-based programs, but harder in more "modern" terminal programs that don't make it configurable. I guess I never got around to writing it up publically.

Tonight someone asked about it on Linuxchix Techtalk, so I resurrected the old terminfo entry I wrote for use with gnome-terminal (which I'm not actually using because rxvt doesn't need it), and wrote up a sketchy page on it: Exorcising the Evil Alternate Screen.

Tags: ,
[ 20:18 Sep 26, 2005    More linux | permalink to this entry | ]

Fri, 16 Sep 2005

Rude Users Sometimes Beget Rude Developers

On the Linuxchix grrltalk list, someone was bothered by the tone of Eric Raymond's How to Ask Questions the Smart Way. And certainly, the tone is a bit brusque (like much of ESR's writing), though it's full of useful advice.

The discussion hinged around user demands such as "YOU SUCK! YOU MUST FIX THIS NOW!" This is obviously rude, and just as obviously has little chance of getting a positive reaction from developers.

The problem is that after twenty or so of these demands, even a polite user coming in to ask for a feature may be snapped at. I've seen developers get touchy after reading a slew of this sort of bug reports, and snap at someone who wasn't being particularly rude.

Really, a lot of users have no idea how many of these rude, demanding, "YOU SUCK -- FIX THIS IMMEDIATELY!" messages some developers get. Try "watching" a category or developer in bugzilla for some major project like Mozilla for a month to get an idea of the volume of email that streams in. It's easy to get ten or more of these in one day's morning mail before you've even finished your coffee. Lots of developers just stop reading their bug mail after a while. I hate that and think it's wrong, but I can understand why they do it.

Sometimes problems that twenty users comment on, even if they're real issues, are hard to fix, or the fix would conflict with some other important aspect of the program.

"Hard to fix" or "Hard to find a way to fix the bug without breaking another important feature" is not an adequate solution when you're developing software professionally. But when you're volunteering your own evenings, weekends and vacations to contribute to open source software, and some user who probably spent his evenings watching TV and last weekend skiing, who doesn't seem to have spent any time contributing to the project beyond filing a few bugs, shows up and demands that you drop the work you're currently interested in and instead devote the next eight weekends to fixing HIS feature ... well, after that happens a few times it's easy to get a little touchy. When it happens day after day, it's even easy to stop caring so much about user input in general, and to (incorrectly) lump all users, not just the rude ones, into this category.

I wish users, before making a request, would remind themselves that developers are spending their spare time on the project, instead of going skiing or watching TV or whatever -- and no, that's not because developers are troglodyte geeks who have no other hobbies. DO make suggestions, but remember when you do that you're probably not talking to someone who's paid to maintain the program forty hours a week. You're talking to someone who donated spare time to create a program that you now find usable enough to care about.

No, rudeness doesn't solve anything. Developers being rude doesn't improve this situation -- it won't make the users stop being rude, it won't help the polite users, it won't even make the developers feel better. But sometimes people get irritable when they're taken for granted. Developers are only human. Whatever users might think.

Tags:
[ 11:30 Sep 16, 2005    More tech | permalink to this entry | ]

Wed, 14 Sep 2005

It's Walnut Season

It's walnut season. The neighborhood is full of crows, making rattling calls, flying from place to place with walnuts in their beaks, and dropping walnuts on roads to try to crack them. It's always entertaining to watch the crows' antics. Walnuts are hard to crack, even when you're a professional.

Meanwhile, the squirrels are going crazy. In addition to running around carrying walnuts the size of their heads, burying, digging up, and re-burying, we've also seen squirrels fighting with each other, threatening each other, whirling around in trees for no apparent reason, and perching on wires barking at invisible enemies below.

I had assumed that they were barking at cats or other squirrels in neighbors' yards, but this morning I saw a squirrel on the power line above the driveway, barking and threatening and staring intently at ... the empty driveway. If there was anything there, it must have been the size of an ant.

Makes me wonder ... do walnuts ever ferment? Am I seeing a neighborhood full of drunken squirrels?

Tags: ,
[ 12:16 Sep 14, 2005    More nature | permalink to this entry | ]

Sun, 11 Sep 2005

Changing User Agent to Pretend to be MSIE6

In the wake of the Hurricane Katrina devastation, one of FEMA's many egregious mistakes is that their web site requires IE 6 in order for victims to register for relief.

It's mostly academic. The Katrina victims who need help the most didn't own computers, have net access, or, in many cases, even know how to use the web. Even if they owned computers, those computers are probably underwater and their ISP isn't up.

Nevertheless, some evacuees, staying with friends or relatives, or using library or other public access computers, may need to register for help using FEMA's web site.

It turns out that it's surprisingly difficult to google for the answer to the seemingly simple question, "How do I make my browser spoof IE6?" Here's the simple answer.

Opera: offers a menu to do this, and always has.

Mozilla or Firefox: the easiest way is to install the User Agent Switcher extension. Install it, restart the browser and you get a user-agent switching menu which includes an IE6 option.

To change the user agent on Mozilla-based browsers without the extension:

  1. type about:config into your urlbar
  2. Right-click in the window (on Mac I think that's cmd-click to get a context menu?) and select New->String
  3. Use general.useragent.override for the preference name, and Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1) for the value.
I think this takes effect immediately, no need to restart the browser.

Safari (thanks to Rick Moen on svlug:

  1. Exit Safari. Open Terminal.
  2. Type defaults write com.apple.Safari IncludeDebugMenu -boolean true
  3. Restart Safari.
Safari's menu bar will now include Debug, which has an option to change the user agent.

If you do change your user agent, please change it back after you've finished whatever business required it. Otherwise, web site administrators will think you're another IE user, and they they'll use that as justification for making more ridiculous IE-only pages like FEMA's. The more visits they see from non IE browsers, the more they'll realize that not everyone uses IE.

Tags: ,
[ 13:35 Sep 11, 2005    More tech/web | permalink to this entry | ]

Mon, 29 Aug 2005

Using GIMP for Paper Prototyping

Sven, one of the GIMP developers, has been interested in setting up a "paper prototyping" system for reorganizing the GIMP's menus (see his blog post.

Since I've been involved with some of the ongoing menu reorganization, we've talked about it a bit, and discussed some tools that are being written to assist with online paper prototyping (since the "get everybody together in a room with slips of paper" model doesn't work for worldwide distributed projects).

But for some reason it never occurred to me until a couple days ago that GIMP itself would make a fine paper prototyping tool. The move tool lets you move the text layers into any configuration you like, you can control colors and fonts, and you can save to your choice of standard formats.

It didn't take long at all to whip up a script-fu to enable paper prototyping, which I posted to the gimp-developer list.

Nobody has actually used my script to comment on the menu reorganization yet ... but what the heck, it was fun to write the script. Maybe it'll be useful in other projects that need paper prototyping.

Tags:
[ 17:43 Aug 29, 2005    More gimp | permalink to this entry | ]

Thu, 25 Aug 2005

Dowitcher Photo Published!

I was contacted months ago regarding a photo on my web site asking whether it could be used along with an article on molting patterns in Dowitchers in Birding magazine.

Months went by (print magazines are slow) and I wondered if the plan had been dropped, but last week I heard from the author, Caleb Putnam, and the article is in the current (July/August) issue! Yesterday I received a copy of the magazine and a modest payment. Cool!

Even cooler, the photo is the frontispiece of the article. The author says he's received many comments about how great a shot it is for illustrating molt gaps. That's a pull quote if I ever heard one: "Great shot for illustrating molt gaps."

The article is interesting as well -- I didn't know that molt patterns could identify the two species of dowitcher. Telling long-billed and short-billed dowitchers apart has been beyond my modest birding skills, but perhaps I'll have better luck now. I'll be heading out to Baylands today at lunch to see what the dowitchers are doing ...

Tags:
[ 11:49 Aug 25, 2005    More photo | permalink to this entry | ]

Sun, 14 Aug 2005

Edit sources.list To Get Ubuntu Security Updates

I bet I'm not the only one who uses Ubuntu (Hoary Hedgehog) and didn't realize that it doesn't automatically put the security sources in /etc/apt/sources.list, so apt-get and aptitude don't pick up any of the security updates without extra help.

After about a month with no security updates on any ubuntu machines (during which time I know there were security alerts in Debian for packages I use), I finally tracked down the answer.

It turns out that if you use synaptic, click on "Mark All Upgrades", then click on Apply, synaptic will pull in security updates. However, if you use the "Ubuntu Upgrade Manager" in the System->Administration menu, or if you use commands like apt-get -f dist-upgrade or aptitude -f dist-upgrade, then the sources which synaptic wrote into sources.list are not sufficient to get the security updates. (Where synaptic keeps its extra sources, I still don't know.)

When I asked about this on #ubuntu, I was pointed to a page on the Ubuntu wiki which walks you through selecting sources in synaptic. Unfortunately, the screenshots on the wiki show lots of sources that none of my Ubuntu machines show, and the wiki doesn't give you the sources.list lines or tell you what to do if synaptic doesn't automagically show the security sources.

The solution: to edit /etc/apt/sources.list and make sure the following lines are there (which some of the people on the IRC channel were kind enough to paste for me):

## All officially supported packages, including security- and other updates
deb http://archive.ubuntu.com/ubuntu hoary main restricted
deb http://security.ubuntu.com/ubuntu hoary-security main restricted
deb http://archive.ubuntu.com/ubuntu hoary-updates main restricted
In addition, if you use "universe" and "multiverse", you probably also want these lines:
deb http://archive.ubuntu.com/ubuntu hoary universe multiverse
deb http://security.ubuntu.com/ubuntu hoary-security universe multiverse
deb http://archive.ubuntu.com/ubuntu hoary-updates universe multiverse

Tags: , ,
[ 22:49 Aug 14, 2005    More linux | permalink to this entry | ]

Thu, 11 Aug 2005

Linuxworld San Francisco, 2005

There's really not much to say about Linuxworld this year. It was smaller than last year (they moved it across the street to the "little" Moscone hall) and the mood seemed a bit subdued.

SWAG was way down: to get anything remotely cool you generally had to register to watch a presentation that gave you a chance to get something to wear that would enter you for a chance to win something cool later. Or similar indirections. You had to be pretty desperate. But maybe people were, since I saw lines at some of the booths.

I did my annual sweep of the big booths to see who was running Linux on their show machines. This year was the first time that all the major booths used predominately Linux (except on machines running fullscreen presentation software, where it's impossible to tell). It was a huge change from past shows -- I stopped keeping tabs after a while. I saw only one or two confirmed Windows machines each at most of the big booths, like Intel, AMD, IBM, Sun, and even HP. They seemed fairly evenly divided between SuSE and Redhat.

At the AMD booth, lots of machines sported cardboard signs saying "Powered by Redhat" or "Powered by SuSE". One of the "Powered by Redhat" machines clearly had a Start menu, so I had to ask. The AMD rep gave me a song and dance about virtualization technologies, pointing out that although the machine was running Windows, it displayed both Redhat and SuSE windows which he said were running on the same machine. Okay, that's a perfectly good reason to be running Windows at a Linux convention. No points off there. I suspect most of the booths showing Windows had similar excuses.

"Virtualization is the wave of the future! Everybody here is displaying virtualization technologies," the AMD rep told me. Indeed, virtualization was everywhere. I don't know that I'm convinced it's the wave of the future, but there was no question that it was the wave of the present at this year's Linuxworld.

Sweeping the hall, I passed by the Adobe booth, where someone was giving a presentation to an audience of maybe ten people. The projector showed a window which showed ... nothing. A blank window border with nothing inside. "Now, it's connecting to San Jose", explained the presenter with apparent pride, "to get permission to display the document." I kept walking . It hadn't finished connecting yet by the time I was out of earshot. Perhaps the audience was somehow persuaded by this demo to buy Adobe software. I guess you never know what people will like.

A bit past Adobe was the weirdest booth of the exhibit hall: SolovatSoft, offering offshore software development at rates starting at $18/hour. Honest, this was an actual booth at Linuxworld. I should have taken my camera.

Gone were most of the nifty embedded Linux displays of yesteryear. I saw only two: one (Applieddata.net, I think) which I've seen there before, showing an array of fun-looking custom embedded platforms of all sizes, and another showing Linux on various cellphones and similar consumer devices. Only one laptop maker (Emperor) made it there, and none of the smaller-than-laptop manufacturers -- I was hoping Nokia, Sharp, Psion or some other maker of nifty Linux PDAs might be there.

The "Dot Org Pavilion", the place where free software groups like Debian, Mozilla, the FSF, and the EFF have their booths, was on a completely separate floor, and would have been easy to miss if you didn't look at the maps in the convention guide. But it wasn't all bad: someone on a LUG mailing list pointed out that this put them in a nice quiet area away from the raucous advertising of the big commercial booths in the main hall, so you could actually have a conversation with the booth folks. Also, the dot-orgs got a nice view out the second-floor windows compared to the cavernous indoor commercial hall.

I only went to one keynote, "The Explosive Growth of Linux and Open Source: What Does It All Mean?" The description made it look like a panel discussion, but it was really just five prepared speeches: three suits repeating buzzwords (Dave and I amused ourselves counting the uses of the word "exciting", and with Toastmasters reflexes I couldn't help counting the "ah"s) and two more interesting talks (well, okay, Eben Moglen was also wearing a suit but at least he didn't spend his whole talk telling us about the exciting opportunities ahead for company X).

I would have liked to have heard Mike Shaver's keynote on web technologies, but it wasn't worth going back to San Francisco for a second day just for that.

In the end, the real highlight of the day was hooking up with Sonja at the Novell/SuSE booth for a nice lunch. Hooray for conferences that give you an excuse to meet friends from far away! Catching up with some of the Mozilla crowd was good, too. That made the trip worth it even if the exhibit hall didn't offer much.

Tags: , ,
[ 22:25 Aug 11, 2005    More conferences | permalink to this entry | ]

Fri, 05 Aug 2005

Second Round of Nestlings

Both the mourning doves and the mockingbirds snuck in in a third round of nesting this year. Rather than make lots of little entries, I kept the timeline all in one (long) file. If nothing else, it's easy to skip for anyone who doesn't like "bird columns" (taking a cue from Jon Carroll and his "cat columns").

Jun 24:

There's a little drama going on on the roof of the house across from the office window. a pair of doves showing extreme interest in the rain gutters at the corner of the porch and above it at the corner of the house (flanking the tree where they raised their chicks last month). She (I assume) will fly to the porch gutter, snuggle down in the gutter for five or ten seconds, then appear dissatisfied and fly over to the other gutter, do the same there, fly to the ground, fly up to the roof, coo for a while, then repeat the process. Meanwhile her mate flies from the roof to the ground to the power line, cooing the whole time.

At one point, one of the dovelets flew to the roof just above the gutter and started pecking for gravel, and mom chased him away furiously. No more parenting for you! Get your own place! Get a job, why don't you? And cut your hair!

The scaly dovelet still looks scaly. I wonder why? The other chick looks like a miniature adult.

Unfortunately we had to disturb the little episode because the porch gutter the dove kept landing on had come loose. Dave went out with a hammer and hammered it back into place, but I guess that spooked the doves. Which may be just as well -- an exposed rain gutter really doesn't seem like a good place for a nest, especially since the youngsters seem to avoid sun, fun though it might be to have the nest right out in plain view of the window.

Jun 25:

The doves seem to have been scared off by the hammering of the rain gutter, and are looking elsewhere for a nesting site. There's lots of ooohaaahing going on while they're up on the power lines, and once I saw the male trying to mate (the female flew away). Haven't seen the dovelets since mom chased one off the roof.

Jun 28:

The doves are back, cooing and nestling in the gutter. Looks like she really likes that site.

Jun 29:

She's given up on the roof and gutter and has decided to nest in the old nest site in the guava tree.

July 2:

One dove now stays in the nest at all times -- I suspect there's an egg there -- while her mate furiously brings her sticks one after another. When he's not bringing sticks for the nest, he's up on the wires singing Oooaah, oooh oooh oooh!

July 3

Turns out there's a mockingbird nest in the pyrocanthus just outside the kitchen window. We can see it from the sink. The mocker hardly spends any time there, though. The dove is still sitting patiently in the nest.

July 5

Dave cleaned the outside of the kitchen window so we could get a better view of the nest. Haven't seen the mocker since; we may have scared her off.

July 7

The mocker wasn't scared off after all. I saw her perched on the edge of the nest, poking into the nest. I couldn't tell if she was rearranging eggs or feeding chicks. No chick noises, though. The dove still sitting. Of course, it's impossible to tell when dove chicks hatch since they are silent and motionless until nearly ready to fledge.

July 10

Mocker perched on the edge of the nest again, but this time we saw the chicks. She hunted about four bugs for them in quick succession, then disappeared. Amazing how little time the mocker spends in this nest compared to the dove, who's always there.

July 12

One mockingbird chick tentatively seen on the edge of the nest.

July 13

The mockingbird chicks have fledged. I say "chicks" but I've actually only seen one, hopping around the upper branches of the pyrocantha. It doesn't seem to be able to fly yet, and still looks very fuzzy and short-tailed.

And the dove-mom, never flitting,
Still is sitting, still is sitting ...

July 14

Drama outside the bedroom window this morning. Apparently there was a chick down in the neighbor's back yard, and I was awakened by squawking as both mockingbird parents buzzed something in the yard just on the other side of the fence.

This went on for about an hour, with breaks for a few minutes every so often. Then the harrassment abruptly stopped. I don't know whether whatever it is they were attacking (a cat? I didn't hear any barking, so I think the dogs were away) went away, or got the chick. But it's possible the chick may still be okay. A little while later I heard some tentative singing, and about an hour later there was a little bit of squawking aimed at a different part of the neighbor's back yard. My hope is that the chick is slowly making its way out of the yard.

July 17

I haven't seen any more sign of mockingbird chicks, but I heard outside the living room window something that sounded remarkably like a mocker chick and an adult talking to it. So I think at least one chick survived.

The dove, incredibly, is still sitting on the nest. It's possible that there are chicks in there too, but I haven't been able to spot any.

July 25

Incredibly, I think there are actually dovelets in the nest. I had pretty much decided that it must be time for the dove to give up sitting and go get a life, but I'm seeing vague signs of movement in the nest, and slightly different behavior from the sitting dove. Doves sure are patient.

July 26

Tonight when we got home from dinner, we were greeted at the gate by a baby bird hopping around on the driveway. In the dim light it was hard to tell what it was, but probably a sparrow or house finch -- too small for a mockingbird fledgeling.

And fledgeling it was: after regarding us for a short time it flitted unsteadily into the top of a nearby bush, which seemed to us like a much better place for a birdlet to spend the night than the driveway!

There are indeed dovelets in the nest. Looks like two again, though it's hard to see them clearly. The parents look tired; one of them spent part of the afternoon sitting on the deck, out in the open, and didn't move when we walked by. (It wasn't hurt, though; I kept an eye on it through the office window in case I needed to shoo away cats, and it eventually flew weakly up to join its mate in the guava tree.)

July 31

The dovelets are sitting up in the nest and looking very alert. Probably only a few more days left to fledging. The parents are no longer sitting with them, and are up cooing on the wire.

August 2

No dovelets in the nest! I found them in the corner of the yard, the same corner that the previous pair liked so much. They stayed there all morning.

Like the previous pair, there's one that looks like a miniature mourning dove, and a second with a scaly pattern.

But in early afternoon, they were gone. A whiff of cat poo in the air suggested doom.

August 3

There was one dovelet in the corner of the yard this morning. I haven't seen the other, but at least one (the scaly one) survived.

August 5

Haven't seen any dovelets since the morning of the 3rd.

Tags: , ,
[ 23:15 Aug 05, 2005    More nature/birds | permalink to this entry | ]

Mon, 01 Aug 2005

Enabling Remote X

Another in the series of "I keep forgetting how to do this and have to figure it out again each time, so this time I'm going to write it down!"

Enabling remote X in a distro that disables it by default:

Of course, you need xhost. For testing, xhost + enables access from any machine; once everything is working, you may want to be selective, xhost hostname for the hosts from which you're likely to want to connect.

If you log in to the console and start X, check /etc/X11/xinit/xserverrc and see if it starts X with the -nolisten flag. This is usually the problem, at least on Debian derivatives: remove the -nolisten tcp.

If you log in using gdm, gdmconfig has an option in the Security tab: "Always disallow TCP connections to X server (disables all remote connections)". Un-checking this solves the problem, but logging out won't be enough to see the change. You must restart X; Ctrl-Alt-Backspace will do that.

Update: If you use kdm, the configuration to change is in /etc/kde3/kdm/kdmrc

Tags: , ,
[ 13:52 Aug 01, 2005    More linux | permalink to this entry | ]

Sat, 30 Jul 2005

"I'm sorry, Dave, but I can't let you have your disk back"

I got a new, large, and most important, quiet disk for my laptop.

The first Linux distro I installed on it was Ubuntu. Since quiet was my biggest incentive for buying this disk (the old IBM disk was so loud that I was embarassed to run the laptop in meetings), as soon as the install was finished I carried the laptop into a quiet room to listen to the disk,

Turns out it was making a faint beep-beep noise every second or two, plus some clicking in between.

Another, non-Linux, operating system installed on the same disk does not make these beeping or clicking noises. It was clearly something Ubuntu was doing.

After a long series of ps and kill, I finally narrowed the problem down to hald. HAL is polling my disk, once per second or so, in a way that makes it beep and click.

(HAL, if you're not familiar with it, is the Hardware Access Layer which works hand in hand with the kernel service udev to monitor hardware as it comes and goes. No one seems to know where the dividing line is between udev and hal, or between the daemons udevd and hald. Most systems which enable one, enable both.)

I floated down to the control room to dismantle HAL, humming "Daisy".

But it turned out I didn't need to kill HAL entirely. The polling apparently comes from HAL's attempt to query the CDROM to see if anything has been inserted. (Even if there is no CDROM connected to the machine. Go figure!)

The solution is to edit /etc/hal/hald.conf, and change true to false under <storage_media_check_enabled> and <storage_automount_enabled_hint>. This changes hald from a "blacklist" policy, where everything is polled unless you blacklist it, to a "whitelist" policy, where nothing is polled unless you whitelist it. Voila! No more polling the disk, and no more beepy-clicky noises. I suspect my drive will last longer and eat less battery power, too.

Tags: ,
[ 20:00 Jul 30, 2005    More linux | permalink to this entry | ]

Fri, 29 Jul 2005

Switching from Debian to Ubuntu; Dependencies To Build GIMP

I've switched my desktop machine from straight Debian (unstable, or "sid") to Ubuntu "Hoary Hedgehog". Sid was just getting too unstable for me (I'd been spoiled because it really has been pretty stable, except for printing problems, for the past few years). Freetype now has rendering problems, so any fixed width terminal font is nearly unreadable and many PDFs aren't readable at all. There are issues related to the switch to gcc 4. But the last straw was when printing to my Epson C86 stopped working.

(I try to make a point of mentioning bug numbers when I whine about open source issues. The freetype problem with terminal fonts was already reported as bug 315150, and I opened bug 319068 on the pdf issue though I suspect it's part of the same problem. The gcc4 issues are well known and are just transitional issues. I didn't bother reporting the printer regression; after over a year of having similar bugs for my old printer ignored, finally giving up and buying a new printer specifically so that I could continue to run Debian, it's hard to have much confidence that reporting printing bugs is worthwhile.)

The switchover to Ubuntu was surprisingly painless. The install went fairly smoothly, and in half a day I was up and running with my environment (currently fvwm) customized the way I wanted it. The only problems I've had with hoary are poor rendering of fixed-width fonts (not as poor as sid with the freetype bug, but a lot worse than debian used to be) and inability to play mp3 (I suspect I'll hit problems with other formats such as wmv as well, but I haven't tried yet). The font problem is quite annoying and no change I make to /etc/fonts/local.conf seems to make any difference. The mp3 problem probably requires downloading and hand-installing something -- I hear rumours that there's nothing apt-gettable which will make non-free formats work, though that seems odd for a distro aimed at desktop users.

Update 7/31: Turns out there are hoary packages for mp3 handling after all. Search for "mad" rather than "mp3", e.g. xmms-mad adds mp3 support to xmms.

But first I had to set up a development environment. Ubuntu's install is very minimal, since it uses only a single CD. It doesn't even install gcc by default. So I enabled all the ubuntu sources (restricted, universe, multiverse) and I've been gradually adding packages to get back everything I had on sid.

GIMP (2.3, from CVS) seemed like a good build test. Assembling the dependencies was straightforward but time consuming. Since people new to building GIMP are often confused about what they'll need, I kept track of the additional packages I needed, and posted the full list on my GIMP building page.

Tags:
[ 12:24 Jul 29, 2005    More gimp | permalink to this entry | ]

Tue, 26 Jul 2005

New Pho

Pho 0.9.5-pre4 seems to be working pretty well and fixes a couple of bugs in pre3, so I posted a tarball. I really need to quit this pre- stuff and just release 0.9.5. Soon, really!

Tags:
[ 12:51 Jul 26, 2005    More programming | permalink to this entry | ]

Fri, 22 Jul 2005

When gnome loses all your settings

This has bitten me too many times, and I always forget how to recover. This time I'm saving it here for posterity.

The scene: you wanted to check something, perhaps a window manager theme or a font setting or something, and innocently ran some gnome app even though you aren't running a gnome desktop.

Immediately thereafter, you notice that something has changed disastrously in your gtk apps, even apps that were already running and working fine. Maybe it's your keyboard theme, or maybe fonts or colors.

Now you're screwed: your previous configuration files like ~/.gtkrc-2.0 don't matter any more, because gnome has taken over and Knows What's Best For You. How do you fix it?

Don't bother looking for apps that start with gnome-- or gtk-. That would be too obvious. You might think that gnome-control-center would have something related ... but mwa-ha-ha, you'd be wrong!

The solution, it turns out, is gconf-editor, an app obviously modeled after regedit from everyone's favorite user interface designer, Microsoft.

In the case of key theme, you'll find it in desktop->gnome->interface->gtk_key_theme.

Tags: ,
[ 17:39 Jul 22, 2005    More linux | permalink to this entry | ]

Sun, 17 Jul 2005

Seal Nookie

Dave and I spent the morning swapping processors. He's letting me use his old P3 Tualatin to replace the Sempron based system I bought.

The Sempron was what I came up with after I had no luck finding a working motherboard to replace the one that died on my beloved old (quiet and cool) Tualatin machine. The machine always ran too hot. At least, everyone seemed shocked when I mentioned that it typically ran at 59-62°C with the case open and an extra fan blowing onto the chip, and more like 75°C with the case closed (so I've been running it with the case permanently open, which means it's a lot noiser).

That's the second time I've gotten burned by AMD. They make fast chips, but I don't care about speed: I care about cool and quiet operation for the machine I run day in and day out. Intel's no better, as long as a P4 is all you can buy for a desktop machine. The Via C3 line seems to be the only option until Intel finishes their promised switch to desktop processors based off the Centrino line. (I hope when those finally arrive, they're available in a version without DRM.)

After the machine swap was finished, the day had heated up, we headed over the hill to my favorite beach, Bean Hollow, to check out the tidepools and tafoni and harbor seals.

The tidepools had a decent selection of crabs up to about 3 inches as well as goggles of small hermit crabs (mostly in shells of some sort of purple snail).

Apparently it's harbor seal mating season. At least, we guessed that's what they were doing, though they might have just been playing in groups of two, with much flipper-splashing and nuzzling, and crowds of other seals gathered around to watch. There was also a lot of loud, rude sounding snorting from solo seals swimming nearby.

The seals' coats are very colorful, much more so than in spring when they're raising pups. The rocks were covered with seals sporting black-spotted white, white-spotted black, yellow, orange, and red. Quite a change from their spring colors of dark silver to black. One web reference I found said they molt after the pups are weaned, so perhaps these colors represent their fresh coats, which gradually turn duller as they age.

The bright colors are much more photogenic, too. They stand out from the rocks, especially the white youngster who obligingly ran through a gamut of cute poses for me, relaxing, looking alert, scratching, yawning, rolling over, and finally some seal yoga: I didn't know such seemingly ungainly animals could scratch their heads with their back flippers!

Tags:
[ 00:15 Jul 17, 2005    More nature | permalink to this entry | ]

Sun, 10 Jul 2005

Dark Side of the Moon; M51 Supernova

Yesterday was the annual Fremont Peak Star-b-q. This year the weather managed to be fairly perfect for observing afterward: the fog came in for a while, making for fairly dark skies, and it wasn't too cold though it was a bit breezy. It was even reasonably steady.

I had my homebuilt 8" dob, while Dave brought his homebuilt 12.5". Incredibly, we were all alone in the southwest lot: the most Star-b-q was fairly lightly attended, and most of the handful who stayed to observe afterward set up at Coulter row.

The interesting sight of the evening was the supernova in M51 (the Whirlpool galaxy). It was fairly easy in the 12.5" once we knew where to look (Mike Koop came over to visit after looking at it in the 30"), and once we found it there all three of us could see it in the 8" as well.

We had excellent views of Jupiter in the 8", with detail in the red spot, the thin equatorial band easily visible, and long splits in both the northern and southern equatorial bands. I didn't make any sketches since a family wandered by about then so I let them look instead.

We also had lovely low-power views of Venus and crescent Mercury, and we spent some time traversing detail on the dark side of the slim crescent moon due to the excellent earthshine. All the major maria were visible, and of course Aristarchus, but we could also see Plato, Sinus Iridum, Kepler, Copernicus and its ray system, Tycho (only in the 12" -- the 8" was having glare problems that close to the lit part of the moon) and one long ray from Tycho that extended across Mare Nubium and out to near Copernicus. Pretty good for observing the "dark" side!

Neither of us was able to find Comet Tempel-1 (the Deep Impact comet), even with the 12.5". But after moonset I picked up the Veil and North American in the 8" unfiltered (having left my filters at home), and we got some outstanding views of the nebulae in Sagittarius, particularly the Trifid, which was showing more dust-lane detail without a filter than I've ever seen even filtered.

It was a good night for carnivores, too. We saw one little grey fox cub trotting up the road to the observatory during dinner, and there was another by the side of the road on the way home. Then, farther down the road, I had to stop for three baby raccoons playing in the street. (Very cute!) They eventually got the idea that maybe they should get off the road and watch from the shoulder. The parents were nowhere to be seen: probably much more car-wise than their children (I don't often see raccoon roadkill). I hope the kids got a scolding afterward about finding safer places to play.

Tags: ,
[ 23:31 Jul 10, 2005    More science/astro | permalink to this entry | ]

Tue, 28 Jun 2005

Freeway Fire

Some jerk decided it would be funny to throw a lit firecracker into the dry brush beside the freeway a few blocks away from where I live, with predictable results.

Fortunately the fire department responded incredibly quickly (must have been less than five minutes from when I heard the bang to when the fire truck arrived) and they were able to put the fire out before it spread far.

I hope someone saw whoever threw the firecracker, and got a license plate.

Tags:
[ 23:12 Jun 28, 2005    More misc | permalink to this entry | ]

Mon, 27 Jun 2005

Open Office Losing Its Mind

I needed to use OpenOffice today, and got a nasty surprise: it no longer remembered any of my settings, key bindings, or any of those painfully-installed templates I'm required to use for this project.

It turns the version of OpenOffice.org I pulled in with the last Sid upgrade, 1.1.4, has a nifty new feature: it has no knowledge of the ~/.openoffice/1.1.1 directory its predecessor used for its configuration, and instead wants to use ~/.openoffice/1.1.0. Does it notice that there's an existing config directory there, and offer to migrate it? No! Instead, it silently makes a new 1.1.0 directory, with all-default settings, and uses that. The effect to the user is that all your settings and templates have suddenly disappeared for no obvious reason.

The fact that the new version uses a seemingly older version number for its configurations is a nice twist. Perhaps they were worried that otherwise some enterprising user might figure out what had happened, and actually recover their settings, rather than wasting hours painfully resetting them one by one.

Aside: it's impressively hard to read OOo's settings to figure out which ones might be yours. For example, here's a sample line which binds Ctrl-H to delete-backward-char:

 <accel:item accel:code="KEY_H" accel:mod1="true" xlink:href="slot:20926"/>
(You can still tell it involves the "h" key somehow. But I bet they're working on purging that shameful bit of human readable information.) That adds a touch of extra spice to the challenge of figuring out which set of files is the right one.

Anyway, if this happens to you, move the 1.1.0 directory somewhere else, then rename or cp -a 1.1.1 to 1.1.0. That seems to bring back the lost settings.

Tags: ,
[ 22:22 Jun 27, 2005    More linux | permalink to this entry | ]

Catching Up on Firefox Regressions

I spent a little time this afternoon chasing down a couple of recent Firefox regressions that have been annoying me.

First, the business where, if you type a url into the urlbar and hit alt-Enter (ctrl-Enter in my Kitfox variant) to open a new tab, if you go back to the old tab you still see the new url in the urlbar, which doesn't match the page being displayed there.

That turns out to be bug 227826, which was fixed a week and a half ago. Hooray!

Reading that bug yielded a nice Mozilla tip I hadn't previously known: hitting ESC when focus is in the urlbar will revert the urlbar to what it should be, without needing to Reload.

The other annoyance I wanted to chase down is the new failure of firefox -remote to handle URLs with commas in them (as so many news stories have these days); quoting the url is no help, because it no longer handles quotes either. That means that trying to call a browser from another program such as an IRC client is doomed to fail for any complex url.

That turns out to be a side effect of the check-in for bug 280725, which had something to do with handling non-ASCII URLs on Windows. I've filed bug 298960 to cover the regression.

That leaves only one (much more minor) annoyance: the way the selection color has changed, and quite often seems to give me white text on a dingy mustard yellow background. I think that's because of bug 56314, which apparently makes it choose a background color that's the reverse of the page's background, but which then doesn't seem to choose a contrasting foreground color.

It turns out you can override this if you don't mind specifying a single fixed set of selection colors (instead of having them change with the colors of every page). In userChrome.css (for the urlbar) and userContent.css (for page content):

::-moz-selection {
  background-color: magenta;
  color: white;
}
(obviously, pick any pair of colors which strikes your fancy).

Tags: , , ,
[ 21:45 Jun 27, 2005    More tech/web | permalink to this entry | ]

Wed, 22 Jun 2005

Helpful Vim Tip: Finding Syntax for Colors

An upgrade from woody to sarge introduced a new problem with editing mail messages in vim: Subject lines appeared in yellow, against my light grey background, so they weren't readable any more.

Vim color files have always been a mystery to me. I have one which I adapted from one of the standard color schemes, but I've never been clear what the legal identifiers are or how to find out. But I changed both places where it said "ctermfg=Yellow" to another color, and nothing changed, so this time I had to find out.

Fortunately a nice person on #vim suggested :he synID (he is short for "help", of course) which told me all I needed to know. Put the cursor on the errant line and type: :echo synIDattr(synID(line("."), col("."), 1), "name")

That told me that the Subject line was syntax class "mailSubject". So I tried (copying other lines in my color file) adding this line:

hi mailSubject term=underline ctermfg=Red guifg=Red
and now all is happy again in vim land. I wish I'd learned that synID trick a long time ago!

Tags: , , ,
[ 10:59 Jun 22, 2005    More linux/editors | permalink to this entry | ]

Tue, 21 Jun 2005

A Fast Volume Control App

I updated my Debian sid system yesterday, and discovered today that gnome-volume-control has changed their UI yet again. Now the window comes up with two tabs, Playback and Capture; the default tab, Playback, has only one slider in it, PCM, and all the important sliders, like Volume, are under Capture. (I'm told this is some interaction with how ALSA sees my sound chip.)

That's just silly. I've never liked the app anyway -- it takes forever to come up, so I end up missing too much of any clip that starts out quiet. All I need is a simple, fast window with a single slider controlling master volume. But nothing like that seems to exist, except panel applets that are tied to the panels of particular window managers.

So I wrote one, in PyGTK. vol is a simple script which shows a slider, and calls aumix under the hood to get and set the volume. It's horizontal by default; vol -h gives a vertical slider.

Aside: it's somewhat amazing that Python has no direct way to read an integer out of a string containing more than just that integer: for example, to read 70 out of "70,". I had to write a function to handle that. It's such a terrific no-nonsense language most of the time, yet so bad at a few things. (And when I asked about a general solution in the python channel at [large IRC network], I got a bunch of replies like "use int(str[0:2])" and "use int(str[0:-1])". Shock and bafflement ensued when I pointed out that 5, 100, and -27 are all integers too and wouldn't be handled by those approaches.)

Tags: , , ,
[ 15:54 Jun 21, 2005    More programming | permalink to this entry | ]

Mon, 20 Jun 2005

GIMP Menu Reorganization

I'm working with the GIMP developers to do some minor reorganization of some of the menus.

In particular, we wanted to get things like script-fu and python-fu out of the menus so users don't have to know what language a function is written in to use it.

That part of the patch (for the image window; the Toolbox Xtns menu reorganization is still pending) got checked in a few days ago. Sven is now soliciting comments on the next step on his Planet Gnome blog. The proposal for the next step is in bug 116145. There haven't been many comments; I encourage anyone interested in GIMP's menus to read that bug and comment in it.

The Toolbox Xtns menu reorganization is a bit more complicated, since there are two conflicting proposals, in bug 145507 and bug 158980. I tried to suggest just moving stuff out of the Script-Fu menu for now, since there's no agreement on further changes yet, but that went over like a lead balloon.

So it's back to the image window's Filters menu. If there aren't any comments in a few more days I'll just go ahead with the proposal in the bug.

Maybe I'll even get to use my shiny new CVS access to check the changes in myself. Woo!

Tags:
[ 11:49 Jun 20, 2005    More gimp | permalink to this entry | ]

Sat, 18 Jun 2005

Dove Chicks Fledged

The two dove chicks fledged yesterday, early in the morning. By the time we were up, they were out in the yard, walking behind one parent and play-pecking in the weeds. They can fly: Dave saw them fly up to the fence once, then back down.

That didn't last long, though; after about fifteen minutes of activity they found a corner they liked, under the blue borage, planted themselves there in the shade of the fence, and didn't move until afternoon when the sun hit their corner and they went off in search of shade. They definitely prefer shade to direct sunlight (even on a cool and windy day). The parents came to feed them periodically.

They're still eerily silent. They never call for food, or for anything else. Very different from last year's mockingbird chicks. When they fly they make the normal dove squeaky noise that the adults make, but that's the only sound I've heard out of either one.

They look quite different from each other: one is a miniature adult, while the other is a bit smaller, usually more ruffled, and has a "scale" pattern in its feathers. They apparently spent the night somewhere high -- we saw them fly up to the roof a little after sunset, then they walked over to where we couldn't see them any more.

In the morning, they were back in their corner, still content to sit in the same spot all day. I spooked them once doing some garden work in that corner of the yard, and one of them flew across the yard and landed on the fence, and spent the next hour or so there before flying back to the normal corner. Later, the other flew up into the atlas cedar for no apparent reason, then spent a while trying to figure out how to get a solid perch on the swaying, uneven branches.

Meanwhile, the house sparrows were doing bushtit imitations all over the tree, hanging upside down while pecking at the needles. I'm not sure if they were after the cones, or actually eating bugs for a nesting season protein supplement, but it was fun to see a flock of house sparrows acting like bushtits.

A few photos of the dovelets.

Tags: , ,
[ 20:36 Jun 18, 2005    More nature/birds | permalink to this entry | ]

Fri, 17 Jun 2005

The Game of Telephone

Remember the game of "Telephone" when you were a kid? Everybody gets in a big circle. One kid whispers a message in the ear of the kid next to them. That kid repeats the message to the next kid, and so on around the circle. By the time the message gets back to the originator, it has usually changed beyond recognition.

Sometimes the Internet is like that.

Background: a year and a half ago, in August 2003, there was an unusually favorable Mars opposition. Mars has a year roughly double ours, so Mars "oppositions" happen about every two years (plus a few months). An opposition is when we and Mars are both on the same side of the sun (so the sun is opposite Mars in our sky, and Mars is at its highest at midnight). We're much closer to Mars at opposition than at other times, and that makes a big difference on a planet as small as Mars, so for people who like to observe Mars with a telescope, oppositions are the best time to do it.

The August 2003 opposition was the closest opposition in thousands of years, because Mars was near its perihelion (the point where it's closest to earth) at the time of the opposition. Much was made of this in the press (the press loves events where they can say "best in 10,000 years") to the point where lots of people who aren't normally interested in astronomy decided they wanted to see Mars and came to star parties to look through telescopes.

That's always nice, and we tried to show them Mars, though Mars is very small, even during an opposition. The 2003 opposition wasn't actually all that favorable for those of us in northern hemisphere. because Mars was near the southernmost part of its orbit. That means it was very low in the sky, which is never good for seeing detail through a telescope. Down near the horizon you're looking through a lot more of Earth's atmosphere, and you're down near all the heat waves coming off houses and streets and even rocks. That disturbs the view quite a bit, like trying to see detail on a penny at the bottom of a swimming pool.

This year's opposition, around Halloween, will not be as close as the 2003 opposition, but it's still fairly close as oppositions go. Plus, this year, Mars will be much farther north. So we're expecting a good opposition -- weather permitting, both on Earth, which is sometimes cloudy in November, and on Mars, where you never know when a freak dust storm might appear.

Which brings me back to the game of Telephone.

A few weeks ago I got the first of them. An email from someone quoting a message someone had forwarded, asking whether it was true. The message began:

The Red Planet is about to be spectacular! This month and next, Earth is catching up with Mars in an encounter that will culminate in the closest approach between the two planets in recorded history.
and it ended:
Share this with your children and grandchildren. NO ONE ALIVE TODAY WILL EVER SEE THIS AGAIN
(sic on the caps and the lack of a period at the end).

I sent a reply saying the email was two years out of date, and giving information on this year's Mars opposition and the fact that it may actually be better for observing Mars than 2003 was. But the next day I got a similar inquiry from someone else. So I updated my Mars FAQ to mention the misleading internet message, and the inquiries slowed down.

But today, I got a new variant.

Subject: IS MARS GOING TO BE AS BIG AS THE MOON IN AUGUST?

As big as the moon! That would be a very close opposition!

(Dave, always succinct, said I should reply and say simply, "Bigger." Mars is, of course, always bigger than the moon, even if its apparent size as viewed from earth is small.)

It looks like the story is growing in the telling, in a way it somehow didn't two years ago.

I can't wait to see what the story will have become by August. Mars is going to hit us?

Tags: ,
[ 11:48 Jun 17, 2005    More science/astro | permalink to this entry | ]

Thu, 16 Jun 2005

More Baby Birds

The mourning dove chicks by the back door remain amazingly quiet. They're growing fast, nearly half the size of an adult dove now, with fairly adult looking feathers, the characteristic wing spots of their parents, and eyes that are starting to show a blue ring. There are only two of them, not three as I'd originally thought. They move outside of the nest onto adjacent branches, fiddle, flutter a little, and preen a lot. Yet they never make any noise. Quite a change from the noisy, demanding mockingbird chicks last year!

A female Nuttall's woodpecker showed up in the backyard yesterday. I heard her drumming this morning. Maybe she'll stick around. I put out a peanut-and-sunflower cake that woodpeckers are supposed to like, though birds in this yard never seem to like the foods the books and bird feeder companies say they will.

The towhee and house finch families still seem to be raising their young, but I haven't gotten a glimpse of any chicks yet. The mockingbird who shunned us earlier in the season seems to have moved into the atlas cedar for his second nest (or is it a third?) and is singing in the morning and squawking at jays by day.

Meanwhile, I dropped by Shoreline around lunchtime today and got some photos of a pair of avocets with one chick, including the rare 4-legged avocet (where the chick hides underneath mom, so only his legs are visible). I also got a couple of nice shots of a stilt flying at Alviso.

Other neat sights: a nesting colony of great egrets in a tree outside a business park, a bedraggled but still pretty snowy egret at Shoreline Lake, and the terns banking ten feet away from me as they fished in the shallows of the little lake.

Tags: , ,
[ 19:50 Jun 16, 2005    More nature/birds | permalink to this entry | ]

Sat, 11 Jun 2005

Baby Birds

On a hike a few days ago we saw a baby swallow on the trail. So cute! He didn't appear to be hurt, but wasn't moving, either. It was soo tempting to move him, or take him home and feed him. But adult swallows were flying all around, and he was old enough that he had all his feathers (probably old enough to fledge) so we left him there and hoped someone would take care of him.

Meanwhile, back at home, house finches are raising a family in the Italian cypress outside the office, and a pair of mourning doves has taken over the nest the mockingbirds built last year in the guava tree outside the back door. It doesn't look like they rebuilt or improved the nest at all: the mockingbird-sized nest looks very small under a big mourning dove.

The chicks hatched several days ago, but I didn't realize it for at least a day, because the dove chicks are quiet and motionless, not at all like the active, noisy, demanding mockingbird chicks were. The dovelets act just like eggs, except they're fuzzier and occasionally I can catch a glimpse of wing feathers. I think there are three.

The adult doves are a lot calmer than the mockingbirds were, as well. The mocker parents would get angry any time they noticed a human trying to watch them through the window, and would hop up to the window and glare and squawk until the person went away. It was tough to catch a glimpse of the chicks.

The doves, on the other hand, spend a lot of time out of the nest now that the chicks have hatched (though before they hatched, there was always a dove on the nest: the sitting dove wouldn't leave until its mate arrived to take over) and even when they're there they're pretty calm, keeping an eye on anyone who tries to look through the window but not seeming too upset about it. I can't tell if they're frightened by being watched, but I try not to watch for long when an adult is there. (That's easy since there's nothing much to see anyway.)

I haven't seen any feeding yet, or other interesting behavior. Maybe they'll get more active when they're a little older.

Tags: , ,
[ 13:28 Jun 11, 2005    More nature/birds | permalink to this entry | ]

Tue, 07 Jun 2005

Zeno's Stump

A house down the street just sold. It had an interesting large tree in the front yard, some sort of yucca: an odd looking desert tree with several thick branching trunks, spiky bayonet leaves and sometimes big clumps of white flowers.

The new owners apparently didn't like the stark desert tree. No sooner had the For Sale signs come down than a crew was at work with chainsaws.

The upper parts of the trunks, and all the foliage, were quickly cut off and tossed in the street. Then the real chainsaw games began.

It turns out that the trunks of this tree (at least four trunks, connected at the base) are each quite a bit larger in diameter than a chainsaw's blade. Even going from both sides, a chainsaw can't really cut through them.

It's been a couple of weeks since the top bits of the yucca tree got dragged away. Every day, we hear chainsaws in the late morning, and chainsaws again for a while in the afternoon, as workers whittle at the tops and edges of the stump containing the bases of the four trunks. Every time I go by, the stump has gotten a little smaller: a few inches here, a few inches there. Chips and slivers of wood join the pile in the street by the curb. Hand saws and axes sit wedged at strategic places in the stump.

I'm finally seeing Zeno's Paradox in action. You remember Zeno's paradox? You're trying to get from A to B in a finite time: so first you must go half the distance, which also takes a finite time. But to do that, you must first go half that distance; and since you can divide the distances in half infinitely, you can never get to the finishing line, because it would take an infinite number of finite time intervals.

The pile of wood by the curb gets larger every time I look.

And yet ... somehow Zeno's Stump doesn't look any smaller.

Tags:
[ 22:09 Jun 07, 2005    More misc | permalink to this entry | ]

Fri, 03 Jun 2005

Ubuntu "Hoary Hedgehog" on a Vaio SR17 Laptop

I've been experimenting with Ubuntu's second release, "Hoary Hedgehog" off and on since just before it was released.

Overall, I'm very impressed. It's quite usable on a desktop machine; but more important, I'm blown away by the fact that Ubuntu's kernel team has made a 2.6 acpi kernel that actually works on my aging but still beloved little Vaio SR17 laptop. It can suspend to RAM (if I uncomment ACPI_SLEEP in /etc/defaults/acpi-support), it can suspend to disk, it gets power button events (which are easily customizable: by default it shuts the machine down, but if I replace powerbtn.sh with a single line calling sleep.sh, it suspends), it can read the CPU temperature. Very cool.

One thing didn't work: USB stopped working when resuming after a suspend to RAM. It turned out this was a hotplug problem, not a kernel problem: the solution was to add calls to /etc/init.d/hotplug stop and /etc/init.d/hotplug start in the /etc/acpi/sleep.sh script. Problem solved (except now resuming takes forever, as does booting; I need to tune that hotplug startup script and get rid of whatever is taking so long).

Sonypi (the jogdial driver) also works. It isn't automatically loaded (I've added it to /etc/modules), and it disables the power button (so much for changing the script to call sleep.sh), a minor annoyance. But when loaded, it automatically creates /dev/sonypi, so I don't have to play the usual guessing game about which minor number it wanted this time.

Oh, did I mention that the Hoary live CD also works on the Vaio? It's the first live linux CD which has ever worked on this machine (all the others, including rescue disks like the Bootable Business Card and SuperRescue, have problems with the Sony PCMCIA-emulating-IDE CD drive). It's too slow to use for real work, but the fact that it works at all is amazing.

I have to balance this by saying that Ubuntu's not perfect. The installer, which is apparently the Debian Sarge installer dumbed down to reduce the number of choices, is inconsistent, difficult, and can't deal with a networkless install (which, on a laptop which can't have a CD drive and networking at the same time because they both use the single PCMCIA slot, makes installation quite tricky). The only way I found was to boot into expert mode, skip the network installation step, then, after the system was up and running (and I'd several times dismissed irritating warnings about how it couldn't find the network, therefore "some things" in gnome wouldn't work properly, and did I want to log in anyway?) I manually edited /etc/network/interfaces to configure my card (none of Ubuntu's built-in hardware or network configuration tools would let me configure my vanilla 3Com card; presumably they depend on something that would have been done at install time if I'd been allowed to configure networking then). (Bug 2835.)

About that expert mode: I needed that even for the desktop, because hoary's normal installer doesn't offer an option for a static IP address. But on both desktop and laptop this causes a problem. You see, hoary's normal mode of operation is to add the first-created user to the sudoers list, and then not create a root account at all. All of their system administration tools depend on the user being in the sudoers file. Fine. But someone at ubuntu apparently decided that anyone installing in expert mode probably wants a root account (no argument so far) and therefore doesn't need to be in the sudoers file. Which means that after the install, none of the admin tools work; they just pop up variants on a permission denied dialog. The solution is to use visudo to add yourself to /etc/sudoers. (Bugs 7636 and 9832.)

Expert mode also has some other bugs, like prompting over and over for additional kernel modules (bug 5999).

Okay, so nothing's perfect. I'm not very impressed with Hoary's installer, though most of its problems are inherited from Sarge. But once it's on the machine, Hoary works great. It's a modern Debian-based Linux that gets security upgrades (something Debian hasn't been able to do, though they keep making noises about finally releasing Sarge). And there's that amazing kernel. Now that I have the hotplug-on-resume problem fixed, I'm going to try using it as the primary OS on the laptop for a while, and see how it goes.

Tags: , , ,
[ 17:29 Jun 03, 2005    More linux | permalink to this entry | ]

Wed, 01 Jun 2005

How to save ALSA sound volume

During Debian upgrades over the last few months, apparently my system's alsa and aumix scripts had a little private battle for control of the mixer, and alsa won. The visible symptom was that my volume was always at 0 when I started up.

I tried re-enabling the aumix script in /etc/init.d, which had previously controlled my default volume, but it just said "Saved ALSA mixer settings detected; aumix will not touch mixer."

The solution, in the end, was to remove /var/lib/alsa/asound.state, set the volume, and run alsactl store. Someone suggested that I use chattr -i to make the asound.state file inviolable; it isn't on an ext2/3 filesystem, so that isn't a solution for me, but if my volume goes wonky again at least I know where to look.

Tags: , ,
[ 10:40 Jun 01, 2005    More linux | permalink to this entry | ]

Geological Society of America (GSA) Conference

The GSA conference happened back when I was too caught in the whirl of events to write about them. It's been a over month now, but I did want to save a couple of impressions.

The field trips all started way too early. Sure, this is the whining of a non-morning person: but really, when your field trip starts with 45 minutes of everybody standing around because the rental agency that rents the vans isn't open yet, maybe that's a sign that starting a little later might be a good idea. Even aside from the wisdom of scheduling all your travel time for the height of rush hour.

The field trips were worthwhile, though. The most interesting parts were often topics that hadn't sounded interesting at all ahead of time.

The talks at the conference were terrific, total information overload, with maybe six sessions going at once. There are lots of people doing interesting research in geology, often fairly junior people (grad students or postdocs), and many of them are even able to talk enthusiastically about their research using words that make sense to a mere student of the subject. Dry jargon-laden talks did exist, but they were the exception, not the rule.

Everybody was friendly, too, and very willing to talk to students and explain their research or chat about other topics in geology. I went to one of the "Roy J. Shlemon student mentoring lunches" featuring a round-robin of geologists moving from one student table to another to share insight and stories: very helpful and interesting!

The conference organizers obviously worship at the altar of Bill Gates. There was apparently a conference-wide dictum that Thou Shalt Use Powerpoint and Thou Shalt Display On Our Windows Boxen, Not Your Own Machine.

The unsurprising result was that roughly 80% of the talks had at least some problems displaying slides, resulting in cursing, then apologies, with the speaker assuring the audience that it would make much more sense if only we could see the slide the way it had been written. Perhaps half of these followed up with a mutter about having to use Windows rather than a Mac. Macs are clearly big with geologists (though alas there was no sign of Linux use).

That said, the conference ran aggressively on time, each session having an appointed watchdog to sit in front and remind the speaker when time was running out. I've never seen a conference stick to a schedule so well, especially when filled with short (20-minute) talks. I had been prepared for the worst after problems getting schedule information before the conference, but the organization on site (except field trips) was flawless.

All in all, quite a good time. I'm only sorry next year's conference isn't back in San Jose. (It's in Alaska; I'd love to go, but finances will probably prevent it.)

Tags: ,
[ 00:04 Jun 01, 2005    More science/geology | permalink to this entry | ]

Mon, 23 May 2005

Geology of Red Rock Canyon

I just finished writing up the final project for my field geology class.

The project involved discovering and mapping the geology of Red Rock Canyon. I'll probably upload the paper and other documents later; for now, just a few notes about the field trip, weekend before last.

Red Rock Canyon is in the Mojave desert, near Ridgecrest. I'd been through a few times before, since it's more or less on the way to Death Valley, but of course didn't know any of the geologic details, other than "Ooh, look at the pretty red and white layers and the eroded hoodoos!"

Actually, it's not technically in the Mojave. One of the reasons Red Rock Canyon is interesting is that it sits at the junction of three of California's geomorphic provinces, at the junction of the Garlock fault (dividing the Mojave from the Basin and Range) and the Sierra Front fault (dividing the Sierra from the other two). The Mojave is bounded on its south end by the transverse section of the San Andreas, but Red Rock Canyon is north of the Garlock fault, in the Basin and Range.

Our four day camping trip (two days of hiking, measuring, and mapping, two days devoted mostly to travel) covered a few square miles around the visitor's center, but we ended up with a surprisingly complete map and stratigraphy. Several people had trouble with the temperatures, which were somewhere in the nineties, combined with the pace of the hikes. That's not really all that hot, especially for desert, but it's hot for a group of people coming out of a bay area winter and an unusually rainy spring, especially the students unused to hiking. (This was all rather ironic since we'd switched our mapping project to Red Rock after being concerned about too much snow at the first choice location, June Lake. Those concerns were probably justified; it was snowing up until a few days before we left, so despite the heat, Red Rock was the right choice.)

Nevertheless, Red Rock is a great location to learn geologic mapping. The structure is fairly simple and easy to see (especially from the top of Whistler's Peak), with a series of cuestas of sedimentary layers each capped with basalt, and a couple of other interesting and distinctive layers in between. Luckily for us, there isn't much complex folding, just a fairly continuous tilt caused by uplift due to the El Paso fault (a branch of the Garlock). The rocks themselves are interesting, with lots of olivine and other crystals in one of the basalt layers, and an area at the base of the other basalt layer containing lovely rocks such as opals -- the area used to be an opal mine.

It's also a fairly nice place to camp, with campsites nestled back among towering cliffs (of the Tr5 fluvial member of the Ricardo formation, if you're curious for details) which provides a bit more privacy and separation from other campers than a lot of parks allow. I'm not really much of a camper (I'm a poor sleeper, and I do like my morning shower) but out campsite converted even the timid non-campers in the class.

White-throated swifts play in the turbulence along the face of the cliffs, calling loudly to each other. Their calls woke me up at daybreak each morning, but setting aside sleep deprivation, it wasn't all bad. It's mating season for the swifts, and it turns out they mate in midair. Two birds come together, and locked together they spiral hundreds of feet downward, finally separating just short of the ground. We have white throated swifts here in the bay area, but I'd never seen anything like their aerial mating dance before; let alone seen it set against towering desert cliffs in the stillness of dawn light.

Other interesting natural phenomena observed on the trip: a barn owl flew over the campsite every night, visible against the campfire light. Zebra-tailed lizards were ghostly white except for their black-ringed tails and some ghostly markings on their backs. We saw lots of jackrabbits and several alligator lizards (the latter have been numerous in the bay area as well, this spring). And we saw a lovely horizontal "rainbow" at mid-day of the first day which turned out, after much research, to be a "circumhorizontal arc". I took a telescope along, but we didn't have very good skies (haze, thin clouds, and disturbed seeing, and with all the campfires it was smoky and not even very dark) so we mostly looked at Jupiter, Saturn, and the moon (we did get good seeing at dusk one night for the moon, and we got a good look at the Mare Nectaris shock rings and the beginnings of Rima Ariadaeus).

A few of our group were disturbed to learn on the way down that they wouldn't have cellphone reception at Red Rock. Horrors! They rushed to tie up loose ends, and managed it before we finally lost reception passing by Mojave.

All in all, a very successful trip, although most of us were awfully glad to get home and jump in the shower. I'm even gladder to have my final report finished. Nevertheless, geologic mapping is fun: I'm happy that I had the chance to complete a map of an area like this. I may even be back to Red Rock some day, to try to trace out the extent of that mystery fault at the north end of the pink tuff breccia layer ...

5/25/2005: photos and report are up.

Tags: ,
[ 20:11 May 23, 2005    More science/geology | permalink to this entry | ]

Sun, 08 May 2005

Wacom Rides Again

Updating the blog again after taking time off for various reasons, including lack of time, homework, paying work, broken computer motherboard and other hardware problems, illness, a hand injury, and so on.

This afternoon, thanks to a very helpful Keir Mierle showing up on #gimp, I finally got all the pieces sorted and I now have a working tablet again. Hurrah!

I've put details of the setup that finally worked on my Linux and Wacom page.

Tags: , ,
[ 19:08 May 08, 2005    More linux | permalink to this entry | ]

Wed, 13 Apr 2005

PyTopo 0.3

I needed to print some maps for one of my geology class field trips, so I added a "save current map" key to PyTopo (which saves to .gif, and then I print it with gimp-print). It calls montage from Image Magick.

Get yer PyTopo 0.3 here.

Tags: , , , ,
[ 17:56 Apr 13, 2005    More programming | permalink to this entry | ]

Tue, 12 Apr 2005

New Debian Font Weirdness

A recent change to the Debian font system has caused some odd font problems which Debian users might do well to know about.

The change has to do with the addition in /etc/fonts of a directory conf.d containing symbolic links to scripts, and the overwriting of some of the existing files in /etc/fonts.

The symptoms are varied and peculiar. On my sid system, on each boot, the system would toggle between two different font resolutions. I'd start xchat, and the fonts would be too teeny to read; so I'd call up the preferences dialog, see the font was at 9, and increase it to 12, at which point I'd see the font I was used to seeing (though the UI font in the tabs would still be teeny). Subsequent runs of xchat would be fine (except for the still-teeny tab fonts). But upon reboot, xchat would come up with the tab font correct and the channel font HUGE. Prefs dialog again: it's still at 12 where I set it last time, so now I reset it to 9, which makes it the right size. Until the next reboot, when everything became teeny again and I have to go back to 12.

The system resolution never changed, nor did the rendering of the bitmapped fonts I use in emacs and terminal clients; only the rendering of freetype scalable fonts changed with each reboot. Back in the days when all fonts were bitmapped, I would have guessed that the font system was alternating between 100dpi fonts and 72dpi fonts.

At a loss as to what might cause this strange behavior, I took a peek into /etc/fonts/conf.d, which Dave had discovered a few weeks ago when he updated his sarge system and all his bitmapped fonts disappeared. Though my problem didn't sound remotely similar to his: my bitmapped fonts were fine, it was the scalable ones which were flaky.

Turns out the symlink I'd aquired in the update, /etc/fonts/conf.d/30-debconf-no-bitmaps.conf, did indeed point to a file called no-bitmaps.conf, just as Dave's had. Just to see what would happen, I removed it, and made a new symlink, 30-debconf-yes-bitmaps.conf, pointing to yes-bitmaps.conf.

Voila! The size-toggling problem disappeared, and, even better, bitmapped fonts like "clean" now show up in gtkfontsel and in gtk font selection dialogs, which they never did before. I can use all my fonts now!

The moral is: if you've updated sarge or sid recently, and see any weirdness at all in fonts, go to /etc/fonts/conf.d and fiddle with the symlinks. Even if it doesn't seem directly related to your problem.

As to why no-bitmaps.conf causes the system to toggle between two different font scalings, that's still a mystery. The only difference between no-bitmaps.conf and yes-bitmaps.conf is that one rejects, and the other accepts, fonts that have "scalable" set to false. Why that would change the scale at which fonts are rendered is beyond me. I'll leave that up to someone who understands the new debian font system. If any such person exists.

Update 5/24/2005: turns out you can change this on a per-user basis too, with ~/.fonts.conf. man fonts.conf for details.

Tags: , ,
[ 22:45 Apr 12, 2005    More linux | permalink to this entry | ]

Sat, 09 Apr 2005

Python Expose vs. Focus

A few days ago, I mentioned my woes regarding Python sending spurious expose events every time the drawing area gains or loses focus.

Since then, I've spoken with several gtk people, and investigated several workarounds, which I'm writing up here for the benefit of anyone else trying to solve this problem.

First, "it's a feature". What's happening is that the default focus in and out handlers for the drawing area (or perhaps its parent class) assume that any widget which gains keyboard focus needs to redraw its entire window (presumably because it's locate-highlighting and therefore changing color everywhere?) to indicate the focus change. Rather than let the widget decide that on its own, the focus handler forces the issue via this expose event. This may be a bad decision, and it doesn't agree with the gtk or pygtk documentation for what an expose event means, but it's been that way for long enough that I'm told it's unlikely to be changed now (people may be depending on the current behavior).

Especially if there are workarounds -- and there are.

I wrote that this happened only in pygtk and not C gtk, but I was wrong. The spurious expose events are only passed if the CAN_FOCUS flag is set. My C gtk test snippet did not need CAN_FOCUS, because the program from which it was taken, pho, already implements the simplest workaround: put the key-press handler on the window, rather than the drawing area. Window apparently does not have the focus/expose misbehavior.

I worry about this approach, though, because if there are any other UI elements in the window which need to respond to key events, they will never get the chance. I'd rather keep the events on the drawing area.

And that becomes possible by overriding the drawing area's default focus in/out handlers. Simply write a no-op handler which returns TRUE, and set it as the handler for both focus-in and focus-out. This is the solution I've taken (and I may change pho to do the same thing, though it's unlikely ever to be a problem in pho).

In C, there's a third workaround: query the default focus handlers, and disconnect() them. That is a little more efficient (you aren't calling your nop routines all the time) but it doesn't seem to be possible from pygtk: pygtk offers disconnect(), but there's no way to locate the default handlers in order to disconnect them.

But there's a fourth workaround which might work even in pygtk: derive a class from drawing area, and set the focus in and out handlers to null. I haven't actually tried this yet, but it may be the best approach for an app big enough that it needs its own UI classes.

One other thing: it was suggested that I should try using AccelGroups for my key bindings, instead of a key-press handler, and then I could even make the bindings user-configurable. Sounded great! AccelGroups turn out to be very easy to use, and a nice feature. But they also turn out to have undocumented limitations on what can and can't be an accelerator. In particular, the arrow keys can't be accelerators; which makes AccelGroup accelerators less than useful for a widget or app that needs to handle user-initiated scrolling or movement. Too bad!

Tags: , , ,
[ 21:52 Apr 09, 2005    More programming | permalink to this entry | ]

Wed, 06 Apr 2005

PyTopo is usable; pygtk is inefficient

While on vacation, I couldn't resist tweaking pytopo so that I could use it to explore some of the areas we were visiting.

It seems fairly usable now. You can scroll around, zoom in and out to change between the two different map series, and get the coordinates of a particular location by clicking. I celebrated by making a page for it, with a silly tux-peering-over-map icon.

One annoyance: it repaints every time it gets a focus in or out, which means, for people like me who use mouse focus, that it repaints twice for each time the mouse moves over the window. This isn't visible, but it would drag the CPU down a bit on a slow machine (which matters since mapping programs are particularly useful on laptops and handhelds).

It turns out this is a pygtk problem: any pygtk drawing area window gets spurious Expose events every time the focus changes (whether or not you've asked to track focus events), and it reports that the whole window needs to be repainted, and doesn't seem to be distinguishable in any way from a real Expose event. The regular gtk libraries (called from C) don't do this, nor do Xlib C programs; only pygtk.

I filed bug 172842 on pygtk; perhaps someone will come up with a workaround, though the couple of pygtk developers I found on #pygtk couldn't think of one (and said I shouldn't worry about it since most people don't use pointer focus ... sigh).

Tags: , , , , ,
[ 17:26 Apr 06, 2005    More programming | permalink to this entry | ]

Sun, 03 Apr 2005

Rainbow Basin: the Barstow Syncline

We started the day at Zzyzx, south of Baker. I'd been told that there were lots of geologically interesting things to see there.

If so, we couldn't find them. There's a little cluster of buildings marking the Desert Research Center, but it doesn't seem to be open to casual visitors; rather, they do classes and tours by appointment. Zzyzx abuts the southwest end of Soda Dry Lake, so you can get good views of the dry lakebed (with a little water on it here and there, thanks to the very wet winter) and across it to Mojave Rd and the Kelso Dunes. Worth the 5 mile detour off the freeway? Well, no, not really. But Dave was happy to find a relatively windless place where we could fly model airplanes for a few minutes.

Fortunately, Zzyxz wasn't the target of the day; that honor fell to Rainbow Basin, a few miles north of Barstow on the road to Fort Irwin. We'd actually tried to go to Rainbow Basin once before while passing through Barstow, but got lost. This time we had a more detailed map, since Rainbow Basin occupies a whole chapter in Geology Underfoot, Southern California.

Except it turned out that map wasn't any better than the wide-scale auto club map. The problem is that when you're coming in from the northeast, there's an exit off I-15 for "Fort Irwin Rd", even though no such exit shows on any of the maps. Fort Irwin Rd. is the road all the maps show as leading to Rainbow Basin. So that's the road to take, right?

Well, it turns out that Fort Irwin Rd and the more westward Irwin Rd angle together to meet at a point well north of the Rainbow Basin turnoff, which is on Irwin Rd. Irwin Rd. is the road all the maps label as Fort Irwin Rd, while Fort Irwin Rd. doesn't exist on the maps at all. Confused yet?

Here's the secret: if you exit I-15 at Fort Irwin Rd, make a left when you get to Irwin Rd. and angle back toward Barstow. Drive for longer than you think you should, and Look for a dirt road going off to the right called Fossil Beds Rd, which has no signs whatsoever related to Rainbow Basin even though supposedly there's a sign for it if you're coming in the other direction. Once you find Fossil Beds Rd, you're on track, and there are signs for the rest of the way.

Is it worth bothering with all this? Absolutely! Geology Underfoot rightly recommends starting with the "scenic loop drive", a short, one lane, one way dirt road that looks a little rough but really shouldn't be a problem for any car (at least when dry). It winds down through narrow canyons composed of colorful highly tilted layers of mudstone and tuff, then up a little hill to a parking area which offers a panoramic view of the Barstow Syncline, where the rock layers have been warped by fault compression into a striking U-shaped depression in an action mimicking the larger scale raising of the Transverse Ranges north of the Los Angeles basin by the San Andreas fault.

Curiously, on an intensely crowded weekend, Rainbow Basin was almost deserted. At the Syncline parking area we joined one other vehicle, a white van belonging to the "Loma Linda Department of Natural Sciences (Geology and Biology)". We never did spot the Loma Lindans; presumably they were down in the syncline measuring strike and dip. I hope my class field trips turn out to be this interesting.

Geology Underfoot recommends following the scenic drive with a hike of Owl Canyon, from Rainbow Basin's camping area, so we did so. The Owl Canyon trail offers a chance to walk through the axis of the syncline, up a mostly-dry creekbed to a dry waterfall. The colors aren't as impressive as the layers visible from the scenic loop, but the more subtle colors are interesting: the book mentions the green mudstone all along the wash (green from weathering of volcanic ash, not from copper) but doesn't mention the strikingly colorful granites washed down into the canyon, reds and bright greens as well as greys and blacks.

Along the way, there's a short cave in the side of the canyon marking a tributary which runs in wet weather. The book recommends bringing flashlights if one wishes to explore the cave. Since we had only bought the book a day earlier, we weren't well prepared for that; fortunately, I had my little blue LED keychain flashlight clipped to my water bottle, which turned out to be fine since the cave was so short.

Rainbow Basin was an excellent conclusion to our Mojave desert trip. This well hidden pocket park is well worth a side trip if you're anywhere near Barstow and have any interest in geology, or just in a short scenic drive among colorful desert rocks. Assuming, of course, that you can find the road in.

Tags: ,
[ 22:31 Apr 03, 2005    More travel/mojave | permalink to this entry | ]

Fri, 01 Apr 2005

Mojave

The East Mojave National Reserve is the nation's newest member of the national park system, signed into law as one of President Clinton's final acts. Growing up in LA, I'd driven through various parts of the Mojave desert since I was old enough to drive, but I hadn't been there since the park was created, and I didn't have much idea what specific interesting places might be there, except for Kelso Dunes, distantly visible from the interstate near Baker and always intriguing on our previous trips.

But where to go? I had no information about what was where, just an auto club road map and the topographic map collection I've been using to work on my pytopo program. The road map had ranger hat symbols at the town of Baker, at Mitchell Caverns down at the south end of the preserve, and at an obscure intersection of two minor roads in the south-central part of the reserve.

Dave didn't want to go to Baker -- it's a tacky little town whose two claims to fame are the World's Tallest Thermometer and a restaurant called the Bun Boy, though I have fond memories of our stay at Baker on the first night of our first trip together. Mitchell Caverns was too far and likely to be too crowded during spring break week. So we decided on the third option, which followed a road that led toward Kelso Dunes. Even if we didn't find a ranger station, at least we'd see the dunes; and there was an intriguing place somewhere along the road called "Hole in the Wall" which sounded worth checking out.

Roads in the preserve are mostly dirt, but are well graded and very well signed, and finding our way was no problem. Wonder of wonders, Hole in the Wall is the ranger station and campground marked on the auto club roadmap, and they have a very nice visitor's center and bookshop. Although they didn't have any books on the geology of the area (not their fault: no one has written one and they wish someone would!) they did have another in the "Geology Underfoot" series which covered, among other places, Rainbow Basin, tomorrow's target.

Newly armed with books and maps, we headed down the Rings Trail, Hole in the Wall's showpiece. It's short (though it connects to several much longer trails), fun and interesting: you scramble down over blocks of the colorful local tuff until you get to a steep slot, where metal rings have been bolted into the rock to provide handholds. Two such ring ladders and a bit more rock scrambling get you to the bottom of the slot canyon, where you can admire the fabulous colorful tuff towers above you, inspect the interesting tuff and volcanic breccia comprising the rocks, with their inclusions of hornblende, obsidian and other interesting minerals, and walk out to where the canyon emerges into normal Mojave desert with a view of the Providence Mountains and Mid Hills.

A very rewarding stop, and a fascinating place.

One curiosity about the Hole in the Wall Ring Trail: the sign at the trailhead makes a big deal about how strenuous the hike is. It's not really all that strenuous (the two ring climbs are short) but it could be unnerving for someone with poor balance or a fear of heights, too narrow for very overweight people, and of course it's not at all wheelchair accessible. But what they don't mention: if you drive south a few hundred feet on the road and turn west onto Wild Horse Canyon loop, in a very short distance you're more or less at the bottom of the Ring Trail. It's not as fun as climbing down the ring ladders, but would be well worthwhile for someone who couldn't see the canyon any other way.

With time left in the day, we took another route to Kelso Dunes, going back the way we came but by way of Wild Horse Canyon Rd, which the ranger recommended. I'm not sure why; there wasn't much on that road which we hadn't already seen from other roads. But taking the seemingly more direct route to Kelso, it turned out, involved quite a lot of slow jeep trail and probably would have taken quite a bit longer, so no harm done.

The highest of the Kelso Dunes rises to 600 feet, dwarfing the 140 foot rise of the famous Mesquite Dunes in Death Valley. Since I'd missed yet another chance to explore and photograph the Mesquite dunes a few days earlier, I was happy to be at Kelso.

The parking area was packed, but there's plenty of room on the sand: it wasn't crowded away from the parking lot. Getting to the dunes involves fighting for some portion of a mile along a deep sandy trail, then scrabbling your way up the side of the dunes.

The dunes are covered with wind ripples and tracks of all sorts of animals (mostly lizards, insects, hikers, and their dogs and children) and plants (the dune grass bends in the wind, and the tips of each blade make an arc in the sand.)

Near the top, you start feeling like an Everest trekker: you eye the cornice of sand along the ridge to the north, and watch the turbulent eddies of sand blowing off the tip of the peak above you as the wind howls past and threatens to blow you off the mountain. Well, okay, admittedly it's a bit warmer and you don't need oxygen tanks.

We went as high as the Hillary Step, but Dave's eyes were protesting from too much sand under his contact lenses, and the wind got worse with every foot ascended, so we stopped there. Our sherpas had long since deserted us.

Descending is much quicker than ascending. For one thing, you can take giant moon leaps, or "ski" down the sides of steep slopes, if you don't mind getting your shoes full of sand. Alas, the long level slog from the base of the dunes back to the parking lot is no easier in the return direction.

We drove out via Kelbaker Rd, past perhaps the most perfect collection of cinder cones I've ever seen together in one area. The map says they have a lava tube there, too. We'll have to come back and check it out some time.

Tags: ,
[ 09:26 Apr 01, 2005    More travel/mojave | permalink to this entry | ]

Thu, 31 Mar 2005

Fires of the Aztecs, Fires of the Earth

Valley of Fire State Park, in Nevada, is in the Lake Mead National Recreational Area near the northeast end of Lake Mead.

It's an auspicious location, because the Valley of Fire exit from interstate 15 is at the trading post run by our favorite local Indian tribe, the Moapa. In addition to not-completely-unreasonable gas prices and a huge assortment of fireworks, they sometimes have a trailer outside the store from which they sell "Really Good Beef Jerky" (it says so right on the sign). It really is "really good", the best I've had anywhere, even though it turns out to be imported from Wyoming and not made locally by the Moapa. Dave and I always look for the jerky trailer when we're passing through.

We had some idea what to expect from the Valley of Fire, because on a recent trip we stumbled upon an excellent little rest area north of Lake Mead called "Redstone", which included well made interpretive signs explaining that the deep red rock was Aztec Sandstone.

Indeed, the Valley of Fire is Aztec Sandstone, whose fiery color inspires the name; but the park turned out to be sizeable and varied, full of color changes and scenic vistas, excellent petroglyphs, and, oh, yes, a wildflower assortment that puts Death Valley's celebrated wildflowers to shame.

We expected a quick drive-through, but had no trouble whiling away the entire day in the park, including three short hikes and a lot of happy scrambling over rocks. It's comparable to the excellent Arches national park near Moab, in size, variety, and character. The Aztec even forms arches like the Entrada above Moab, though it tends toward lots of small arches rather than the big sweeping spans of the Entrada.

Unlike Arches, though, it isn't terribly informative (Arches being surprising good about explanations compared to most national parks). The Valley of Fire's signs and visitor's center are rather light on details. Why is the sandstone so deeply red in some places (well, iron, sure, but why so much more iron than other places?) and white or bright yellow in others? Why is it called Aztec? What makes the seams/dikes which are so prominent in the white formations near White Domes area? Is it just coincidence that Aztec and Entrada sandstone, both so intensely red compared to most sandstone, also share the unusual property of forming arches?

The visitor's center has a decent geology timeline with stratigraphic columns and a diagram of the fault as a fixed exhibit, plus kiosks with photos of common flora and fauna, but nothing you can take away with you, and they sell no books beyond lightweight coffee table fluff. "Sorry -- we keep telling them they should make something like that," apologized the lady at the gift shop counter.

We had just enough light left after leaving the park to make a quick trip down a dirt road to a ledge overlooking the north end of Lake Mead. The lake level was quite low; the ingress of the lake was far downstream of the location given on the map. Last summer, the LA Times reported that Mead was at record low levels, and the lost town of St. Thomas, submerged since the reservoir was first filled, had reappeared, delighting archaeologists and historians. I'd assumed that this was long past, after this year's unusually wet winter, but the lake level was still quite low: and at the St. Thomas overlook, several objects looking like the tops of buildings peeked out from beneath the water's surface. Further research will be required to find out whether we actually spotted St. Thomas.

Tags: ,
[ 09:55 Mar 31, 2005    More travel/mojave | permalink to this entry | ]

Wed, 30 Mar 2005

A Mosaic of Flowers

Passing through Death Valley wasn't the point of our Mojave trip, but it seemed like a nice bonus. Everyone's been talking about how due to the unprecedented southern California rains, this spring is a record year for wildflowers in Death Valley.

Of course, what that really meant was that everyone in the western half of the US decided to spend their spring break week there. Stovepipe Wells was a zoo.

But I wanted to see Mosaic Canyon, rumored to be a good slot canyon, and favored in "Geology Underfoot: Owens Valley and Death Valley" for breccia containing fragments of the precambrian Noonday dolomite.

It's a fabulous canyon. The book got so involved in talking about the breccia and stream undercutting that it didn't mention the gorgeous, smooth, veined, water-cut dolomite comprising a long and narrow slot canyon for the first half mile or so of the hike. Farther upcanyon, warping caused by the Mosaic Canyon fault creates impressive exposures in the walls.

After reluctantly leaving Mosaic Canyon, our route led us down the Badwater road, where the fabled wildflowers were impressive in number, if not in color (almost all yellow, with a few small whites and pale purples). The photographers, too, were impressive in number if not in intelligence, tending to back into the roadway in front of traffic at unpredictable times. The fields were full of people looking for just the perfect flower for their shot.

I'd heard rumours that Badwater was flooded, to the point where people were kayaking there. Not true: the water wasn't deep enough for kayaking, but the shallows were full of families and couples wading barefoot in the brine. We didn't wade, just walked to the water's edge and admired the new incarnation of ancient Lake Manly, the huge lake which once filled all of Death Valley, sparkling in the sun.

South of Badwater the flowers were a little denser, but didn't change very much in character until we left the park, where yellow coreopsis gave way to bushes covered with bright orange dodder, a parasitic plant that I think of as "silly string plant" because it covers other plants with a thin, bright orange string that looks like "silly string" sprayed out of cans.

Our last stop was just a few miles east of the town of Shoshone: a roadcut highly recommended by the Geology Underfoot book, which devoted a whole chapter to it. Rightly so! A strikingly weird black stripe which appears to be a coal seam is clearly, upon closer inspection, a layer of obsidian sandwiched between red rhyolite layers with interesting inclusions. Both the obsidian and the rhyolite includes bits of quartz. A little farther up the roadcut, past the obsidian, are two striking vertical faults. Quite amazing, and I'm glad we made a point of taking that route.

Tags: ,
[ 23:30 Mar 30, 2005    More travel/mojave | permalink to this entry | ]

Sun, 27 Mar 2005

Python GTK Topographic Map Program

I couldn't stop myself -- I wrote up a little topo map viewer in PyGTK, so I can move around with arrow keys or by clicking near the edges. It makes it a lot easier to navigate the map directory if I don't know the exact starting coordinates.

It's called PyTopo, and it's in the same place as my earlier two topo scripts.

I think CoordsToFilename has some bugs; the data CD also has some holes, and some directories don't seem to exist in the expected place. I haven't figured that out yet.

Tags: , , , , ,
[ 18:53 Mar 27, 2005    More programming | permalink to this entry | ]

Topographic Maps for Linux

I've long wished for something like those topographic map packages I keep seeing in stores. The USGS (US Geological Survey) sells digitized versions of their maps, but there's a hefty setup fee for setting up an order, so it's only reasonable when buying large collections all at once.

There are various Linux mapping applications which do things like download squillions of small map sections from online mapping sites, but they're all highly GPS oriented and I haven't had much luck getting them to work without one. I don't (yet?) have a GPS; but even if I had one, I usually want to make maps for places I've been or might go, not for where I am right now. (I don't generally carry a laptop along on hikes!)

The Topo! map/software packages sold in camping/hiking stores (sometimes under the aegis of National Geographic are very reasonably priced. But of course, the software is written for Windows (and maybe also Mac), not much help to Linux users, and the box gives no indication of the format of the data. Googling is no help; it seems no Linux user has ever tried buying one of these packages to see what's inside. The employees at my local outdoor equipment store (Mel Cotton's) were very nice without knowing the answer, and offered the sensible suggestion of calling the phone number on the box, which turns out to be a small local company, "Wildflower Productions", located in San Francisco.

Calling Wildflower, alas, results in an all too familiar runaround: a touchtone menu tree where no path results in the possibility of contact with a human. Sometimes I wonder why companies bother to list a phone number at all, when they obviously have no intention of letting anyone call in.

Concluding that the only way to find out was to buy one, I did so. A worthwhile experiment, as it turned out! The maps inside are simple GIF files, digitized from the USGS 7.5-minute series and, wonder of wonders, also from the discontinued but still useful 15-minute series. Each directory contains GIF files covering the area of one 7.5 minute map, in small .75-minute square pieces, including pieces of the 15-minute map covering the same area.

A few minutes of hacking with python and Image Magick resulted in a script to stitch together all images in one directory to make one full USGS 7.5 minute map; after a few hours of hacking, I can stitch a map of arbitrary size given start and end longitude and latitude. My initial scripts, such as they are.

Of course, I don't yet have nicities like a key, or an interactive scrolling window, or interpretation of the USGS digital elevation data. I expect I have more work to do. But for now, just being able to generate and print maps for a specific area is a huge boon, especially with all the mapping we're doing in Field Geology class. GIMP's "measure" tool will come in handy for measuring distances and angles!

Tags: , , ,
[ 12:13 Mar 27, 2005    More programming | permalink to this entry | ]

Future Naturalists

I took a respite from wrestling with broken motherboards on Thursday for a short mid-day walk at Shoreline, looking for birds.

What I found instead was schoolchildren, everywhere!

Maybe 20 different groups, each consisting of about 10 kids (perhaps 5th grade or so?) and 2-3 adults. The students all carried binoculars and bird books; some of the adults carried scopes.

With so many people in the park, the birds weren't as plentiful as usual, but I didn't mind: it was fun to see how interested the kids were and how much fun they seemed to be having. One group spotted a hummer six feet off the trail in a bush; binoculars came up, pages flipped, faces concentrated, and there was a chorus of "Anna's hummingbird!" and "Ooh, look, he's so beautiful!"

Really fun. Watching kids get excited about learning is more fun than watching birds!

(Reminds me of Ed Greenberg's comment at an SJAA star party: "The only thing cooler than Saturn is a kid looking at Saturn.")

Tags: ,
[ 10:27 Mar 27, 2005    More nature/birds | permalink to this entry | ]

Wed, 16 Mar 2005

Kitfox: Firefox for People Who Liked the Mozilla Browser

Debate rages on the mozilla-seamonkey list since the Mozilla Foundation announced that there would be no 1.8 release of the Mozilla browser (also called "the suite", or by its code name, "seamonkey"). Suite users are frustrated at lack of notice: anyone who was paying attention knew that seamonkey was going to be dropped eventually, but everyone expected at least a 1.8 final release. Mozilla.org is frustrated because they wish suite users would quit whining and switch to Firefox. Various people are slinging flames and insults, while a few try to mediate with logic and sense. There's a volunteer effort ramping up to continue support for the suite, but no plans for what to do about fixing all the regressions. Go read the list if you want all the gory details.

Anyway, the writing on the wall (and on the newsgroup) is clear: if you want a browser with continuing support from mozilla.org, Firefox is your only choice. Unfortunately for Linux users, firefox is designed by and for Windows users, copying Internet Explorer's user interface and dropping support for a number of nice features which the old mozilla browser offered.

I've decided that the best way to get a usable browser is to take firefox and put back the mozilla features that I miss. Mostly these are easy user interface tweaks. I pulled a tree last week and had most of the items that were blocking me addressed in a few hours. Building wasn't entirely straightforward: the build page doesn't make all the options clear, like the fact that xft and freetype are both enabled by default, so one of them has to be explicitly disabled. Updating the tree turns out to be a bit problematic: firefox' build dependencies turn out to be dicy, so sometimes changing a single .xul file causes the entire tree to rebuild, while other times an update builds a few files and the resulting build fails to run, and requires a clobber and a rebuild. Still, those problems are relatively minor.

So far, I have fixes for these bugs:

Next up: try to figure out why firefox takes so much longer than mozilla to start up. Fortunately, once it's up, it seems just as fast at browsing, but startup takes forever, and firefox doesn't even offer a splash option to tell me that something is happening.

Here is my patch, in case anyone else is bothered by these issues.

Perhaps this could be built as an extension. Some day I'll look into that. Certainly the current set of patches could be implemented as a script which exploded, edited, and re-packed the .jar archives in a firefox binary build, since the patch touches no C++ code as yet.

I'm calling my firefox-derived browser "Kitfox".

Tags:
[ 12:03 Mar 16, 2005    More programming | permalink to this entry | ]

Tue, 15 Mar 2005

The Talking Dog at the Men's Club

Dave and I went flying (radio controlled model airplanes) at Baylands last Saturday.

Dave got to the tables first, with the toolbox and one plane. I followed, carrying two of my planes. As I walked up to the table, some guy I hadn't seen there before chuckled, indicated Dave and said "Heh, I see he's got someone to carry his stuff for him."

I gave him a strange look and a "Huh?" and then "No, he can carry his own stuff."

It eventually dawned on the guy that those planes I was carrying were my own, and I was going to fly them (perhaps the transmitter hanging from its strap around my neck was a clue?), and he apologized.

It's amazing how often this happens; about every other time I fly there, there's some guy reacting like "Unbelievable! She has breasts, yet she flies airplanes! How can this be?"

It's not that they're unfriendly -- usually they're much more complimentary than this particular fellow. But it can get old being the phenomenal talking dog week after week. I'm reminded of the recommendation in Val's "How To Encourage Women in Linux" document: "Don't stare and point when women arrive". Fortunately, the Bayland regulars aren't like that, so it's not quite that "stranger walks into a bar" scene mentioned in Val's howto. But it's frequent enough that I bet it discourages women newbies.

I guess I shouldn't be surprised, based on the state of model airplane magazines, which are still stuck at that pleistocene "Each month's cover shows a different scantily clad bimbo with big tits and lots of lipstick, posing with an airplane" stage from which most other male-dominated hobbies graduated ten or fifteen years ago, or longer.

I was thinking about that today after class when, as I was getting ready to ride home, a woman walking to her car hailed me with some bike questions, and we had a nice talk about motorcycling.

She said her boyfriend thought she might be too short to ride (she was about my height, possibly a little shorter) but she'd seen a Rebel at a Honda dealer and was pretty sure she could ride that. I assured her a Rebel should be no problem, nor should a small sportbike like a Ninja 250. I offered to let her try straddling my CB-1 (about the same height as a Ninja 250), but she declined -- on her way somewhere, and perhaps nervous about sitting on someone else's bike.

Anyway, she had already decided to take the MSF course and get all the safety gear before buying a bike -- she'd obviously thought it through, and had come to all the right conclusions on her own. You go, girl!

(I probably should have thought to tell her about the Short Bike List FAQ.)

Tags: ,
[ 23:40 Mar 15, 2005    More misc | permalink to this entry | ]

Mon, 07 Mar 2005

Mukhtar Mai is a Hero

The acquittals in the Pakistan gang rape case are an outrage. You may have read about the case: a village tribunal in a remote area of Pakistan passed sentence that Mukhtar Mai be gang raped to punish her brother for an offense he allegedly committed (though most news reports indicated that he was not guilty of the offense, which was actually committed by one of the rapists. Not that that has any bearing on whether a wholly innocent woman should be raped for someone else's supposed crimes.)

The case spawned international outrage in a world previously unaware of the brutality of Pakistan's archaic tribunal system. The rapists were convicted and sentenced to death; but last week, their conviction was overturned.

Mukhtar Mai is a hero for standing up to them and continuing to press her case. I can't imagine what it must be like to be in her position. I am in awe of her. Mai's courage will help every woman in Pakistan, and in other countries with similar disregard for women's humanity. And not only that: she's using any financial gains from the case to build schools in her village. She's built two already.

Several of the BBC followup stories have mentioned that most women "sentenced" under this barbaric system, to be raped or otherwise mistreated for the supposed offenses of male members of their clan, accept their fate, "believing that tribal or feudal leaders are too powerful to resist and that the police and judicial systems are stacked against them." If anyone wonders why they might think that, last week's acquittal should answer any such questions rather handily.

None of the stories I've read anywhere goes into detail on the reason for the conviction having been overturned, besides the vague "lack of evidence". This seems odd considering all the reports of the original trial cited eyewitnesses. It's not clear why so few details are being reported. No one mentions the double standard which seems to be in place in Pakistan: where was the opportunity for Mai or her brother to appeal her outrageous punishment for his supposed crime?

The case will be appealed to a higher court, following international outrage at the current verdict. It is not yet clear whether the rapists will remain in prison until then.

Tags:
[ 21:37 Mar 07, 2005    More headlines | permalink to this entry | ]

First Geology Field Trip; Signs of Spring

Catching up with events of the past week ...

My Field Geology class had its first field trip on Saturday. Great fun, and lovely weather and scenery -- the meadows were full of wildflowers and meadowlarks.

We didn't study many actual rock formations, though we did see some lovely marble, gneiss, and quartzite outcrops and several sinkholes. Mostly we practiced mapping skills with the Brunton pocket transit, triangulating bearings and measuring elevations to plot contours. Today I went to the USGS to pick up some maps for local mapping practice, only to find that they've discontinued the 15' series, and I'd have to get a huge number of 7.5' maps (at $6 each) to cover the areas I need to sight. I got three maps, which turned out to be vastly insufficient for my one practice hike so far. I may need to get some downloadable ones and do my own printing.

Meanwhile, there are other signs of spring: at home, a mockingbird has been singing fairly regularly for a week now (before that, there were sporadic short bursts of song but nothing sustained), and I saw one of the Audubon's warblers carrying nest-building material. And at the Los Gatos perc ponds, a killdeer has decided to nest on the grass right next to the entrance road. The rangers have her area roped off, and she doesn't seem too upset by all the traffic passing by. She wasn't actually sitting on the nest when we went to see her; she sat or crouched in several different places in the grass, not just in one spot.

Finally, at Stevens Creek reservoir, a log near the inlet of the reservoir 1hangout spot for the lake's turtle population.

Tags:
[ 21:21 Mar 07, 2005    More nature | permalink to this entry | ]

Thu, 03 Mar 2005

Boondocks Pulled for Criticising Bush

Slate and Editor and Publisher report that several major newspapers have dropped Monday's Boondocks comic strip.

In the strip, one character reads from a newspaper, "Bush got recorded admitting that he smoked weed." Another character quips, "Maybe he smoked it to take the edge off the coke."

The best part of the story: the Chicago Tribune's given reason for censoring the comic was that it "presents inaccurate information as fact."

It's not clear which part of the comic was the inaccurate information presented as fact. The news about the tape recording in question, which was widely printed and has not been disputed by the White House? Or the quip in response, the one that starts with "maybe"?

If the Chicago Tribune is so worried about inaccurate information presented as fact ... does that mean that they will no longer be reporting on Bush's speeches and press releases?

Tags:
[ 09:54 Mar 03, 2005    More headlines | permalink to this entry | ]

Wed, 02 Mar 2005

Debian Networking and Hotplug Update; 2.6 Instability

I like to keep my laptop's boot sequence lean and mean, so it can boot very quickly. (Eventually I'll write about this in more detail.) Recently I made some tweaks, and then went through a couple of dist-upgrades (it's currently running Debian "sarge"), and had some glitches. Some of what I learned was interesting enough to be worth sharing.

First, apache stopped serving http://localhost/ -- not important for most machines, but on the laptop it's nice to be able to use a local web server when there's no network connected. Further investigation revealed that this had nothing to do with apache: it was localhost that wasn't working, for any port. I thought perhaps my recent install of 2.4.29 was at fault, since some configuration had changed, but that wasn't it either. Eventually I discovered that the lo interface was there, but wasn't being configured, because my boot-time tweaking had disabled the ifupdown boot-time script, normally called from /etc/rcS.d.

That's all straightforward, and I restored ifupdown to its rightful place using update-rc.d ifupdown start 39 S .
Dancer suggested apt-get install --reinstall ifupdown which sounds like a better way; I'll do that next time. But meanwhile, what's this ifupdown-clean script that gets installed as S18ifupdown-clean ?

I asked around, but nobody seemed to know, and googling doesn't make it any clearer. The script obviously cleans up something related to /etc/network/ifstate, which seems to be a text file holding the names of the currently configured network interfaces. Why? Wouldn't it be better to get this information from the kernel or from ifconfig? I remain unclear as to what the ifstate file is for or why ifupdown-clean is needed.

Now my loopback interface worked -- hurray!

But after another dist-upgrade, now eth0 stopped working. It turns out there's a new hotplug in town. (I knew this because apt-get asked me for permission to overwrite /etc/hotplug/net.agent; the changes were significant enough that I said yes, fully aware that this would likely break eth0.) The new net.agent comes with comments referencing NET_AGENT_POLICY in /etc/default/hotplug, and documentation in /usr/share/doc/hotplug/README.Debian. I found the documentation baffling -- did NET_AGENT_POLICY=all mean that it would try to configure all interfaces on boot, or only that it would try to configure them when they were hotplugged?

It turns out it means the latter. net.agent defaults to NET_AGENT_POLICY=hotplug, which doesn't do anything unless you edit /etc/network/interfaces and make a bunch of changes; but changing NET_AGENT_POLICY=all makes hotplug "just work". I didn't even have to excise LIFACE from the net.agent code, like I needed to in the previous release. And it still works fine with all my existing Network Schemes entries in /etc/network/interfaces.

This new hotplug looks like a win for laptop users. I haven't tried it with usb yet, but I have no reason to worry about that.

Speaking of usb, hotplug, and the laptop: I'm forever hoping to switch to the 2.6 kernel, because it handles usb hotplug so much better than 2.4; but so far, I've been prevented by PCMCIA hotplug issues and general instability when the laptop suspends and resumes. (2.6 works fine on the desktop, where PCMCIA and power management don't come into play.)

A few days ago, I built both 2.4.29 and 2.6.10, since I was behind on both branches. 2.4.29 works fine. 2.6.10, alas, is even less stable than 2.6.9 was. On the laptop's very first resume from BIOS suspend after the first 2.6.10 boot, it hung, in the same way I'd been seeing sporadically from 2.6.9: no keyboard lights blinking (so not a kernel "oops"), cpu fan sometimes spinning, and no keyboard response to ctl-alt-Fn or anything else. I suppose the next step is to hook up the "magic sysrq" key and see if it responds to the keyboard at all when in that state.

Tags: , , ,
[ 23:06 Mar 02, 2005    More linux | permalink to this entry | ]

Mon, 21 Feb 2005

Flashing a GigaByte/VIA BIOS from Linux

In the storm a couple of days ago, our server crashed: turned out we had some sort of power glitch that killed the UPS. Curiously, the other machines stayed up, including mine. I thought everything was fine, until I tried to power down that evening and found myself in an infinite-reboot cycle.

Since then my machine has been increasingly flaky, sometimes sending no video signal to the monitor at startup, sometimes not booting at all, never able to power down. Dave suggested downloading the latest BIOS and re-flashing.

The motherboard is a GigaByte GA-6VTXE (amusingly, the manual for it doesn't mention the company name anywhere, so I had to google for the model). It turns out that it has an option ("Q-Flash") to flash a new BIOS image without needing Windows or DOS. Hooray!

Sounded good, anyway: but the download images for the BIOS updates were a bit worrisome since they had names like bios_6vtxe_f9.exe. I downloaded the latest and put the .exe on a DOS-formatted floppy. The BIOS saw the file on the floppy, but said it was the wrong size (469k when it expected 256k).

Turns out that the file does need to be extracted from Windows in order to turn that 469k .exe file into the expected 256k image. It can't be unpacked by unzip, unrar or any other Linux utility I've found.

In other words, GigaByte is making their download files twice as big as they need to be in order to introduce an unnecessary Windows requirement into the Q-Flash process, which otherwise would be completely independant of operating system.

Sigh. (And no, the BIOS update didn't fix the problems, which are probably hardware. But it was worth a try.)

(Update: looks like it was the obvious, the power supply.)

Tags: ,
[ 13:28 Feb 21, 2005    More linux | permalink to this entry | ]

Sat, 19 Feb 2005

Me, as an icon

Me! From the Abi-Station Icon generator.

Tags:
[ 19:40 Feb 19, 2005    More humor | permalink to this entry | ]

Tweaking Emacs' Text Indent: Don't Indent So Aggressively

Encouraged by my success a few days ago at finally learning how to disable vim's ctrl-spacebar behavior, the next day I went back to an emacs problem that's been bugging me for a while: in text mode, newline-and-indent always wants to indent the first line of a text file (something I almost never want), and skips blank lines when calculating indent (so starting a new paragraph doesn't reset the indent back to zero).

I had already googled to no avail, and had concluded that the only way was to write a new text-indent function which could be bound to the return key in the text mode hook.

This went fairly smoothly: I got a little help in #emacs with checking the pattern immediately before the cursor (though I turned out not to need that after all) and for the function called "bobp" (beginning of buffer predicate). Here's what I ended up with:

(defun newline-and-text-indent ()
  "Insert a newline, then indent the next line sensibly for text"
  (interactive)
  (if (or (bobp)
          (looking-at "^$"))
      (newline)
      (newline-and-indent)
  ))
(defun text-indent-hook ()
  (local-set-key "\C-m" 'newline-and-text-indent)
  )
(setq text-mode-hook 'text-indent-hook)

It seems to work fine. For the curious, here's my current .emacs

Tags: ,
[ 14:03 Feb 19, 2005    More linux/editors | permalink to this entry | ]

Fri, 18 Feb 2005

Winter Sun and Tuna

Lunch in the backyard, in the sun and cool wind
(I wouldn't mind a few more "rainy days" like this!)
celery and tuna salad
(have to eat it outside, a courtesy to d, who dislikes the smell)
flavored with fresh dill from the garden
(a welcome winter volunteer that pushed up next to the geraniums last week)
watching the puffy cumulus clouds billow and grow and change
and threaten to grow into thunderheads, forgetting they're in California now
with a little lenticular stratus tucked inside of one of them
(what's that about?)
The resident phoebe chirps, hunting, while
a lone intrepid bushtit whizzes in from across the street
checks out the guava tree, then the orange tree, then zips off to the bush at the edge of the yard
(never seen a bushtit flying alone before. A bushtit bellwether?)

Far off to the west, a blue balloon flies free,
rising against the billowing clouds.

Tags:
[ 17:38 Feb 18, 2005    More misc | permalink to this entry | ]

Sign of the Times

Lina discovered this.

Google for "matriarchal".

Google asks:

Did you mean: patriarchal

Tags:
[ 11:12 Feb 18, 2005    More misc | permalink to this entry | ]

Thu, 17 Feb 2005

Turning off Ctrl-Space in Vim

One of those niggling problems that has plagued me for a long time: in the editor vim, if I'm typing along in insert mode and instead of a space I accidentally hit control-space, vim inserts a bunch of text I didn't want, then exits insert mode. Meanwhile I'm still merrily typing away, typing what are now vim comments which invariably end up deleting the last two paragraphs I typed then doing several more operations which end up erasing the undo buffer so I can't get those paragraphs back.

Ctrl-space inserts a null character (you can verify this by putting it in a file and running od -xc on it). I've done lots of googling in the past, but it's hard to google on strings like " " or even "space" or "null", and nobody I asked had a clue what this function was called (it turns out it re-inserts whatever the last inserted characters were) so I couldn't google on the function name.

Vim's help suggests that <Nul>, <Char-0>, or <C-^V > should do it. I tried them with map, vmap, cmap, and nmap, to no avail. I also tried <C-@> since that's a historical way of referring to the null character, googling found some references to that in vim, and that's how it displays if I type it in vim.

I finally found #vim on freenode, and asked there. Last night nobody knew, but this morning, p0g found the problem: I needed to use imap, not the map/vmap/cmap/nmap I'd been using.

So here, perserved for google posterity in case other people are plagued by this problem, is the answer:

imap <Nul> <Space>

For good measure, I also mapped the character to no-op in all the other modes as well:

map  <Nul> <Nop>
vmap <Nul> <Nop>
cmap <Nul> <Nop>
nmap <Nul> <Nop>

My current .vimrc.

Tags: , ,
[ 11:24 Feb 17, 2005    More linux/editors | permalink to this entry | ]

Wed, 16 Feb 2005

"The Leak": Why Not Subpoena Robert Novak?

I am just utterly not understanding this story on "The Leak".

The news yesterday: Matthew Cooper (Time magazine) and Judith Miller (the New York Times) are to be subpoenaed in the ongoing "Leak" case. (LA Times, or via Yahoo)

You remember "The Leak". Joseph Wilson, the CIA investigator sent to Niger to trace rumours that Saddam Hussein had tried to purchase "yellowcake" uranium, wrote an opinion column in the New York Times accusing President Bush of "misrepresenting the facts on an issue that was fundamental justification for going to war." Wilson's published report had stated the rumours were false, but Bush ignored the report and quoted the rumours as fact in his 2003 State of the Union address.

Roughly a week later, Washington Post columnist Robert Novak wrote that Wilson's wife, Valerie Plame, was a CIA operative, citing information from a "senior administration official".

It being a crime to reveal the identity of an undercover CIA operative, Bush at the time vowed to "find the leak". The current update in the case means two other reporters, Cooper and Miller, who supposedly were also contacted by the same "senior administration official", will be called to testify as to the identity of the person who contacted them. If they refuse, they face imprisonment for contempt of court.

The papers are full of outraged articles arguing that reporters should never be forced to reveal sources, and waving their "First Amendment" flags. And that's fine -- I have no problem with journalists protecting sources.

What I completely don't understand is: Why are Matthew Cooper and Judith Miller, who never wrote anything about the case, being subpoenaed and threatened with improsonment, while Robert Novak, who wrote the article which started all this, is not?

Why, in all the journalistic breast-beating which has accompanied this case, does no one ever suggest concentrating on Novak to find The Leak's identity?

Novak is the reporter who published the article outing Plame. Novak is the reporter who clearly had a source. Sure, question other sources, but why isn't Novak the prime, number-one source in this investigation?

A cynical friend says it's because Novak is a Bush administration mouthpiece, who did the administration's bidding in publishing the article, while Cooper and Miller did not.

Perhaps. But if that's the case, shouldn't that itself be news?

Tags:
[ 12:12 Feb 16, 2005    More headlines | permalink to this entry | ]

Tue, 15 Feb 2005

Blogedit -- edit a file without altering the date

Lots of Linux blogging software, such as the pyblosxom I'm currently using, uses the Unix file date on for each posting to determine the date at which the entry was made.

This makes it very convenient to add new entries, but it also makes it tricky to go back and update an old entry without losing all information about when the entry was originally posted.

I've been using a little sh script I hacked up for the purpose, which parsed the output of ls -l and then passed that in to touch -d. It worked, but it was ugly and had problems with postings that crossed a year boundary or were too old (because the ls -l format varies).

I finally got around to rewriting the script in python. It's more robust now, and cleaner, plus it checks EDITOR and VISUAL instead of always using vi. blogedit

Tags:
[ 23:51 Feb 15, 2005    More blogging | permalink to this entry | ]

Thu, 10 Feb 2005

Back in College

I'm back in college, after [mumble] years away. What fun!

I'm taking Field Geology, something I've wanted to take for years. I've been reading geology books for years, but there's a wide abyss between reading about limestone and olivine, and being able to identify random rocks in any location we hike.

So far, two weeks in, the class is great. The instructor is enthusiastic and interesting. Most of the students are geology fans like me, taking the course out of fascination for the subject. (Not all kids, either; several are returning students, like me. Is that a euphemism? Hey, Akkana, why don't you just say "old farts"?) Yesterday's lab was "Here's a box of sedimentary rocks, here's a bottle of acid, identify the rocks." Fun! I can hardly wait for the field trips. (Dave: How was your class? Me: We dropped acid! Dave: Really? Is it too late to sign up? Me: On the rocks.)

I brought in a rock collected from our last Utah trip, from the plateau rising out of the eastern edge of the Bonneville salt flats. Dave and I both guessed it was limestone. With the HCl it fizzed like mad. Cool -- we were right!

One minor amusement about being back in college: a lot of students now eschew the traditional backpack in favor of rolling luggage. Walking around campus you hear these rummmmmblings that sound like an onrushing skateboard, and it turns out to be some kid plodding along with luggage in tow. Well, maybe they have bad backs.

That was yesterday. Good things that happened today: I won our Toastmasters club table topics competition, so I get to compete at the next level. Also I posted lesson 3 in the gimp course (a fun one, making a Valentine's day card) and finished my planet column on Iapetus. Bad things: more Iapetus diagrams to make, and when I got home I discovered I had a slight fever. I feel better now, so maybe it won't turn into anything.

Tags:
[ 22:29 Feb 10, 2005    More education | permalink to this entry | ]

Wed, 09 Feb 2005

Don't Try to Stare a Rabbit Down

We went for a short hike at RSA this afternoon. A flash of blue swooped showily past us and disappeared into the grass of the field ("What was what? that didn't look like a jay"), emerging half a minute later, a western bluebird with a big fat worm in its bill.

We saw the first wild turkeys of the year, a big flock of about ten. Some hikers scared them and they decided to cross the stream, but they did it in a very orderly fashion, one by one and single file. Obviously there was a wrenching conflict in the turkey psyche between not wanting to get one's feet wet, versus flying being a lot of work. So each turkey would trot down the slope to the stream, jump just before reaching the bottom, flap two or three times, land in the water then splash/trot the last couple steps to the far bank. Then the next turkey in line would follow the same procedure.

The last two turkeys said "Aw, to heck with it!" and trotted straight down the slope, getting wet feet.

Up the hill on the farm bypass trail, we came to a place where the grass was, evidently, greener. We saw one brush rabbit, then another, then a third, then a fourth, then some kind of mouse who vanished as soon as it spotted us (the rabbits were less concerned). We watched the fourth rabbit for quite a while as it munched the grass, and Dave noticed that it never blinked. Was it blinking too fast for a human to see, or do rabbits, somehow, not blink?

So I checked with Suzi. She says she's never caught her pet rabbit, Scamper, blinking -- and Scamper sleeps with both eyes open.

Dana found the answer. Rabbits apparently only blink once every six minutes. It's in the oddly titled study, Proliferation Rate of Rabbit Corneal Epithelium during Overnight Rigid Contact Lens Wear. Though I'm fairly sure the rabbit we saw on the trail was not wearing contact lenses.

Tags:
[ 22:36 Feb 09, 2005    More nature | permalink to this entry | ]

Tue, 08 Feb 2005

Nonworking Novel Ad Redux

Turns out the Novell Ad requires flash 7, and just runs partially (but with no errors explaining the problem) with flash 6. About 2/3 of the linux users I polled on #linuxchix had the same problem as I did (still on flash 6).

I installed flash 7.0r25, and now I get video and sound (albeit with the usual flash "way out of sync" problem), but mozilla 1.8a6 crashes when leaving the page (I filed a talkback report).

Still not a great face to show migrating customers. Oh, well, maybe it works better on Novell Linux ...

Tags: , ,
[ 18:33 Feb 08, 2005    More linux | permalink to this entry | ]

Novell Can't Manage a "Migrate to Linux" Page That Works In Linux?

Someone on IRC posted a link to a Novell ad trying to persuade people to migrate from Windows to Linux.

It's flash, so I saw the flash click-to-view button. I clicked it, and something downloaded and showed play controls (a percent-done slider and a pause button). The controls respond, but no video ever appears.

Thinking maybe it was a problem with click-to-view, I tried it in my debug profile, with mostly default settings. No dice: even without click-to-view, the page just plain doesn't work in Linux Mozilla. Didn't work in Firefox either (though I don't have a Firefox profile without click-to-view, admittedly). People on Windows and Mac report that it works on those platforms.

I thought to myself, Novell is trying to be pro-Linux, they'll probably want to know about this. So I went up one level to try to find a contact address (there isn't one on the migration page). I didn't find any email addresses but I did find a feedback link, so I clicked it. It popped up an empty window, which sat empty for a minute or two, then filled with "Novell Account: Mal-formed reply from origin s". Any text which might follow that is cut off, doesn't fit in the window size they specified.

What does Novell expect customers to think when they migrate one machine to Linux, start using it to surf the web, and discover that they can't even read Novell's own pro-Linux pages from Linux? What sort of impression is that going to make on someone considering migrating a whole shop?

Fortunately sites like Novell's which don't work in Linux and Mozilla are the exception, not the rule. I can surf most of the web just fine; it's only a few bad apples who can't manage to write cross-platform web pages. But someone early in the migration process doesn't know that. They're more likely to just stop right there.

Tags: , ,
[ 12:30 Feb 08, 2005    More linux | permalink to this entry | ]

Thu, 03 Feb 2005

Emacs Color Themes

A nifty emacs trick I learned about today: ColorThemes.

Instead of the old hacked-together color collection I've been using in emacs, I can load color-theme.el and choose from lots of different color schemes.

I added these lines to .emacs:

(require 'font-lock)
(if (fboundp 'global-font-lock-mode) (global-font-lock-mode 1))
(load "~/.emacs-lisp/color-theme.el")
(color-theme-ramangalahy)  ;; pick a favorite theme

The disadvantage is that color-theme.el is fifteen thousand lines long! So I'll probably make a local version that strips out all but the theme I actually use (then I can customize that).

The (global-font-lock-mode 1) tells emacs to use syntax highlighting on every file, not just certain types. So now I get at least some highlighting even in html files, though it still doesn't seem to be able to highlight like vim does (e.g. different colors for text inside <b> or <b> tags).

Tags: ,
[ 18:57 Feb 03, 2005    More linux/editors | permalink to this entry | ]

Wed, 02 Feb 2005

GimpLabels script-fu

Someone showed up on #gimp the other day asking about how to make business cards. He was on Windows, so gLabels wasn't really an option, and of course my old gimp-print patch to read gLabels label templates would have been no help to a Windows user.

I got to thinking about how easy it would be to write a little gimp script analogous to my CD label script, which created a rectangular template in which to design a label, then created a bigger image scaled to the size of a page on which the label could be repeatedly positioned, with specified start and end points.

I couldn't resist trying it. It wasn't quite as easy as I had initially thought, mainly because I don't know script-fu very well and debugging script-fu is painful. But it still only took a few hours on a couple successive days to hack up something that more or less works: GimpLabels.

I didn't try to parse the gLabels XML from script-fu; I wrote a separate python script to translate the label templates into script-fu.

It's not perfect. On a page of 30 Avery 5160 labels (10 rows), it gets a little off by the bottom of the page. I don't know yet if this is a problem in the gLabels template, in my understanding of the parameters, or in the script-fu. It's fine for shorter pages.

I integrated my existing CD label routines into the script, but haven't yet written code to parse the CD label templates and make a print page from them. I've lost motivation for working on CD labels anyway, since discovering a few months ago how drastically they hurt CD longevity.

Anyway, GimpLabels was a fun hack, and an example of how easy it is to do this sort of thing in gimp.

Tags:
[ 12:20 Feb 02, 2005    More gimp | permalink to this entry | ]

Sat, 29 Jan 2005

Vignettes: A Boy And His Dog

The maniacal barking of the neighbors' loony dogs brought me to the kitchen window one morning, to see the young man walking his dog along the street outside the house.

The man was tall, ponytailed, intense; the dog, a german shepherd with a look of abundant alertness and interest, yet heeling close to his master's side.

They had just stepped off the curb to cross the street when some minor transgression on the part of the german shepherd -- did he glance over at the loony neighbor dogs? -- called a halt.

They stopped still, frozen in the intersection, tense and alert, man and dog communicating using movements too subtle for me to discern them from the window where I watched, fascinated.

In a minute, the conflict, invisible to an outsider, was resolved, the two players merged back into one, and the pair continued on their way, the ponytailed young man and the alert, obedient shepherd.

Tags:
[ 11:33 Jan 29, 2005    More misc | permalink to this entry | ]

Tue, 25 Jan 2005

GIMP course started

I've started my "GIMP for Beginners" course on the Linuxchix Courses mailing list, topic "gimp".

Anyone reading this is welcome to join in!

Here's the first posting, Lesson 0.

Tags:
[ 11:10 Jan 25, 2005    More writing | permalink to this entry | ]

GIMP course started

I've started my "GIMP for Beginners" course on the Linuxchix Courses mailing list, topic "gimp".

Anyone reading this is welcome to join in!

Here's the first posting, Lesson 0.

Tags:
[ 11:10 Jan 25, 2005    More gimp | permalink to this entry | ]

Thu, 20 Jan 2005

Google fooled by search engines on commercial pages

I've been very frustrated with google searches lately. Not because of those blog links The Register is always complaining about, and for which the silly new "no-follow" anchor attribute was added: I hardly ever see blog links in my google searches, and when I do they're usually relevant to the search.

(Update: Mary pointed out to me that I was confusing two issues there. The new anchor attribute does indeed solve a very valid problem (not the one The Reg complains about), and isn't silly at all. She's quite right, of course.)

No, the problem I have is that the top hits always turn out to be a search engine on some commercial site. Clicking on the google link takes me to a search page on some random site which says "No pages were found matching your search terms".

Today I hit a perfect example. I was looking up Apache http redirects, so I googled for: htaccess mod_rewrite.

The first item is the official Apache documentation for mod_rewrite. Great!

The second item looks like the following:

htaccess mod_rewrite
... Many htaccess mod_rewrite bargains can only be found online. Shopping on the Internet is no less safe than shopping in a store or by mail. ... htaccess mod_rewrite. ...
www.protectyoursite.info/ htaccess-deny-from-all/htaccess-mod-rewrite.html - 8k - Cached - Similar pages

Strangely, only google seems to show these sorts of search hits. Perhaps the spoofing sites only do their work for the googlebot, and don't bother with lesser searchbots. But google still wins the relevance award for most searches, even after I wade through the forest of spoofs; so I guess they don't need to worry about the spoofers until other search engines catch up in relevance. Eventually, someone else will catch up, and google will need to clean up its results. Until then ... <pulling on my rubber boots to wade through the muck in search of real results ...>

Tags:
[ 18:03 Jan 20, 2005    More tech | permalink to this entry | ]

Wed, 19 Jan 2005

Desktop Search -- What you need if you don't have grep

I've been surprised by the recent explosion in Windows desktop search tools. Why does everyone think this is such a big deal that every internet company has to jump onto the bandwagon and produce one, or be left behind?

I finally realized the answer this morning. These people don't have grep! They don't have any other way of searching out patterns in files.

I use grep dozens of times every day: for quickly looking up a phone number in a text file, for looking in my Sent mailbox for that url I mailed to my mom last week, for checking whether I have any saved email regarding setting up CUPS, for figuring out where in mozilla urlbar clicks are being handled.

Every so often, some Windows or Mac person is opining about how difficult commandlines are and how glad they are not to have to use them, and I ask them something like, "What if you wanted to search back through your mail folders to find the link to the cassini probe images -- e.g. lines that have both http:// and cassini in them?" I always get a blank look, like it would never occur to them that such a search would ever be possible.

Of course, expert users have ways of doing such searches (probably using command-line add-ons such as cygwin); and Mac OS X has the full FreeBSD commandline built in. And more recent Windows versions (Win2k and XP) now include a way to search for content in files (so in the Cassini example, you could search for http:// or cassini, but probably not both at once.) But the vast majority of Windows and Mac users have no way to do such a search, the sort of thing that Linux commandline users do casually dozens of times per day. Until now.

Now I see why desktop search is such a big deal.

But rather than installing web-based advertising-drive apps with a host of potential privacy and security implications ...

wouldn't it be easier just to install grep?

Tags: , , ,
[ 12:45 Jan 19, 2005    More tech | permalink to this entry | ]

Mon, 17 Jan 2005

Open Source Scientific Image Processing

Anthony Liekens has a wonderful page on open-source Cassini-Huygens image analysis.

A group of people from a space IRC channel took the raw images from the descent of the Huygens probe onto Titan's surface, and applied image processing: they stitched panoramas, created animations, created stereograms, added sharpening and color. The results are very impressive!

I hope NASA takes notice of this. There's a lot of interest, energy and talent in the community, which could be very helpful in analysis of astronomical data. Astronomy has a long history of amateur involvement in scientific research, perhaps more so than any other science; extending that to space-based research seems only a small step.

Tags: ,
[ 19:30 Jan 17, 2005    More science/astro | permalink to this entry | ]

Mozilla tip: highlight links that would open a new window

Investigating some of the disappointing recent regressions in Mozilla (in particular in handling links that would open new windows, bug 278429), I stumbled upon this useful little tidbit from manko, in the old bug 78037:

You can use CSS to make your browser give different highlighting for links that would open in a different window.

Put something like this in your [moz_profile_dir]/chrome/userContent.css:

a[target="_blank"] {
  -moz-outline: 1px dashed invert !important;
  /* links to open in new window */
}

a:hover[target="_blank"] {
  cursor: crosshair; text-decoration: blink;
  color: red; background-color: yellow
  !important
}

a[href^="http://"] {
  -moz-outline: 1px dashed #FFCC00 !important;
  /* links outside from current site */
}

a[href^="http://"][target="_blank"] {
  -moz-outline: 1px dashed #FF0000 !important;
  /* combination */
}

I questioned the use of outlines rather than colors, but then realized why manko uses outlines instead: it's better to preserve the existing colors used by each page, so that link colors go along with the page's background color.

I tried adding a text-decoration: blink; to the a:hover style, but it didn't work. I don't know whether mozilla ignores blink, or if it's being overridden by the line I already had in userContent.css,

blink { text-decoration: none ! important; }
though I doubt that, since that should apply to the blink tag, not blink styles on other tags. In any case, the crosshair cursor should make new-window links sufficiently obvious, and I expect the blinking (even only on hover) would have gotten on my nerves before long.

Incidentally, for any web designers reading this (and who isn't, these days?), links that try to open new browser windows are a longstanding item on usability guru Jakob Neilsen's Top Ten Mistakes in Web Design, and he has a good explanation why. I'm clearly not the only one who hates them.

For a few other mozilla hacks, see my current userChrome.css and userContent.css.

Tags: , , ,
[ 14:03 Jan 17, 2005    More tech/web | permalink to this entry | ]

Thu, 13 Jan 2005

Nifty emacs hack: how to wrap only certain files

For a long time I've wanted some, but not all, text and html files to line-wrap automatically in emacs. For instance, it drives me nuts when I edit a system configuration file and it wraps each long line, or when I edit an html file containing lots of long links and it keeps wrapping between the <a and the href=. But for files which are mostly text (such as these blog entries), I want line wrapping.

I'd been trying to do this with html-mode-hook and text-mode-hook, then checking the filename and calling (auto-fill-mode) if appropriate, but it wasn't working, because buffer-file-name isn't always defined at the time the mode hook is called. (No one seems to know why.) The buffer name seems to be defined at that point, but it doesn't contain path information so I can't say "Use wrapping for anything under ~/Docs" or "Don't wrap anything in /etc".

But with some help from sachac and the nice folks on #emacs I came up with a much better solution, and it's way simpler than the mode-hook approach: derived modes.

I set up two new modes, called html-wrap-mode and text-wrap-mode, which are the same as html-mode and text-mode except that they turn on auto-fill. Then I use the easy auto-mode-alist mechanism, which already does string matching on the filename, to call these modes, instead of the regular text and html modes, based on the extension or some other aspect of the file's pathname. Here's what I added to .emacs:

;; Want auto-fill-mode for some text and html files, but not all.
;; So define two derived modes for that, and we'll use auto-mode-alist
;; to choose them based on filename.
(define-derived-mode html-wrap-mode html-mode "HTML wrap mode"
  (auto-fill-mode))
(define-derived-mode text-wrap-mode text-mode "Text wrap mode"
  (auto-fill-mode))

(setq auto-mode-alist
      (cons '("\\.blx$" . html-wrap-mode)
      (cons '("Docs/.*.html$" . html-wrap-mode)
      (cons '("Docs/" . text-wrap-mode)
            auto-mode-alist) ) ) )

Here's my current .emacs.

I wonder if vim has a way to do this?

Tags: ,
[ 23:30 Jan 13, 2005    More linux/editors | permalink to this entry | ]

Web pages with ugly fonts: Mozilla thinks they're Russian

For years I've been plagued by having web pages occasionally display in a really ugly font that looks like some kind of ancient OCR font blockily scaled up from a bitmap font.

For instance, look at West Valley College page, or this news page.

I finally discovered today that pages look like this because Mozilla thinks they're in Cyrillic! In the case of West Valley, their server is saying in the http headers:

Content-Type: text/html; charset=WINDOWS-1251
-- WINDOWS-1251 is Cyrillic -- but the page itself specifies a Western character set:
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">

On my system, Mozilla believes the server instead of the page, and chooses a Cyrillic font to display the page in. Unfortunately, the Cyrillic font it chooses is extremely bad -- I have good ones installed, and I can't figure out where this bad one is coming from, or I'd terminate it with extreme prejudice. It's not even readable for pages that really are Cyrillic.

The easy solution for a single page is to use Mozilla's View menu: View->Character Encoding->Western (ISO-8851-1). Unfortunately, that has to be done again for each new link I click on the site; there seems to be no way to say "Ignore this server's bogus charset claims".

The harder way: I sent mail to the contact address on the server page, and filed bug 278326 on Mozilla's ignoring the page's meta tag (which you'd think would override the server's default), but it was closed with the claim that the standard requires that Mozilla give precedence to the server. (I wonder what IE does?)

At least that finally inspired me to install Mozilla 1.8a6, which I'd downloaded a few days ago but hadn't installed yet, to verify that it saw the same charset. It did, but almost immediately I hit a worse bug: now mozilla -remote always opens a new window, even if new-tab or no directive at all is specified. The release notes have nothing matching "remote, but someone had already filed bug 276808.

Tags: , , ,
[ 20:15 Jan 13, 2005    More tech/web | permalink to this entry | ]

Mon, 10 Jan 2005

No Child Left Behind

Paraphrase of a recent conversation with a teacher (who might not want her name used):
She (describing a student who was having difficulty): ... of course, once I realized how far behind he was, I couldn't spend any more time helping him, because of No Child Left Behind.
Me: Um ...?
She: No Child Left Behind says we have to raise our test scores. So now the school administration decides which students are close to being able to get an acceptable score, and we're supposed to spend all our time on those students making sure they pass, and not waste time on the students who are too far back.
Me: So, because of No Child Left Behind, you have to ...
She: Leave him behind. That's right.

Tags:
[ 19:10 Jan 10, 2005    More education | permalink to this entry | ]

Thu, 06 Jan 2005

Anna vs. Phoebe

Vignettes from a couple of short walks today ...

First, an exciting chase: a series of gulls loudly chased a crow which was carrying something large, orange and amorphous in its bill. I would have expected a crow could hold its own against a gull, being nearly as large, heavier, and smarter; but the crow obviously just wanted to escape with its prize, and ultimately did.

Later, on returning to the car, I had just spotted a black phoebe sitting on a branch near the road, when I saw something buzz past the corner of my vision. It was a male Anna's hummingbird rocketing straight up in what looked like a courtship display (in December?)

But it wasn't a courtship display: the hummer then sped straight down and arced past the phoebe, crying a short TCHEE! at the bottom of its arc when it was closest to the intruder.

I watched for maybe five minutes, fascinated, as the hummingbird repeatedly dove on the phoebe, never getting closer than a couple of feet (perhaps avoiding the branches of the bush in which the phoebe perched). The phoebe paid no attention, and didn't even flinch. It did change its perch to another bush once during the time I watched, and the hummer promptly shifted its attack to the new location.

A fellow hiker/photographer, returning from her walk, joined me for a minute to watch the show. She said she'd read recently in the paper that Anna's hummingbirds were due to start mating flights in mid-December. We both thought midwinter was an odd time to nest, especially for a bird so small that it has to worry about maintaining body heat. But if it's true, this male may have been defending a nesting territory, though I didn't see any female hummingbirds nearby.

This evening, a sunset walk along Los Gatos Creek revealed a first for me: a muskrat!

Tags: ,
[ 22:11 Jan 06, 2005    More nature/birds | permalink to this entry | ]

Boxer to Support Conyers in Protest Over Ohio Vote

Senator Barbara Boxer (D-CA) has signed a protest launched by Rep. John Conyers (D-MI) regarding irregularities in the Ohio vote, as reported this morning by the AP (via Yahoo, via ABC News).

Conyers' report can be found on the House Committee on the Judiciary's page, including the PDF report and some supplementary documents (all PDF except the video): a film by Linda Byrket called "Video the Vote", text of a fundraising letter Ohio Secretary of State Kenneth Blackwell, and Eyewitness Accounts of Ohio Voter Disenfranchisement. Conyers' report is described in this Fox News story.

John Kerry has not joined the protest.

This is not expected to alter the outcome of the 2004 election; both houses are expected to certify the election tomorrow. But it will force both houses to break from election certification tomorrow, and have a public discussion of up to two hours on some of the problems seen in the election. Perhaps it will pave the way for changes in future elections.

Tags: , , ,
[ 11:29 Jan 06, 2005    More politics/election04 | permalink to this entry | ]

Wed, 05 Jan 2005

January 8 Deadline to File CA MS Settlement Claims

January 8, just a few days away, is the revised deadline in the California antitrust class-action settlement against Microsoft, according to this NYT article (soul-sucking registration required, or use BugMeNot).

Anyone in California who bought Windows (even if it was bundled on a PC), DOS, MS Office, Works, or similar products between February 18, 1995 and December 15, 2001 is eligible for a rebate, in the form of a voucher redeemable for any tech hardware or software, not just Microsoft products.

Microsoft gets to keep 1/3 of the settlement left unclaimed, so claim the money you're entitled to now before it's too late!

Go to microsoftcalsettlement.com to fill out your claim form.

Tags:
[ 22:58 Jan 05, 2005    More tech | permalink to this entry | ]

The California Spyware Law

An article in the LA Times on New Year's Day caught my eye: California has an anti-spyware law going into effect as of January 1. The Times was rather sketchy, though, on what constitutes spyware, though they did say that there were no actual penalties under the law, merely that the law makes it possible to sue a company for installing spyware (whatever that's defined to be).

I've seen it covered in other publications now as well, and every article I read defines spyware differently, without mentioning how the actual law defines it (which you might think would be somewhat relevant). Nor do any of them provide, or link to, the text of the law, or its number in the CA code.

It turns out the bill was SB 1436, with a history here: and here is the text of the bill. It amends section 22947 of the Business and Professions code: here's an attempt at a link to the actual law, but if that doesn't work, go to leginfo and search for 22947 in the Business and Professions code. It's fairly concise and readable.

One point which on which I've long been curious is whether the various proposed anti-spyware laws cover the invasive end user license agreements, or EULAs, which Microsoft, Apple and other software companies love so much these days. You know, "clicking here gives you permission for us to snoop on what files you have on your system, what songs you've been listening to, and what extra software you have installed, and you have to click here or you can't get security updates" (stories on Win2k, WinXP, and issues with Windows Media Player; I think Apple does similar things with iTunes but don't have any story links handy).

It turns out that SB 1436 specifically disallows collection of a user's web browsing history, or browser bookmarks (so google search might be in trouble, depending on how it works) because it's "personal information", along with your name, address and credit card information; but it says nothing against collection of information regarding files, installed software, music, movies, or email. I guess none of those constitute "personal information" and it's fine to sneak software onto your system to collect such details.

However, consider this interesting section:

22947.4. (a) A person or entity, who is not an authorized user, as defined in Section 22947.1, shall not do any of the following with regard to the computer of a consumer in this state:
(1) Induce an authorized user to install a software component onto the computer by intentionally misrepresenting that installing software is necessary for security or privacy reasons or in order to open, view, or play a particular type of content.
At issue here is the definition of "software component". If a system update installs a new media player with a new invasive EULA which suggests that the player may collect information on songs installed or played, under the aegis of a security update, wouldn't this fall afoul of the new law?

22947.2 (c) is also interesting:

[an entity who is not the owner or authorized user of a computer shall not] Prevent, without the authorization of an authorized user, through intentionally deceptive means, an authorized user's reasonable efforts to block the installation of, or to disable, software, by causing software that the authorized user has properly removed or disabled to automatically reinstall or reactivate on the computer without the authorization of an authorized user.

If you've ever disabled a feature in a piece of software, only to have it mysteriously re-enable itself the next time you updated the software, or if you use software whose EULA allows that, you may have grounds to sue if you can prove that it was re-enabled intentionally. This may be a bit farther than the authors of the bill really intended to go; quite a lot of software companies (and perhaps some freeware and open source authors as well) may be exposed here. Software providers beware!

SB 1436 has some good and non-controversial effects. It explicitly makes it illegal to install, without the user's knowledge: keystroke loggers (presumably this does not apply to the CIA or anyone else operating under the Patriot Act), spam email relays, denial-of-service zombies, multiple popup ads which can't be closed (we're in 22947.3 (a) now, which applies to software copied onto the user's computer; but this may apply even to Javascript on a web page, if you read the definitions at the beginning of the bill). All good things to disallow.

What about that no-penalty comment in the Times? As far as I can tell, they're right. SB1436 makes no mention of fines or other punishments. This Infotex post says there's a $1000 fine per incident, plus attorney's fees; but I can't figure out where they're getting that: I don't see it in either the bill or the law anywhere.

Tags:
[ 11:45 Jan 05, 2005    More tech | permalink to this entry | ]

Tue, 04 Jan 2005

Snowy Grapevine, Rainy Central Valley, Unappetizing Sagebrush

The Grapevine, the pass through which Interstate 5 crosses the mountains north of LA, was covered in snow today. Gorman, near the highest point of the pass, was blanketed in white, not even bushes or grass poking through.

We'd hesitated before coming this way -- the Caltrans web site had listed the pass as closed until a scant half hour before we left. Signs on the highway at Castaic still said the pass was closed, but we put our trust in the web, and forged on. Happily, the road was open, clean of snow, and barely even wet, giving a lovely view of the snowy Transverse Ranges as we passed through this unexpected white christmas. Also fun was seeing a double semi trailer full of oranges passing through this wintry landscape.

Descending into the central valley, we saw the first "Food grows where water flows" sign at Buttonwillow, pinned to a trailer in a field of sagebrush and tumbleweed. Perhaps a goat would have found some food there. At least sage (which I do like in cooking) is closer to culinary than the cotton that all the farms here were growing for the last two years (presumably due to subsidies) the remnants of which still litter most of the empty fields along the I-5 corridor.

"Farm water feeds the nation", fifty miles farther north, also stood in a field of tumbleweed, but the California Aqueduct was nearby, so it was at least somewhat topical. The next "Food grows where water flows" adjoined a vinyard. Does wine count as food? Maybe they were table grapes.

The Buttonwillow rest stop features lovely woven hanging birds' nests, visible now when the trees are bare of leaves and looking like something out of an African weaverbird documentary. I didn't get a good look at the birds occupying those trees now; usually those I-5 rest stops are populated mostly by blackbirds and ravens, but I'll have to keep a sharp eye out next time I pass through in spring.

Tags: , , ,
[ 19:33 Jan 04, 2005    More misc | permalink to this entry | ]

"Works With Linux!"

Why is it that devices which claims Linux support almost never work with Linux?

When my mom signed up for broadband, we needed an ethernet card and router/firewall for her machine. The router/firewall was no problem (a nice Linksys with a 4-port switch included) but ethernet cards are trickier. First, it turns out that lots of stores no longer sell them, because they're trying to push wireless on everybody. ("Hey, I have a great idea! Let's take Windows users who don't even know how to run Windows Update, and set them up with an 802.11b network that opens their connection to the whole neighborhood, plus anyone driving by, unless they take extra security precautions!") Second, ethernet cards are in that class of hardware that manufacturers tend to change every month or so, without changing the model number or adding any identifying information to the box so you know it's not the one that worked last time.

The sale card at Fry's was an AirLink 101, and it claimed Linux support right on the box. The obvious choice, right? We knew better, but we tried it anyway.

Turns out that the driver on the floppy included in the box is for a RealTek 8139 chip: a file called 8139too.c, which has already been incorporated into the Linux kernel. Sounds great, no? Except that it turns out that the card in the box is actually an 8039, not an 8139, according to lspci, and it doesn't work with 8139too.c. Nor does it work with the ne2k driver, which supports the RealTek 8029 chip. No driver we could find could make head nor tail out of the AirLink chip.

Amusingly, the Windows driver on the floppy didn't work either: it, too, was for a RealTek 8139 and hadn't been updated to match the chip that was actually being shipped on the card. So the AirLink is a complete bust, and will be returned.

Fortunately, the other likely option at Fry's, a Linksys LNE100TX, is still the same chip (DEC Tulip) that they've used in the past, and it works just fine with Linux.

It's sad how often a claim of Linux support on the box translates to "This is a crappy product which probably won't work right with any operating system, since we change it every couple of months. But three revs back someone tried it on a linux machine and it worked, so we printed up all our packaging to say so even though we didn't bother to retest it after we completely redesigned the board."

Tags:
[ 10:57 Jan 04, 2005    More linux | permalink to this entry | ]

Mon, 03 Jan 2005

New Year's Day in the Verdugos

Trails in the Verdugo hills above Burbank are a happy place, even when they're crowded on New Year's Day, with everyone taking advantage of a brief respite between two weeks of rainy weather. Everyone smiled, waved, or offered a cheery "Happy New Year!" It's nice to see people enjoying being out hiking, instead of grumping down the trail glowering at everyone, like some of the trails at home. Even after the sun disappeared and the wind came up, people seemed happy to be there. Mountain bikers, hikers, families, dog walkers, and one careful-stepping barefoot runner shared the trail without any conflict.

Up at the ridge, the crowds thinned out and we were alone. A large brown bird -- some sort of thrasher? -- belted out a song in a tree near the ridge saddle, and we watched a big red-tailed hawk slip silently out of a tree just below us and sail out across the canyon, adjusting her attitude entirely with the angle of her tail, scarcely moving her wings at all.

On the other side of a lookout peak, a towering brick chimney surrounded by pottery shards bears witness to past attempts to colonize this place. A kiln? And what was the purpose of the tall mast on the hill above it -- a flagpole? A lightning rod?

We lost ourselves following side trails down from the lightning rod, and found ourselves tracing deer trails through the chaparral. We examined rocks (is that layered black rock a coal seam, or pillow basalt to go with the nearby serpentine?) and eyed erosion gullies. We waved to bikers and got sniffed by dogs. A nice New Year's morning!

Tags: ,
[ 16:02 Jan 03, 2005    More nature/trails | permalink to this entry | ]