Tuesday, April 29, 2008

Right mouse button mapping on Linux Tablet PC

The pen button is much more useful as a right click than a middle, but it defaults to middle.

I thought I could fix it with xinput, like:
xinput set-button-mapping stylus 1 3 2
but this turns out not to work.

What actually works (from the Ubuntu bug) is:
xsetwacom set stylus Button2 3
I added this to the GNOME session (system->preferences->session).

Thursday, April 17, 2008

Dvorak Spanish keyboard layout (xkb)

Here's a basically US-English Dvorak layout, with right Alt meta mapped to give you Spanish characters right where you'd expect them: meta-vowel is accented vowel, meta-n is ñ, meta-1 is ¡, and meta-/ is ¿.

Add the following to your /usr/share/X11/xdb/symbols/us file:

partial alphanumeric_keys
xkb_symbols "dvorak-spanish" {

name[Group1]= "USA - Dvorak with Spanish extras";

include "us(dvorak)"

key <ae04> { [ 4, dollar, EuroSign ] };

key <ad04> { [ p, P, udiaeresis, Udiaeresis ] };

key <ac01> { [ a, A, aacute, Aacute ] };
key <ac02> { [ o, O, oacute, Oacute ] };
key <ac03> { [ e, E, eacute, Eacute ] };
key <ac04> { [ u, U, uacute, Uacute ] };
key <ac05> { [ i, I, iacute, Iacute ] };
key <ac09> { [ n, N, ntilde, Ntilde ] };

key <ae01> { [ 1, exclam, exclamdown ] };
key <ad11> { [ slash, question, questiondown ] };

include "level3(ralt_switch)"
};
Then say 'setxkbmap us dvorak-spanish'.

Tuesday, April 15, 2008

Lisp: IMAP SSL

I've found two IMAP libraries in Common Lisp: mel-base and Franz's postoffice. Neither supports SSL as far as I can tell. Most IMAP servers now require SSL. Do I take that to mean that no one is doing IMAP in LISP anymore?

btw, mel-base currently doesn't work with Allegro.

But you may find this optimization helpful.

Wednesday, April 09, 2008

Recovering a Toshiba M200

The Toshiba M200 is a relatively unimpressive tablet PC that I've borrowed for an extended period. The Windows install on it was performing terribly (I also have Linux on it), so I decided to recover it from the recovery DVD.

Two days later...

Here's what didn't work:
  1. Booting the DVD from GRUB (it doesn't know how).
  2. Booting from a Philips SPD3100 external DVD drive.
  3. Booting the floppy image from that disk (geteltorito helps here). (hung forever loading the USB driver usb20.dev)
  4. Booting from a FreeDOS image. Okay, I admit it's because I gave up trying to find a single-floppy image.
Finally I've found something that seems to be working. Outline:
  • Network boot floppy (yes, networking in DOS) from NU2
    • loaded on an SD card in the internal reader (name the floppy image file '$tosfd00.vfd')
    • The network card is e100 compatible, so the drivers are included. phew.
    • Generally just follow the menu prompts in the boot floppy
  • SMB shared CD
    • I used Mac OS 10.4: enable Windows Sharing under System Preferences-Sharing
    • Get your computer's real SMB/NetBIOS name (it's not the name the control panel tells you, but rather a shortened, munged version of the 'Computer Name' at the top of the window): bring up a terminal, then 'grep netbios /etc/smb.conf' and you'll see it.
    • Otherwise, follow the instructions in the second part of this guide (ignore the stuff about the PXE boot server; we got around that by booting off the SD card
The instructions only overwrite your first partition, so your other data isn't destroyed, and neither is your bootloader. Back up anyway. I got around 120 MB/min transfer rate, so it took around 15 minutes to restore.

On first boot, part of Windows XP Setup runs. It asks some simple questions like Administrator password, then reboots. You'll log in as Administrator.

Unplug your network and enable the firewall (Control Panel/Network/Network Connections/Local Area Connection/Properties/Advanced/Internet Connection Firewall). Then plug in and visit Windows Update immediately. My recovery CD was SP1, so it'll need to fetch SP2. You'll probably want to create a normal user account for yourself too, so you're not running as Administrator.

PS - the Toshiba Software Updates thing is useless. Remove it and use Microsoft Update. You can also remove Toshiba Registration, SurfHere, Zinio (delete the folder in C:\) and who knows how many other things you won't ever need.

Monday, April 07, 2008

The God of Peace Brought the Good Shepherd from the Dead

Jesus will always be our shepherd and we will always get the incomparable joy of being his sheep.
John Piper's Easter message. Starts off a little awkwardly, but looks good so far. I've only watched through the first point.

always sheep in need of a shepherd.
... and most of our shepherds suck.
... which is why we need Jesus as our shepherd

Universal Widget API

UWA: Easily make widgets that deploy to the major dashboard-type hosts.