Category Archives: Howto

HowTo: Fix 404 Errors When Upgrading to WordPress 2.6 on Windows / IIS

This post is only for WordPress users who have upgraded to 2.6 on their Windows / IIS server and other users who use “index.php” in their permalinks and are encountering 404 errors after the upgrade.

The problem is already known to the WordPress folks and fixed, as described on the WordPress forums.

I’m posting this just to help out those Googling for answers, as I just recently was after upgrading the Enlight website and watching them go up in flames 🙂

To quote the WordPress support page, the bug is known and fixed for WordPress 2.6.1.  In the meantime, here are temporary fixes.  I verify that #2 restored my Windows / IIS 6.0 installation, BUT, I want to stress that this is a temporary solution only, as you will be changing your permalink structure, which is contrary to the very nature of “permalinks”.  So, I recommend #3, which I also verify works, as it will leave your permalinks (which other sites are intended to be using) intact.

  1. If you’re using Linux/Apache on your webserver, you don’t really need the index.php anyway. Try removing it. The index.php thing was only meant for IIS servers, which don’t support mod_rewrite.
  2. If you need/want the index.php to be there, then on the Settings->Permalinks screen, add some values in for the category and tag bases. The words “category” and “tag” will do just fine. As long as they are not blank, this should work around the bug.
  3. (For advanced users only) If you want to patch the problem yourself, there is a fix available in trac ticket 7306.  (Colin adds: The fix here is to integrate the 3 modified files from changeset 8365.  If you don’t know how to do that, I strongly recommend you stick to option #2 until WordPress 2.6.1 comes out.)

HowTo: Load Mail Archives into GMail with Correct Dates

Another quick Google service related HowTo, as I just spent several days working on the task of uploading all my old mail into my Gmail account.

The Problem: Load your old mail archives into GMail, and keep the correct dates!

So say you’ve used various mail programs over the years, or change computers a lot, or for whatever reason have a large body of email sitting on your machine that you would like to upload to GMail. After doing a bit of webcrawling, you may have come across solutions such as the GMail Loader. However, I found that getting GMail Loader to work was painful, and even when it did, uploading my email turned into a huge mess, where all the emails seemed to have been sent on the day I did the uploading. They were all there, and searchable, but very annoying. There must be something better.

The Solution: Copy mail using Thunderbird and IMAP

Fixing this problem is actually really easy. Using GMail’s relatively new IMAP feature and the Thunderbird mail client (others likely work as well, I have not tested), it’s a a few easy clicks. Basically, just copy all your old email up there, and viola!

  1. To start, you need to get your mail archives accessible in Thunderbird. There’s lots of information out there about converting mailbox types and importing from one program to another; I will assume you have gotten that far.
  2. Enable IMAP access on your GMail account, by logging into GMail, clicking on Settings in the upper right corner, changing to the “Forwarding and POP/IMAP” tab, and clicking on “Enable IMAP” near the bottom.
  3. While you’re here, check out the “Configuration Instructions” link, to get a leg up on the next step.
  4. Now, add your GMail IMAP account to Thunderbird, using the Tools->Account Settings…->Add Account wizard. Note: in this wizard, add your GMail account as an Email Account, NOT as a GMail account, because we need to specify the IMAP settings, rather than use Thunderbird’s default POP access.

    The IMAP settings you need may differ depending on your account, but mine are:

    Server Type:
    IMAP Mail Server
    Server Name:
    imap.google.com
    User Name:
    full_email_address@gmail.com (or full_email_address@hosted_domain.com)
    Use Secure connection:
    SSL (Note: this changes the port to 993, which is correct.)
  5. Now, click on the Inbox folder of your GMail account in Thunderbird to make sure your connection is working. This will likely prompt you for your password as well, and will load the full list of folders on your GMail account. Note that GMail presents a folder for each Label you define in the web interface.
  6. To copy email to GMail, all that is left is to select the original messages in Thunderbird, right-click, and pick “Copy To”. Under the menu, choose your GMail account, and then which folder (think: label) you want to copy to.

    For instance, to drop all the email in your Inbox, use the Inbox. If you’d rather label everything and bypass the Inbox, pick a different folder. For me, I created a label (you can do this by creating a folder in Thunderbird) for the email address I was moving mail from (blah@oldaddress.com). Then I did “Copy To -> me@gmail.com -> blah@oldaddress.com”.

    For Sent Mail you can get these to show up in your Sent folder on GMail by copying them to the special [Gmail]->Sent Mail folder. Another useful special folder is the [Gmail]->All Mail folder, where you can copy messages that you do not want in your Inbox, but also do not necessarily want any other tag on.

  7. Give Thunderbird some time to process (you’ll see progress messages in the status bar), and you’re done!

HowTo: Merge Google Calendars Together

Here’s a quick How-To on merging two Google Calendars together, since Googling with the obvious phrases did not get me very useful results.

The Problem: Merge Two (or more) Google Calendars Into One

Let’s suppose that you, like me, have more than one calendar in your Google Calendar, and decide at some point that you want to condense those into one. I was struggling to find a single click solution for this, and then just to find any solution, for quite a while. Then I stumbled on the “Import” feature, and realized that it actually solves all my problems. Here’s how it works.

The Solution: Import one Calendar into the other

Once you see how to do it, it’s a quick task to merge two calendars together. In fact, you can even use this to merge a Google calendar from one account into another.

  1. Log in to your Google Calendar account, and click on the drop-down menu next to your Source calendar. Pick “Calendar Settings” from the list:
    Calendar Settings
  2. Now, scroll down to the bottom and find the Private ICAL address link. Right click on this link and save the file to your Desktop (or other handy temporary location):
    Private ICAL Link
  3. Next, return to your calendar and click on the “Add” dropdown menu at the top of your calendar list, then click Import Calendar:
    Import Calendar
  4. Select the file you just saved from your Source calendar, and choose the Destination calendar you want to import into:
    Import Form
    Then click Import, and you will soon be greeted with the cheery success message:
    Successful Import
  5. And that’s it! Here’s a before-and-after of me combining two calendars to show that it works. (Take a look at Tues, February 12, for example.):
    BeforeAfter

Correct Way to set up OpenVPN Client on Mac OS X

The Problem

You want to run an OpenVPN Client on Mac OS X. Your OpenVPN server will be serving DHCP, as well as pushing down DNS server addresses. You’ve tried connecting, and it just doesn’t seem to work. Perhaps you even see a large number of errors of the type:

write to TUN/TAP : Input/output error (code=5)

The Solution

When you connect via OpenVPN, it is the responsibility of the client to process pushed dhcp-options (including the DNS server rules), and do something useful with them. On a linux system, you could, for example, incorporate these into /etc/resolv.conf. Consult your distro’s openvpn documentation for more information.

However, this does not work on a Mac, because Mac software (even down to ssh and ping) doesn’t use /etc/resolv.conf under OS X 10.4… Oops. The solution? A combination of two tools: ipconfig and scutil. These together can manage 10.4’s new DNS configuration system, and set the tap device to obtain an address via DHCP. The problem is discussed further on nicholas riley’s blog, though his solution, a python script, a) is complicated to install, and b) did not actually work for me once installed, though I didn’t dig deep enough to understand why.

The best solution is to run an “up” script as part of the OpenVPN connection process, which will handle the necessary configuration for you. The script is provided on the Openvpn-users mailing list, by Ben Low.

Here’s how to use it with the excellent OpenVPN client Tunnelblick:

  1. Install Tunnelblick, and create your OpenVPN config. I’ll assume that you know how to do this, or you wouldn’t be here. If not, consult the documentation for OpenVPN.
  2. Download this script (copied from the openvpn-users mailing list). Save it to ~/Library/openvpn, the folder where your Tunnelblick OpenVPN configuration lives.

    OpenVPN TAP up-down Script: tap-up-down.sh

  3. Now, make the script executable, by running:

    chmod +x ~/Library/openvpn/tap-up-down.sh

  4. Edit your configuration file to include these lines:

    up ./tap-up-down.sh
    down ./tap-up-down.sh

  5. Changing your configuration file will have disconnected Tunnelblick if it was connected. Tunnelblick will also prompt you again for your administrator password, since security-sensitive files have been modified.
  6. Time to test! Open a Terminal window, and run the command:

    scutil –dns

    to see the current configuration of DNS resolvers. Then connect to your VPN in Tunnelblick, and run the command again:

    scutil –dns

    If all goes as planned, you will see your VPN DNS resolver properly included in the configuration. Congratulations!

  7. You should now be able to ping internal hosts by their internal DNS names, e.g.:

    ping internal-server

Good luck!

Updated 11/30/2007 to add chmod +x. Thanks Karel!

Totally Seamless SSHFS under Linux using Fuse and Autofs

This is awesome.

I worked on this for something like 2 hours this afternoon, and finally tracked down all the nuances to get it working. I’m really pleased with the results, and hope that they can be of some to use to you as well, because I could not find a decent tutorial on this subject despite extensive Googling.

The Problem: Connect to a remote filesystem over SSH

Odds are if you’ve stumbled on this tutorial, you already know the problem: You want to access a remote file system over SSH. You want to use FUSE SSHFS, and you don’t want to ever have to think about it, so you’re looking for Autofs integration. To keep this to the point, I’m going to skip over the installation of these packages and just explain the configuration, especially since installation is very distribution specific. I’ll simply say on my system (Ubuntu Feisty) it consisted of:

sudo apt-get install sshfs autofs

The Solution

Getting SSHFS to work with Autofs really isn’t hard, you just need the magic configuration. Here’s how I got things working for me:

  1. Set up certificate authentication for your local root to the remote account on the remote machine, by use of sudo ssh-keygen locally, and the (remote account’s) ~/.ssh/authorized_keys file.
  2. Test the certificate authentication by verifying that the following command does not prompt for your remote password:
    sudo ssh remoteuser@remotehost uptime
  3. Test that sshfs can establish the requisite connection:
    sudo mkdir /mnt/sshfs_temp
    sudo sshfs remoteuser@remotehost: /mnt/sshfs_temp
    sudo fusermount -u /mnt/sshfs_temp
    sudo rmdir /mnt/sshfs_temp

    Note that the : is required after the host to specify the remote directory. (: alone means the remote user’s home. :/remote/path indicates a remote path.)

  4. Add the following line to your /etc/auto.master file:
    /mnt/ssh /etc/auto.sshfs        uid=1000,gid=1000,--timeout=30,--ghost

    Where /mnt/ssh is the path you want all ssh automounts to appear in,
    1000 is the UID of the user you want the sshfs mount to belong to (i.e., be writable by),
    1000 is the GID of the user you want the sshfs mount to belong to, and
    30 is the timeout in seconds to keep the FUSE connection alive.

  5. Copy the following into a new file /etc/auto.sshfs:
    #
    # This is an automounter map and it has the following format
    # key [ -mount-options-separated-by-comma ] location
    # Details may be found in the autofs(5) manpage
    remote1     -fstype=fuse,rw,nodev,nonempty,noatime,allow_other,max_read=65536 :sshfs#remoteuser@remotehost1:
    remote2  -fstype=fuse,rw,nodev,nonempty,noatime,allow_other,max_read=65536 :sshfs#remoteuser2@remotehost2:/remote/path
    

    This creates two sshfs mappings (obviously, adding or removing lines creates more or fewer mappings).
    The first will be at /mnt/ssh/remote1, and map to the home directory of remoteuser on the host remotehost1.
    The second will be at /mnt/ssh/remote2, and map to the directory /remote/path on the host remotehost2, with the permissions of the user remoteuser2.
    Note the characters to escape # and : These escape characters are what took me two hours to track down: FUSE requires a parameter of the form: sshfs#user@host:directory, but autofs treats everything following a # as a comment, and the : character has a special meaning. These characters must be escaped by a

  6. Restart autofs to reload the configuration files:
    sudo /etc/init.d/autofs restart
  7. Test it out! As root or the user indicated by uid above, run:
    ls /mnt/ssh/remote1

    You should be greeted by the contents of the remote file system. Congratulations!

The Problems

  • This exact setup only works for one user due to specifying a uid. This is fine for a home desktop system, but will likely need further work to allow multiple users access to the remote filesystem. Perhaps careful usage of gid could alleviate this problem, though logging into the remote machine as a specific user still represents a security risk.
  • I have not examined the architecture enough since I am only seeking to enable my home desktop system, so I cannot vouch for the security of this setup whatsoever. For example, the use of the allow_other option for FUSE may have security consequences since the mountpoint is created as root (to my understanding, at least).

Using the Microsoft Fingerprint Reader on Windows Vista with Firefox 2.0

Back Story

This past summer at my internship I picked up a Microsoft Fingerprint Reader MS Fingerprint Readeron a whim. I had been reading about efforts to write an open source driver for it, and thought it might interesting to give it a shot. I haven’t actually run Linux on my desktop since then, but I finally got around to opening the fingerprint reader up a couple weeks ago and playing with it on Windows Vista.

While I wouldn’t speak to the total security and accuracy of the device, especially since it sends a photo of your finger to the OS unencrypted over USB, it is rather handy and has a nice nerdiness factor of the glowing reader on my desk as well. 🙂

The one absolute show-stopper, though, was that it didn’t work with Firefox. Game over. All browser wars aside, at the end of the day I use Firefox for most of my web browsing, and if the fingerprint reader didn’t work with it, it wasn’t of much use to me beyond logging in to Windows Vista automatically.

FingerFox 2.0 logoEnter Fingerfox (SE) v2, released just this weekend with compatibility for Windows Vista and Digital Persona Password Manager 2.0 (the software included with the fingerprint reader). I had been waiting & hoping for this plugin for weeks, as the previous versions of Fingerfox didn’t work at all for me. I’m happy to say that today everything works!

How to Set it Up

  1. Buy a Microsoft Fingerprint Reader (or other compatible Digital Persona device)
  2. Install the device as indicated in the instructions, or by downloading the newest driver from Microsoft. This process will walk you through registering your fingerprints.
  3. Install Firefox!
  4. Install the Fingerfox (SE) v2 plugin by downloading it, and then opening the XPI file (In Firefox, go to File->”Open File…” and locate the XPI file you just downloaded.)
  5. Restart Firefox to complete the installation, if you haven’t.
  6. Right-click on the new Fingerfox icon in your status bar: FingerFox 2.0 statusbar icon
  7. Enable “Global automatic popup”, to allow Fingerfox to open automatically on websites that you can log in to:FingerFox 2.0 context menu
  8. Go to a website where you want to login. Example: http://www.facebook.com
  9. Fingerfox will pop up a small window containing the same input boxes as the login page. Do not fill them in. These are here because the Digital Persona software, which cannot detect the login page under Firefox, can detect this mini login window.
    fingerfox_popup.jpg
  10. Now, put your fingerprint on the reader to open the Digital Persona password manager creation screen, and fill out the form with your account information, as in this example. Notice how Digital Persona highlights the corresponding fields in the Fingerfox (SE) window. This is showing you which boxes you are filling out, just in case there is any question:
    fingerfox_digital_persona_create.jpg
  11. Click OK to close the password manager creation window, and the Fingerfox popup will change like this, since Digital Persona now knows how to fill this window out for you:
    fingerfox_digital_persona_login.jpg
  12. Now, press your finger on the reader to login, and you should be at your Facebook homepage!
    FingerFox 2.0 Success!
  13. That’s it! To login to Facebook in the future, just go to the page, and repeat from step 12!
  14. Some extra things to be aware of:
    • For some websites (like Facebook) you will need to set up more than one login. This is because when you go to www.facebook.com, you are logging in to a different site (as far as Fingerfox is concerned) than when Facebook asks you to log in to, e.g., wisc.facebook.com. Since these appear to be different sites, you will have to store your login information twice. After that, however, it will be all set.
    • For some websites like Meebo, which have multiple login forms, you will need to select the appropriate one from a small drop-down box:
      FingerFox 2.0 Multiple Login Forms

Howto: Mythtv SNES Joystick Control

Update: Why oh why can’t Blogger preview my post in the *actual* stylesheet of my blog? I seem to remember WordPress doing this… if so, I must switch. ASAP.

I’m back down in Madison, and in the midst of unpacking all my junk after moving down here from home. One thing that Nate & I set up right away is my HTPC, an Ubuntu-based MythTV box. Unfortunately, I noticed over winter break that my homemade serial-port IR receiver has given up the ghost, so I can no longer control MythTV from my universal remote. I’ve ordered the parts for a USB IR receiver, but as I mentioned earlier, my soldering iron has also given up the ghost…

So, what to do in the interim? Well, there is a keyboard attached to the Myth box, but it doesn’t reach the couch. Enter the SNES controller and MythTV joystick control. Here’s how I got it to work:

Goal

  • Control MythTV from an SNES controller (or any other gamepad)

Required Software / Hardware

  • MythTV (I believe any version since 0.17 will work)
  • SNES controller connected via parallel port adapter and the gamecon driver (see Documentation/input/joystick-parport.txt in the Linux source tree)
  • jstest (Optional, available on Ubuntu in the “joystick” package)

Determining joystick layout

The first step in writing a MythTV joystick configuration is to determine the exact layout of your joystick, as Linux sees it. Specifically, we need to know what axes (and axis values) and buttons correspond to the controls on the joystick.

If you’re using an SNES controller with the gamecon driver, I’ve done the legwork, and you can skip to the next section below, using my example configuration. (Obviously you should test it and make sure it works.)

To determine the layout of your own joystick, you can use the optional jstest program mentioned above. You can install it on Ubuntu from the joystick package (you will need the universe repository enabled):

$ sudo apt-get install joystick

Run jstest and record the axis numbers and values, as well as button numbers, that correspond to all the controls you wish to use on your joystick. jstest requires a parameter of the joystick device to open. For example, I run jstest like this for my first SNES controller:

$ jstest /dev/input/js0

jstest produces output for my SNES controller like this:

Driver version is 2.1.0.

Joystick (SNES pad) has 2 axes (X, Y)

and 8 buttons (BtnX, BtnY, BtnTL, BtnTR, BtnTR2, BtnSelect, BtnThumbL, BtnThumbR).

Testing ... (interrupt to exit)

Axes: 0: 0 1: 0 Buttons: 0:off 1:off 2:off 3:off 4:off 5:off 6:off 7:off

This tells me that the joystick as seen by Linux has two axes and 7 buttons. Pressing them in sequence changes the output, such as this output when I hold the directional pad to the left and press the “A” button:

Testing ... (interrupt to exit)

Axes: 0:-32767 1: 0 Buttons: 0:on 1:off 2:off 3:off 4:off 5:off 6:off 7:off

This tells you that the D-pad “left” direction corresponds to value -32767 on Axis 0, and that the “A” button corresponds to button 0.

Compiling a full list for your joystick would give you a mapping like this one for the SNES controllers & gamecon driver:

SNES Button Linux joystick mapping
D-Pad Up Axis 1: -32767
D-Pad Right Axis 0: 32767
D-Pad Down Axis 1: 32767
D-Pad Left Axis 0: -32767
A Button 0
B Button 1
X Button 2
Y Button 3
L Button 4
R Button 5
Select Button 6
Start Button 7

Writing the MythTV JoystickmenurcConfiguration File

Now that you have the logical layout of your joystick in hand, it’s time to configure MythTV itself. This is done by means of the joystickmenurc configuration file, located at ~/.mythtv/joystickmenurc for the user that mythfrontend is launched under. This file will instruct MythTV as to which joystick device it should open, and then provides a mapping from the joystick layout to the keyboard strokes for MythTV.

joystickmenurc Format

As described in the formatting section of the Joystick Control page on the MythTV Wiki, the format for the joystickmenurc is as follows:

devicename <devname>
Specify the name of the joystick device to use, (e.g. /dev/input/js0)
button <num> <keystring>
Send keystring when button num is released
chord <cnum> <bnum> <keystring>
If button cnum is down, and button bnum is released, send keystring
axis <num> <from> <to> <keystring>
If axis num goes into the range of fromto send keystring

Example joystickmenurc for SNES controller

I think the formatting is best explained by an example. Below is the actual ~/.mythtv/joystickmenurc file I use on my system, with commenting explaining exactly what is intended and how it works. If you use an SNES controller attached via the gamecon driver to /dev/input/js0, this configuration should work for you as-is. Simply drop it in your ~/.mythtv directory and relaunch mythfrontend. For everyone else, feel free to use this as a template, or see the Joystick Control page on the MythTV Wiki for an example of an Xbox configuration file.

# ~/.mythtv/joystickmenurc
# Joystick menu config file
#
# Created 1/21/2007 by Colin McCambridge
# based on instructions at http://www.mythtv.org/wiki/index.php/Joystick_Control
#
# This joystick menu configuration controls MythTV with an SNES
# gamepad connected via parallel port and the gamecon driver.
#
# Controls:
#  SNES Pad            Keypresses       Joystick Device
#  --------            ----------       ---------------
#  UP/DOWN axis        Up, Down         Axis 1: U -32767 D 32767
#  LEFT/RIGHT axis     Left, Right      Axis 0: L -32767 R 32767
#  B                   Enter            Button 1
#  Y                   Esc              Button 3
#  A                   P  (Play/Pause)  Button 0
#  X                   S  (Guide)       Button 2
#  Start               M  (Menu)        Button 7
#  Select              I  (Info)        Button 6
#  Left Top            Page Up (REW)    Button 4
#  Right Top           Page Down (FF)   Button 5
#

###########################################################
#
#    SNES Gamepad Device
#
###########################################################

devicename /dev/input/js0

###########################################################
#
#    D-Pad
#
###########################################################

#Up
        axis    1       -32767  -1      Up
#Down
        axis    1       1       32767   Down
#Left
        axis    0       -32767  -1      Left
#Right
        axis    0       1       32767   Right

###########################################################
#
#    Buttons
#
###########################################################

#A ==> Play/Pause
        button  0       P
#B ==> Enter
        button  1       Enter
#X ==> Guide (S)
        button  2       S
#Y ==> Exit (Esc)
        button  3       Escape

#Start ==> Menu (M)
        button  7       M
#Select ==> Info (I)
        button  6       I

#Left Top ==> Rewind (PgUp)
        button  4       PgUp
#Right Top ==> F.Fwd (PgDown)
        button  5       PgDown

Final Notes

For making your own joystickmenurc file, you may find the MythTV Default Keybindings, or the more abbreviated Remote Control Buttons list handy references as to the control operations you can define.

For an exact list of valid key names to use (e.g. “Escape”) refer to the Qt documentation for the Qt.Key enum. This document lists key names in the form: “Qt::Key_Escape“, use only the name following the underscore.

Note: there is an undocumented discrepancy regarding the keys Page Up and Page Down. While the Qt.Key enum lists them as PageUp and PageDown, they can actually only be specified as either "PgUp" and "PgDown", or "Page Up" and "Page Down" respectively. See messages 3 and 4 of this email thread for reference, or view the relevant Qt source file (especially the keyname[] array at line 89, and method decodeString at line 388): qkeysequence.cpp

Howto: Resize Your Own Watch

I haven’t put too many posts up here that are actually helpful to anyone else in any way, so I thought I should start working on that. This may or may not be helpful to anyone either, but what the heck, I already had the pictures…

Disclaimer: I am not a jewelry / watch expert, and in fact know next to nothing about them. What I present here worked for me, but I make no claim that it will work for you and take no responsibility for your actions and any damage they may cause. 🙂

Back-Story

So why am I resizing a watch band, of all things? Well, my parents bought me a Seiko watch for Christmas during my senior year of high school, which I like very much. Unfortunately, wearing it for several years (and drumming with it on) popped one of the hands off one of the smaller dials, and that hand now rattles around freely under the crystal, frequently getting stuck under other dials and jamming the watch up:

Note the alarm dial (bottom) of the old watch is missing a minute hand, which is located upside down jamming its second hand (left dial).

After sending it off to Seiko for a repair estimate ($162), we decided it wasn’t worth the money to repair, as it would be better spent toward the purchase of a new watch. Fast-forward several months, and I find my very same watch on Amazon.com for $105 (no longer available). I was pretty excited to have a chance to get it fixed, so I bought it. Fast-forward another week or so, and my new watch arrives. Three sizes too large for my wrist. Oops.

And so, here we are.

Goals

  • Resize a watch band of the “pin-and-link” type seen above.
  • Avoid fees to have it resized at the mall
  • Avoid damage by the inept worker at the Younkers jewelry department

Tools

  • Pentel 0.5mm mechanical pencil tips
  • Thumbtacks
  • 1″ Brad
  • Light hammer

Steps

  1. First, take a close look at your watch and determine how many links need to be removed, and from which sides of the clasp. Keep in mind that you should try to balance the removed links from both sides, or the clasp will end up on the edge of your wrist instead of the back.
    I had this step easy, as the old watch was fitted correctly to my wrist already as a model. In my case, I needed to remove 3 links total: 2 from one side of the clasp and 1 from the other.
  2. The next step is to determine exactly which links you will need to remove to accomplish this, and which pins hold them in place. Generally, you will need to remove 2 pins (one from each end of the link(s) you will remove), and then replace 1 to rejoin the watch band.
  3. Removing and inserting these pins without a commercial tool for doing so is the tricky part, and why I am writing this Howto. So, on to the pins:
  4. On my Seiko, I started by removing one of the pins on the links near the clasp, in the direction indicated by the small engraved arrow:
  5. One method to remove these pins uses the tip from a 0.5mm mechanical pencil. Remove the tip and place it point up on a solid surface. Then press the watch down, aligning the pin with the pencil tip’s metal shroud. Apply force as vertically and firmly as possible.
    This was the first method I tried, and though it worked for two of the pins I needed to remove, it destroyed 3 mechanical pencils by pushing the metal shroud into the tip. For this reason, I do not recommend this method.
  6. A second method is to use a thumbtack. Place the tack point-upward on a sold surface. Very carefully align the watch pin on the tip of the tack and press downward firmly. It is very important to keep the watch aligned so that you are always pushing directly into the pin, not at any angle. If you are not careful, the watch will slip off the pin, and if you’re like me, you’ll stab the pin a full quarter inch into the tip of your finger.
    Despite the increased danger in this method, I found it to be the most effective, and though I did destroy another few tacks in the process, I was able to remove the remainder of my pins relatively easily.
  7. Once all the pins are removed, you simply rejoin the remaining watch band pieces by reinserting pins as necessary. This is the second significant challenge.
  8. When reinserting the pins, it worked best for me to insert them in the opposite direction I had removed them in. I attempted to insert the pin in the direction of the arrow the first time around, pushing the “bulge” in the pin through first, with the result of destroying the pin:
  9. It is possible to push the pin nearly all the way back in just by hand and pressing the watch against a table, but replacing the pin the last 1/16″ proved trickier. You would like to reposition the pin as it originally was, to minimize the risk that it will fall out.
  10. The best method I found for recessing the pin back to its original position was to tap it lightly with a hammer, via a nail. Place the watch on a solid board or edge of a table so that the edge of the watchband rests solidly on the surface. Then align a small brad (I used a 1″) with the stub of the pin sticking out, and rap it lightly with a hammer as shown:
  11. Repeat for all pins that you need to remove and replace to adjust the watch size.
  12. And that’s it!

    Finished watch, down to size with minimal scratches.


    Total bill of materials:

    • 3 mechanical pencil tips
    • several thumbtacks
    • one watch pin
    • one stabbed finger