Shallow Thoughts : : Jan

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

Fri, 23 Jan 2009

LCA 2009: Friday, the last day

The conference is over! Amazing how quickly a week passes.

Simon Phipps warmed us up with a very good keynote, full of inside jokes and knowledgeable quips indicating he knows the community even if he is a Sun guy.

Matthew Wilcox had some good tips on improving performance on solid state disks that I know will keep Dave busy for a while (I got him a small laptop SSD for his birthday and he's been enjoying it quite a bit -- it's hugely less power intensive and much faster for most operations than the regular disk it replaced). Apparently a lot of his advice will only work on snazzy high-end IBM SSDs, not the cheap ones like netbooks have or like Dave has, but some of them may be helpful anyway. Dave is trying the suggestion of using no I/O scheduler, echo "noop" > /sys/block/sda/queue/scheduler -- apparently there's a lot of crap the scheduler has to traverse that isn't noticable when the drive is seeking all the time, but on an SSD that doesn't need to seek, it can make a big difference. Also, apparently ext4 or btrfs (still under development) have some enhancements that help with SSD performance.

I went to Paul Fenwick's talk (Awesome Things You've Missed in Perl) even though I'm not a Perl hacker ... I know by now that Paul will always have something fun, and indeed he did, including a live demo of a bot that plays Minesweeper. The "awesome things" were indeed pretty cool, and I even found myself tempted to check out Perl again, especially for the new smart regular expression and grammar syntax (you can name parts of regular expressions then define grammars based on them -- very nice!)

Matthew Garrett had entertaining stories on power management, though not a lot of practical advice. Summary: power management sucks, maybe it'll get better some day; users shouldn't be forced to predict their use patterns in order to optimize power usage; video wastes a ton of power, like higher-than-necessary refresh rates when the user is merely viewing static images on an LCD that doesn't need much refreshing.

Then it was lunchtime -- time for the Great Shaving, where Linus shaved Bdale's beard as part of the enormous charity deal (something between $35,000 and $40,000 -- the count still isn't finished yet) toward saving the Tasmanian Devil. Bdale shared some of the emails from his wife (with her permission) and they were pretty funny, as was

"Geek My Ride" (Jonathan Oxer and Jared Herbohn or "Flame") had an entertaining presentation full of successful and impressive demos (we didn't see the actual cars -- those will be at Open Day tomorrow, apparently). I didn't see the whole presentation because I was fiddling around with an idea for a lightning talk, but I saw enough to get the idea.

Kevin Pulo's "Fun with LD_PRELOAD" was indeed fun. He had quite a few examples of existing LD_PRELOAD hacks as well as a detailed example of how to make a custom preloaded library. It's quite a bit more elaborate than I realized, but certainly do-able and something I've been meaning to experiment with for quite a while.

Then, sadly, it was time for the closing ceremonies, including lightning talks (I worked up the nerve and participated, though my laptop didn't behave and wouldn't talk to the projector -- weird how xrandr sometimes works and sometimes doesn't). And then the closing announcements: next year's LCA will be in Wellington, NZ. The Great Shaving had made the Hobart afternoon news, and someone brought in a tape of it. The funniest thing was that they focused on Bdale and the donation but never mentioned the guy who was doing the shaving (some unassuming guy named Linus).

Tags: ,
[ 04:35 Jan 23, 2009    More conferences/lca2009 | permalink to this entry | ]

Thu, 22 Jan 2009

LCA 2009: Thursday

The highlight of Thursday morning was a filler: one of the speakers had to cancel, so Paul Fenwick filled in with a combination of two short talks: "The Art of Klingon Programming" and "What's new in Perl 5.10?" I'm not a Perl programmer (at least not when I have a choice) but his talks were entertaining and even educational. What struck me most was that showmanship and humor don't have to detract from technical content. I'd had a discussion the previous day about the balance of offering lots of technical content versus entertaining the audience and not overwhelming them. Most technical talks are either dry, content heavy and so jam packed with information that you can't possibly remember everything, or lighter weight and glitzy but with not much real technical content and a "watered down" feeling. Paul's Klingon talk was one of the most content-full presentations I've seen at a conference, with lots of code examples, yet it kept the audence laughing, listening and grokking (to mix SF metaphors) all the way through. Showmanship can make it easier, not harder, to remember technical content.

In the afternoon, I'd been very much looking forward to the Arduino tutorial (Jonathan Oxer and Hugh Blemings) but it was a bit of a disappointment. The acoustics of the room and the handheld microphone, combined with the interactive nature of the presentation, meant that I could barely understand a word High Blemings said, and only some of what Jon Oxer said. (I've heard Jon Oxer talk before and never had trouble, so I primarily blame the room.)

Partway through, I skipped out to go check Donna Benjamin's "The Joy of Inkscape." It had been moved from its original lecture hall to a much smaller room with tables. The smaller room was Standing Room Only, a raucous and enthusiastic bunch who (the sitting ones, at least) were nearly all tapping away on laptops exploring either the demo Donna was showing or other Inkscape projects.

It was clearly a hugely successful and fun tutorial and I wanted to stay, but I couldn't find a place to sit where I could both see the screen and hear Donna, so I made my way back to Arduino. The second half, when they demoed various interesting sensors and a few unusual Arduino applications, was better than the first. But talking to folks later, a number of us were surprised because we expected a more interactive tutorial (the prep had encouraged us to bring or buy Arduino hardware).

The hot talk of the day was one I missed, after the tea break. I went to a talk on Spring, a robotics library (Clinton Roy), which was interesting enough and certainly popular (lots of people sitting by the door because all the seats were full) but afterward all I heard was people enthusing about Jeff Arnold's amazing Ksplice talk. He demonstrated a system of updating kernels in place, with no reboot required. People couldn't say enough about the talk, and I'm looking forward to downloading the video and seeing what I missed.

Tags: , , ,
[ 14:41 Jan 22, 2009    More conferences/lca2009 | permalink to this entry | ]

Wed, 21 Jan 2009

LCA 2009: Wednesday

Wednesday started with a keynote by Tom Limoncelli that was, frankly, disappointing. A lot of it was specific to enterprise sysadmins (including a set of "homework" for all the new directives you're going to implement in your IT department) and the rest was, well, nothing special.

The first regular talk I heard was Keith Packard, describing advances in X (and related graphical desktop software) over the past year. Surprisingly, there actually have been a lot of advances. Chief among them is GEM, a system for sharing data efficiently between X and the kernel to avoid all the horribly inefficient copying that's always happened in the past. It all sounded very promising except that if I understand him correctly, none of this works on graphics cards, only on integrated Intel graphics. A nice step, but until it works everywhere I'm not sure it's really a solution.

But Keith was overshadowed by his coworker, Carl Worth, who spoke next, giving a lively and interesting discussion of the architecture of graphics on Linux, including the many ways control might flow depending on which libraries are in use and the capabilities of the graphics card/chipset are. Better, he enumerated the many ways of tracing the execution of the various graphics layers -- gtk, cairo, X, mesa etc. -- and I'm looking forward to downloading his slides to get the list of debugging commands. This may also be the first talk I've seen to use GIMP as a presentation system. (He only used it for one slide, where he drew and labelled new codepaths people have proposed to get around graphics bottlenecks.

My tutorial (on Firefox/Mozilla hacking) was after lunch. I was fairly happy with it. The audience had a lot of questions, the slides I had hoped were funny got laughs, and the time worked out -- I had to rush through the last handful of slides because of the amount of audience questions and discussion, which is much better than ending early because no one was interested.

Jonathan Corbet's talk on the Linux Development Process mostly fairly basic details I already knew (what the difference kernel trees mean, how subsystem maintainers act as gatekeepers, why it's better to maintain code in the mainline kernel tree than separate code) but his talks always have nuggets of interest and relevant stories, with Linus sitting in the audience to add another perspective. The talk ended with some good advice on how to get started in kernel development: review code, and (in a quote from Andrew Morton) "try to make the kernel work well on every machine you have access to."

Wednesday night's Penguin Dinner was spectacular. The dinner was fairly spectacular itself (a huge and varied buffet), but the really impressive part was after dinner. We saw a short presentation on the plight of the Tasmanian devil (the largest marsupial carnivore after the extinction of the Tasmanian "tiger", or thylacine, in the early 1900s). The devil is threatened due to a transmissible cancer that causes horrible facial tumors which are invariably fatal. Then the charity auction began, led by Rusty Russell. At auction was one item: a large format numbered print of a beautiful, award winning waterfall photograph by Karen Garbee. Bidding was spirited and rose very quickly into the thousands of dollars, at which point things got complicated, with coalitions of multiple people bidding, other people offering matching offers under certain conditions, other items (such as a GEEK license plate registered in Queensland) being added to the photograph. In the end the winning bid was $10,500 (which amounts to something over $36,000 when various matching funds are included) on condition that Linus shave Bdale's beard.

Poor Bdale! The beard suits him and he's had it since 1982. But it will come back, and the Tasmanian devils won't if the cancer drives them to extinction.

Tags: ,
[ 15:32 Jan 21, 2009    More conferences/lca2009 | permalink to this entry | ]

Tue, 20 Jan 2009

LCA 2009 Tuesday

I missed a lot of the miniconf talks on Tuesday because I wanted to make some last-minute changes to my talk. But I do want to comment on one: Simon Greener's talk on "A Review of Australian Geodata Providers." Of course, I'm not in Australia, but it was quite interesting to hear how similar Australia's problematic geodata siguation is to the situation in the US. His presentation was entertaining, animated and I learned some interesting facts about GPS and geodata in general.

And Dave and I got another good astronomy opportunity with the dark skies at Peppermint Bay at the Speakers' Dinner. Despite occasional intrusive clouds we managed to get a great view of the Large Magellanic Cloud and a decent view of the small one, as well as eta Carinae and the star clouds between Crux and Carina. Pity I'd forgotten to bring my thumpin' travel optics that I'd been using the previous evening: a 6x20 monocular.

Tags: , , , ,
[ 17:15 Jan 20, 2009    More conferences/lca2009 | permalink to this entry | ]

Mon, 19 Jan 2009

LCA 2009 Monday

On day one of LCA 2009, I divided my time between the LinuxChix and Kernel miniconfs.

In the morning, Paul McKenney, in "Why is parallel Programming Hard?", discussed some of the background of parallel programming research, then gave an entertaining demonstration of instruction overhead using a roll of toilet paper. Each square represented one clock cycle -- he estimated there were a few hundred clock cycles in the full roll -- and he had audience members unroll the roll carefully, passing it from one person to the next. It took a long time.

Over at the LinuxChix miniconf, Jacinta Richardson gave a wonderfully entertaining (and useful) talk "On Speaking". She explained how to hack audience members' brains, particularly the corpus callosum and the hippcampus, by using emotion, visual images and suspenseful stories to give your audience whole-brain entertainment.

After Jacinta's talk we spent some time going around the room introducing ourselves, and speakers got a chance to plug their upcoming talks.

I skipped the panel on Geek Parenting (not being a parent) to go back to the kernel miniconf's "Problem Solving Hour". Questions involved network performance, solid state disk performance, how to debug crashes, tracing (the moderator commented that if you're thinking of getting involved in the kernel effort but aren't quite sure what to do, there's a huge need for better tracing and performance analysis tools), solid-state disks (someone plugged the talk on that subject on Friday) and similar interesting topics.

I asked about an overheating problem I've been having with my laptop. I mentioned that even in single-user mode, the CPU temperature keeps going up, so I was pretty sure it was a kernel and not userspace issue. Matthew Garrett said that a lot of drivers are optimized for a normal use case -- meaning X -- and may work very poorly in text mode. You can have something that's overheating in single-user mode, then you start X and a bunch of power management systems kick in and the temperature actually goes down. So how do you figure out what's causing a temperature problem? Open up the laptop when it's hot, poke around then figure out what's hot. Then debug that component.

Lunch was a lovely BBQ provided by Google.

After lunch, Matthew Garrett, in "How I learned to stop worrying and love ACPI", was entertaining, as all his talks are. I'm not sure I actually learned much in the way of practical advice for helping ACPI work better on my machines, but at least I learned lots of new ways in which ACPI sucks more than I ever realized.

Then it was back to LinuxChix for a workshop on getting schoolgirls more interested in IT. We saw short presentations from the four workshop leaders, then split into groups -- our group went outside and sat in the hazy sunshine and talked about how to get girls, teachers, parents and school IT staff on board.

After tea, all the LinuxChix groups reported back on the discussions and there was a full-room discussion on how to get involved with educational programs like that. Then we ended with lightning talks; I got roped into giving one, so I didn't take notes on the rest, but they were all fun and interesting.

Then in the evening, after dinner, we found a spot somewhat sheltered from the lights of the hotel for some quick astronomy before bed. The sky was hazy and picking up lots of sky glow from a light beam shining from the hotel, but fortunately the sky around the Southern Cross was clear. We found both the Large and Small Magellanic clouds, as well as Eta Carina and some other clusters around the Southern Cross. A lovely view, unmatched by anything I saw from around Sydney or Melbourne. Tasmania definitely wins for stargazing!

Tags: , ,
[ 05:17 Jan 19, 2009    More conferences/lca2009 | permalink to this entry | ]

Sat, 17 Jan 2009

Please wait, we're rebooting the plane

I'm in Tasmania! I still love the sound of that -- it sounds so exotic.

But this is just a short entry, partly to make sure my feed is working for the LCA 2009 planet, and partly to write about an experience on the outbound flight.

Planes never seem to leave the gate on time. There's always something. This time, the problem was that some of the reading lights in First and Business classes weren't working properly. So they fiddled with them for a while. Dave joked "They'll probably have to reboot the Windows computer that's running the lighting system." "Ha ha," I laughed.

Then came the next announcement:

Uh, ladies and gentlemen, we've determined that it's not the lights themselves that are causing the problem. It seems to be a software problem with the computer running the system. So we're going to shut down for about two minutes and see if that fixes the problem.

How do you reboot a lighting controller on a plane? It turns out, what you do is -- shut down the entire plane. Shut the engines off, cutting all power to the entire plane -- no lights, no fan, even the emergency lights went out after a few seconds.

They stayed off for about three and a half minutes (not two) and then took a bit over half a minute to come back up, bit by bit.

And indeed, that fixed the problem. Dave commented afterward, "That's like rebooting your PC by cutting the main breaker to the entire house."

Tags: ,
[ 22:54 Jan 17, 2009    More conferences/lca2009 | permalink to this entry | ]

Wed, 14 Jan 2009

Crikey 0.8

Mostly this week has been consumed with preparations for LCA ... but programming is a sickness. When you get email from someone suggesting something relatively simple and obviously useful, well ... it's simply impossible not to pull out that emacs window and start typing.

And so it was when I got a request for a backspace character in crikey. Of course backspace and delete seem like perfectly reasonable and useful characters to want; don't know why I didn't think of putting them in before. So I did.

But while I was in there, suddenly it occurred to me that it really wouldn't be much harder to let users specify any key by symbol. (Did I mention being a programmer is a sickness?) And then I realized that specifying control characters with a caret, like ^H, would also be quite useful. (Did I mention that ...)

So anyway, now there's a Crikey 0.8 and it's time to get back to packing and endless fiddling with my talk slides. Except, wait, I need to update my netscheme script to work right with the new laptop, and ...

Did I mention that programming is a sickness?

Tags: ,
[ 21:56 Jan 14, 2009    More programming | permalink to this entry | ]

Tue, 13 Jan 2009

Debian/Ubuntu repositories for Pho

I've been wanting for a long time to make Debian and Ubuntu repositories so people can install pho with apt-get, but every time I try to look it up I get bogged down.

But I got mail from a pho user who really wanted that, and even suggested a howto. That howto didn't quite do it, but it got me moving to look for a better one, which I eventually found in the Debian Repository Howto.

It wasn't complete either, alas, so it took some trial-and-error before it actually worked. Here's what finally worked:

I created two web-accessible directories, called hardy and etch. I copied all the files created by dpgk-buildpkg on each distro -- .deb, .dsc, .tar.gz, and .changes (I don't think this last file is used by anything) -- into each directory (renaming them to add -etch and -hardy as appropriate). Then:

% cd hardy/
% dpkg-scanpackages . /dev/null | gzip > Packages.gz
% dpkg-scansources . /dev/null | gzip > Sources.gz
% cd ../etch/
% dpkg-scanpackages . /dev/null | gzip > Packages.gz
% dpkg-scansources . /dev/null | gzip > Sources.gz
It gives an error,
** Packages in archive but missing from override file: **
but seems to work anyway.

Now you can use one of the following /etc/apt/sources.list lines:
deb http://shallowsky.com/apt/hardy ./
deb http://shallowsky.com/apt/etch ./

After an apt-get update, it saw pho, but it warned me

WARNING: The following packages cannot be authenticated!
  pho
Install these packages without verification [y/N]?
There's some discussion in the SecureAPT page on the Debian wiki, but it's a bit involved and I'm not clear if it helps me if I'm not already part of the official Debian keychain.

This page on Release check of non Debian sources was a little more helpful, and told me how to create the Release and Release.gpg file -- but then I just get a different error,

 The following signatures couldn't be verified because the public key is not available: NO_PUBKEY
And worse, it's an error now, not just a warning, preventing any apt-get update.

Going back to the SecureApt page, under Setting up a secure apt repository they give the two steps the other page gave for creating Release and Release.gpg, with a third step: "Publish the key fingerprint, that way your users will know what key they need to import in order to authenticate the files in the archive."

So apparently if users don't take steps to import the key manually, they can't update at all. Whereas if I leave out the Release and Release.gpg files, all they have to do is type y when they see the warning. Sounds like it's better to leave off the key. I wish, though, that there was a middle ground, where I could offer the key for those who wanted it without making it harder for those who don't care.

Tags: , , , ,
[ 21:14 Jan 13, 2009    More linux | permalink to this entry | ]

Sun, 11 Jan 2009

Cleaning up Firefox "places" history

Update: For details on how to edit Firefox history rather than just delete it, see this later post: Removing Bad Autocompletes from Firefox's Location Bar.

Firefox decided, some time ago, that whenever I try to type in a local file pathname, as soon as I start typing /home/... I must be looking for one specific file: an article I wrote over two months ago and am long since done with. Usually it happens when I'm trying to preview a new article. I no longer have any interest in my local copy of that old article; it's not bookmarked or anything like that; I haven't viewed it in quite some time. But try to tell Firefox that. It's convinced that the old one (why that one, and not one of the more recent ones?) is what I want.

A recursive grep in ~/.mozilla/firefox showed that the only reference to the old unwanted file was in the binary file places.sqlite.

My places.sqlite was 11Mb. I look through the Prefs window showed that the default setting was to store history for minimum of 90 days. That seemed rather excessive, so I reduced it drastically. But that didn't reduce the size of the file any, nor did it banish the spurious URLbar suggestion when I typed /home/....

After some discussion with folks on IRC, it developed that Firefox may never actually reduce the size of the places.sqlite file at all. Even if it did reduce the amount of data in the file (which it's not clear it does), it never tells sqlite to compact the file to use less space. Apparently there was some work on that about a year ago, but it was slow and unreliable and they never got it working, and eventually gave up on it.

You can run an sqlite compaction by hand (make sure to exit your running firefox first!):

sqlite3 places.sqlite vacuum

But vacuuming really didn't help much. It reduced the size of the file from 11 to 8.8 Mb (after reducing the number of days firefox was supposed to store to less than a third of the original size) and it didn't get rid of that spurious suggestion.

So the only remaining option seemed to be to remove the file. It stores both history and bookmarks, so it's best to back up bookmarks before removing it. I backed up bookmarks to the .json format firefox likes to use for backups, and also exported them to a more human (and browser) readable bookmarks.html. Then I removed the places.sqlite file.

Success! The spurious recommendation was gone. Typing seems faster too (less of those freezes while the "awesomebar" searches through its list of recommendations).

So I guess firefox can't be trusted to clean up after itself, and users who care have to do that manually. It remains to be seen how much the file will grow now. I expect periodic vacuumings or removals will still be warranted if I don't want a huge file; but it's pretty easy to do, and firefox found the bookmarks backup and reloaded them without any extra work on my part.

In the meantime, I made a new bookmark -- hidden in my bookmarklets menu so it doesn't clutter the main bookmarks menu -- to the directory where I preview articles I'm writing. That ought to help a bit with future URLbar suggestions.

Tags: , ,
[ 12:00 Jan 11, 2009    More tech/web | permalink to this entry | ]

Sun, 04 Jan 2009

Garmin Vista Cx on Ubuntu "Hardy"

I got myself a GPS unit for Christmas.

I've been resisting the GPS siren song for years -- mostly because I knew it would be a huge time sink involving months of futzing with drivers and software trying to get it to do something useful.

But my experience at an OpenStreetMap mapping party got me fired up about it, and I ordered a Garmin Vista Cx.

Shopping for a handheld GPS is confusing. I was fairly convinced I wanted a Garmin, just because it's the brand used by most people in the open source mapping community so I knew they were likely to work. I wanted one with a barometric altimeter, because I wanted that data from my hikes and bike rides (and besides, it's fun to know how much you've climbed on an outing; I used to have a bike computer with an altimeter and it was a surprisingly good motivator for working harder and getting in better shape).

But Garmin has a bazillion models and I never found any comparison page explaining the differences among the various hiking eTrex models. Eventually I worked it out:

Garmin eTrex models, decoded

C
Color display. This generally also implies USB connectivity instead of serial, just because the color models are newer.
H
High precision (a more sensitive satellite receiver).
x
Takes micro-SD cards. This may not be important for storing tracks and waypoints (you can store quite a long track with the built-in memory) but they mean that you can load extra base maps, like topographic data or other useful features.
Vista, Summit
These models have barometric altimeters and magnetic compasses. (I never did figure out the difference between a Vista and a Summit, except that in the color models (C), Vistas take micro-SD cards (x) while Summits don't, so there's a Summit C and HC while Vistas come in Cx and HCx. I don't know what the difference is between a monochrome Summit and Vista.)
Legend, Venture
These have no altimeter or compass. A Venture is a Legend that comes without the bundled extras like SD card, USB cable and base maps, so it's cheaper.

For me, the price/performance curve pointed to the Vista Cx.

Loading maps

Loading base maps was simplicity itself, and I found lots of howtos on how to use downloadable maps. Just mount the micro-SD card on any computer, make a directory called Garmin, and name the file gmapsupp.img. I used the CloudMade map for California, and it worked great. There are lots of howtos on generating your own maps, too, and I'm looking forward to making some with topographic data (which the CloudMade maps don't have). The most promising howtos I've found so far are the OSM Map On Garmin page on the OSM wiki and the much more difficult, but gorgeous, Hiking Biking Mapswiki page.

Uploading tracks and waypoints

But the real goal was to be able to take this toy out on a hike, then come back and upload the track and waypoint files.

I already knew, from the mapping party, that Garmins have an odd misfeature: you can connect them in usb-storage mode, where they look like an external disk and don't need any special software ... but then you can't upload any waypoints. (In fact, when I tried it with my Vista Cx I didn't even see the track file.) To upload tracks and waypoints, you need to use something that speaks Garmin protocol: namely, the excellent GPSBabel.

So far so good. How do you call GPSbabel? Luckily for me, just before my GPS arrived, Iván Sánchez Ortega posted a useful little gpsbabel script to the OSM newbies list and I thought I was all set.

But once I actually had the Vista in hand, complete with track and waypoints from a walk around the block, it turned out it wasn't quite that simple -- because Ubuntu didn't create the /dev/ttyUSB0 that Iván's script used. A web search found tons of people having that problem on Ubuntu and talking about various workarounds, involving making sure the garmin_usb driver is blacklisted in /etc/modprobe.d/blacklist (it was already), adding a /etc/udev/rules.d/45-garmin.rules file that changes permissions and ownership of ... um, I guess of the file that isn't being created? That didn't make much sense. Anyway, none of it helped.

But finally I found the fix: keep the garmin_usb driver blacklisted use "usb:" as the device to pass to GPSBabel rather than "/dev/ttyUSB0". So the commands are:

gpsbabel -t -i garmin -f usb: -o gpx -F tracks.gpx
gpsbabel -i garmin -f usb: -o gpx -F waypoints.gpx

Like so many other things, it's easy once you know the secret! Viewing tracklogs works great in Merkaartor, though I haven't yet found an app that does anything useful with the elevation data. I may have to write one.

Update: After I wrote this but before I was able to post it, a discussion on the OSM Newbies list with someone who was having similar troubles resulted in this useful wiki page: Garmin on GNU/Linux. It may also be worth checking the Discussion tab on that wiki page for further information.

Update, October 2011:
As of Debian Squeeze or Ubuntu Natty, you need two steps:

  1. Add a line to /etc/modprobe.d/blacklist.conf:
    blacklist garmin_gps
    
  2. Create a udev file, /etc/udev/rules.d/51-garmin.rules, to set the permissions so that you can access the device without being root. It contains the line:
    ATTRS{idVendor}=="091e", ATTRS{idProduct}=="0003", MODE="0660", GROUP="plugdev"
    

Then use gpsbabel with usb: and you should be fine.

Tags: , , , , ,
[ 16:31 Jan 04, 2009    More mapping | permalink to this entry | ]

Sat, 03 Jan 2009

OpenStreetMap mapping parties

Latest obsession: mapping with OpenStreetMap.

Last month, OpenStreetMap and its benefactor company CloudMade held a "mapping party" in Palo Alto. I love maps and mapping (I wrote my own little topographic map viewer when I couldn't find one ready-made) and I've been wanting to know more about the state of open source mapping. A mapping party sounded perfect.

The party was a loosely organized affair. We met at a coffeehouse and discussed basics of mapping and openstreetmap. The hosts tried to show us newbies how OSM works, but that was complicated by the coffeehouse's wireless net being down. No big deal -- turns out the point of a mapping party is to hand out GPSes to anyone who doesn't already have one and send us out to do some mapping.

I attached myself to a couple of CloudMade folks who had some experience already and we headed north on a pedestrian path. We spent a couple of hours walking urban trails and marking waypoints. Then we all converged on a tea shop (whose wireless worked a little better than the one at the coffeehouse, but still not very reliably) for lunch and transfer of track and waypoint files.

This part didn't work all that well. It turned out the units we were using (Garmin Legend HCx) can transfer files in two modes, USB mass storage (the easy way, just move files as if from an external disk) or USB Garmin protocol (the hard way: you have to use software like gpsbabel, or the Garmin software if you're on Windows). And in mass storage mode, you get a file but the waypoints aren't there.

The folks running the event all had Macs, and there were several Linux users there as well, but no Windows laptops. By the time the Macs both had gpsbabel downloaded over the tea shop's flaky net, it was past time for me to leave, so I never did get to see our waypoint files. Still, I could see it was possible (and one of the Linux attendees assured me that he had no trouble with any of the software; in fact, he found it easier than what the Mac people at the party were going through).

But I was still pretty jazzed about how easy OpenStreetMap is to use. You can contribute to the maps even without a GPS. Once you've registered on the site, you just click on the Edit tab on any map, and you see a flash application called "Potlatch" that lets you mark trails, roads or other features based on satellite images or the existing map. I was able to change a couple of mismarked roads near where I live, as well as adding a new trail and correcting the info on an existing one for one of the nearby parks.

If you prefer (as, I admit, I do) to work offline or don't like flash, you can use a Java app, JOSM, or a native app, merkaartor. Very cool! Merkaartor is my favorite so far (because it's faster and works better in standalone mode) though it's still fairly rough around the edges. They're all described on the OSM Map Editing page.

Of course, all this left me lusting after a GPS. But that's another story, to be told separately.

Tags: , , ,
[ 13:00 Jan 03, 2009    More mapping | permalink to this entry | ]

Fri, 02 Jan 2009

Firefox Tip: Save tabs just once

I've been offline and unable to update the blog for a while (technical glitch, long story) but I'm back and have several stories to polish up and post, beginning with this helpful (I hope) Firefox tidbit:

I've often wanted a way to get Firefox to save the current set of tabs without actually bookmarking them -- the way it does when you install an extension and need to restart. But I'd never found a way to do that through the menus.

But then I realized that I could use the same trick that I use for landscape printing:

  1. Edit user.js in your Firefox profile directory, and add this line:
    user_pref("browser.sessionstore.resume_from_crash", false);
    
    This will ensure that normally, it doesn't give you the confirmation box, only when you ask for it.
  2. In your running Firefox, go to about:config and search for sessionstore
  3. Look for the browser.sessionstore.resume_session_once line and doubleclick it (change it to true)

Now the current session will be restored the next time you start Firefox, but in the future you'll still get clean startups.

Update: this article used to reference "browser.tabs.warnOnClose", which is probably the wrong preference. There's some documentation (not much) at the Mozilla support: Session Restore.

Tags: ,
[ 22:31 Jan 02, 2009    More tech/web | permalink to this entry | ]