Yubikey and Dvorak

The Yubikey is an authentication key suitable for use in multi-factor systems and is significantly cheaper and easier to work with than other hardware authentication keys.  The authentication server and several clients (including PAM) are available as Free Software.


The device presents itself to the host as a USB keyboard, and when you press (short or long -- it has two memory slots) the button (it's capacitive -- no moving parts) it "types" the authentication token.  This is very convenient, as long as your system and the Yubikey agree on the keyboard layout.

If you have a Dvorak keyboard, that is unlikely to be the case.  As of x.org 1.8 it is easy to use a Yubikey with a Dvorak keyboard by adding a section to your xorg.conf.  Of course, you might not have an xorg.conf anymore since almost everything is autodetected, but it's still supported for those exceptional cases like this.  The following instructs X to use the "basic" keyboard variant ("dvorak" is a variant) when the Yubikey is inserted.

Section "InputClass"
Identifier "yubikey"
MatchIsKeyboard "on"
MatchVendor "Yubico"
MatchProduct "Yubico Yubikey II"
Driver "evdev"
Option "XkbRules" "evdev"
Option "XkbModel" "pc105"
Option "XkbLayout" "us"
Option "XkbVariant" "basic"

Update: Just don't leave it plugged in when X first starts.

Tags: security code


If you ever see this chuckwagon, eat there.


They have some of the best barbecue I've ever had.  Ever.

The sign appears to say "BBQ Ribs".  But look closer, it's two signs. "BBQ".  "Ribs".  They serve all kinds, including pulled pork.  Oh, and the sweet tea is just right.

You can see the smoker hanging off the back of the wagon, and they haul the whole thing behind the truck (plus camper) visible on the left.

They operate out of Colorado, traveling around to festivals, dog shows, and other events during warm weather (it's not a cold-weather wagon).  We encountered them in Moab, Utah, setting up for Jeep Safari week (just as we were getting out of town).  On our way out we must have seen hundreds of Jeeps on the highway (many being towed) heading the other direction.

Tags: travel food

ExiFilm: add film exposure metadata to EXIF tags of digital images

I just published ExiFilm, a suite of programs that I use with my large format film workflow, under the GPLv3.


When I'm shooting in the field I carry around a notepad of exposure record forms where I record subject information, luminosity, camera geometry, exposure values, and other notes.  This form is included in ExiFilm as a PostScript document.

I scan all of my film at a moderate resolution to JPEG files for digital light-table purposes.  It's convenient to have the notes that I took while shooting available with the files, and what better place to store them than in the files themselves.  The program ExiFilm is used to enter that information and add to the EXIF tags of the files.

I keep the original sheet film in a three ring binder, so to make the same information conveniently accessible with the film, the package includes a program that sets the metadata in the exposure record form and produces PostScript output of four exposure forms that I bind in right behind their corresponding sheet film.

From the README:

ExiFilm is a suite of programs that can be used to annotate digital images with information about the film exposure used to create them. In particular, it is designed for use with large format film cameras where the photographer may then scan the film to create a digital copy for a library or for digital processing.

By storing the exposure metadata in EXIF tags of scanned images, the photographer can have electronic access to the same information contained in the written record from the field from within an image viewer.  Further processing of the data can be done without the need to store the metadata in a separate database.


The file "lfrecord.ps" is a PostScript file that can be printed on US letter paper (or other sizes).  It is a single page of four exposure record forms design for large format photography.  The author trims the four forms and binds them together as a notepad to take into the field.  The PostScript program is hand-written and can be altered fairly easily.

The Python program "exifilm.py" provides a data entry screen similar to the form in "lfrecord.ps".  It takes an optional argument of a path to a directory with JPEG image files.  It will provide a drop-down list of JPEG files in the directory, and selecting one of the files will load the EXIF information from that file.  In this way it allows the user to quickly enter metadata for a number of scanned film images.  The metadata are saved immediately upon loading a new file or exiting the program.

The Python program "printrecord.py" loads the metadata previously entered with "exifilm.py" and produces pages similar to those in "lfrecord.ps" with the metadata typeset into the fields.  The resulting file may then be printed and bound into a photo archive with the original film.  Example usage:

  python printrecord.py /path/to/images 1 16 | lpr

Produces four pages of output including the metadata for image IDs 1 through 16.


Sweet Tea

It wasn't that long ago that "tea" meant "hot tea" everywhere except the South, where it means "sweet iced tea", or just "sweet tea".  As iced tea becomes more popular, we're now fortunate enough to have some potential for confusion when we order "tea" outside of the South.  Though I still await the day when I can order sweet tea at a California restaurant (along with all the other wonderful preparations of tea to be had).

As a transplanted southerner, I've found that I am making sweet tea in California far more often than in North Carolina.  With kitchen space at a premium, I have eschewed the single-purpose kitchen tool, the iced tea machine, and I make mine with a saucepan.  In the South, many people are accustomed to dumping most of the ice from their automatic ice maker's bin into half a gallon of tea.  I don't have an automatic ice maker, so I experimented to find the most efficient way to make iced tea.

After brewing tea bags in varying amounts of water, I observed that beyond a certain point, the amount of water and the time that the tea bags remain in the water no longer have an affect on the strength of the resulting tea.  This is in contrast to green tea which continues to get stronger the longer it steeps, and indeed, is often better in second or later brewings.

That's good news for efficient tea brewers.  That means we can use a relatively small amount of water to brew the tea, and then quench it with our single tray of ice cubes and a bunch of cold water to bring it to refrigerator temperature.

Boil 4 cups of water.  Steep 14 Lipton tea bags for 5 minutes.  Add 4/3 cups of sugar.  Maybe less.  Maybe more.  Stir until the tea is clear again.  Observe the amazing deep color of the liquid, and muse on why it's called "red tea" instead of "black tea" in China.  Drop in most of a tray of ice cubes, add water to bring it up to 1 gallon, and add the remaining ice cubes.

You're on your own if you want to use Luzianne.

Tags: food

The New Science

Fewer children are being vaccinated and community outbreaks of easily preventible but highly contagious and sometimes deadly diseases are increasing.  The change is due to many parents who are concerned that autism is linked to the administration of vaccines despite significant studies that indicate non-correlation.

But never mind the old way of doing science, this is how we do it now:

The debate over vaccination has played out in the media, with actress Jenny McCarthy saying she believes vaccines trigger autism. Her views are at odds with those of actress Amanda Peet, a spokeswoman for Every Child by Two, which promotes vaccinations.
Report: More parents choose not to vaccinate
Tags: science media

James E. Blair

I love hacking Free Software and have been fortunate to do so professionally with some wonderful people and organizations throughout my career. This is my blog.