Shallow Thoughts : : Jun

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

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.

[ 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 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!

[ 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.


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.

[ 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 with a single line calling, 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/ 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, 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 | ]