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

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.


Android (G1) Emulator

If you want to play with a G1 (HTC's new Android phone for T-Mobile) in advance, you can download the emulator and do with it almost everything you can do with the actual handset.

  1. Download the SDK
  2. Extract the archive
  3. Download Jeffrey Sharkey's G1 skin for the emulator
  4. Install the skin in android-sdk-*/tools/lib/images/skins
  5. cd android-sdk-*/tools
  6. ./emulator -skin G1
You can change the orientation (portrait/landscape) by hitting the 7 key on the numeric keypad (with NumLock off).  You may want to read the documentation to learn about the other options the emulator has, as well as how to trigger simulated events, such as an incoming call.

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.