4 Basic Configuration

At this point you have a fully functioning console system. debootstrap even gives a full /dev directory so all the devices the stock Progear kernel supports already work, even networking, though you have no opportunity, within this chroot, to change any configuration details. You hardly need to anyway. But, you did not get a tablet so that you could lean it up on a desk in front of a keyboard. So that next task at hand is to get X working.

4.1 X

Configuring X is trivial if someone gives you an appropriate XF86Config-4. It is fairly straightforward from scratch as well. 'apt-get install' xserver-xfree86, xbase-clients, xfonts-* and maybe a few other things, you will figure it out. Running 'XFree86 -configure' takes care of everything but the pointer. The Silicon Motion LynxEM device is properly recognized. In the device section you can include options for rotating the screen. 'man siliconmotion' yields a full report on all the options. 'Option ``Rotate'' ``CCW''|''CW''' give a portrait orientation.

Note that in XFree86 4.1 a bug in libfb resulted in X locking up when running in portrait mode if you switched to a different terminal and back, or if you shut the screen off when sleeping via DPMS. This was fixed in 4.3, and the patch seems to have been backported in Debian to at least 4.2. Probably you don't care, but if you happen to want to run 4.1 see Linux on the Acer Travelmate C100 .

Also, in 4.3, to rotate the screen you need to enable the shadow framebuffer via 'Option ``ShadowFB'' ``on'''. For some reason, when using the default orientation, turning on ShadowFB prevents X from starting. So consider ShadowFB and Rotate to be coupled and change them together.

Rotating the screen only works when starting X. If you want to change it you must restart X with a modified XFree86Config-4. The original Progear effected live rotation via a customized (3.3.6) X server. The new Xrandr extention and tools are supposed to do this in 4.3, but I haven't gotten to making it work yet.

4.2 Pen

Support for the pen is included in XFree86 with the mutouch driver. In this case 'man mutouch' fails to provide a list of options. You might find them on the net, otherwise snooping around in the driver binary using 'strings mutouch_drv.o' yields enough clues to figure things out:

 Section "InputDevice"

        Identifier  "MicroTouchFinger"

        Driver      "mutouch"

        Option     "Type" "finger"

        Option     "Device" "/dev/ttyS1"

        Option     "MaxX" "250"

        Option     "MinX" "16250"

        Option     "MaxY" "250"

        Option     "MinY" "16050"

        Option     "AlwaysCore" "yes"

        Option     "SendDragEvents" "yes"

#       Option     "PortraitMode" "PortraitCCW"


``Type'' appears to have an optional value of 'stylus' rather then 'finger'. I haven't been able to tell what the difference is. (Min/Man)(X/Y) can be tuned for calibration. For 4.1-4.2 these parameters along with the 'InvertXY' option can be used to effect a rotation to match a different screen orientation. In 4.3 'Option ``PortraitMode'' ``PortraitCCW''|''PortraitCW''' effects the same much more easily.

If took some effort to calibrate the pointer. The Min/Max values I have may not be appropriate for a different device. I didn't bother to create any fancy tools or algorithm to set the calibration, rather I just changed them an restarted X about a dozen times until they were about right. The mapping doesn't seems to be sufficiently sophisticated either as for my case the pointer matches the pen at the edges of the screen, but is a few pixels off at the center. There may even be some X/Y crosstalk. One of my long terms projects is to modify the pen driver to include quadratic terms, including $xy$ as well as $x^{2}$ and $y^{2}$ to try to get a perfect correspondence. This will almost certainly require some kind of graphical calibration tool to get the coefficients right.


        InputDevice    "MicroTouchFinger" "CorePointer" 
to 'Section ``ServerLayout'''. The pointer entry and corresponding InputDevice section created by XFree86 -configure can be removed. You can also add support for a USB mouse when available. Just include a suitable InputDevice section.

Section "InputDevice"

        Identifier  "Mouse0"

        Driver      "mouse"

        Option      "Protocol" "imps/2"

        Option      "Device" "/dev/input/mice"

        Option      "ZAxisMapping" "4 5"


and add

InputDevice    "Mouse0" "SendCoreEvents" 
to ServerLayout.

4.3 Applications

With the display and pointer configured the machine is ready for basic use. Install a window manager you like. I started with flwm, then went to my familiar WindowMaker to get my dockapps back and finally settled on OpenBox with PerlPanel. OpenBox supports dockapps, but I started to resent the screen real estate they occupy and am trying to move away from them. Unfortunately PerlPanel doesn't yet have the applets needed to provide all the same information. You could use a screen full of gDesklets. Openbox is a bit more flexible than WindowManager for configuring for use exclusively with a pointer when right/middle and Alt/Ctl clicks are harder to come by. Matchbox is nice too and behaves more like the DayTripper window manager and panel on the factory Progear System. It is probably overall a little more convenient when using only a pen, and leaner, but much less flexible than the avobe mentioned OpenBox+PerlPanel system.

Use xvkbd for an on screen keyboard. For real handwriting recognition there is nothing available, the system used in the Progear is propietary and as far as I can tell hasn't been released in any other form anywhere else. It could probably be ported, but I never really liked it much anyway.

For gesture based character recognition there is the excellent xstroke. This app uses the whole screen as an input region and will simply send a keystroke to whatever window you are writing on top of (or whatever window has the input focus according to your window manager's policy). Otherwise it has no visible screen presence other than a small control region. I modified the app slightly to make this control window dockable, and to report the key converted after completing from a stroke. The derived code I have temporarily called wmstroke.

xstroke will also allow you to modify pointer events making right/middle clicks possible. Can't yet add a modifier to a click. xstroke required XFree86 4.2 or later. For a more conventional sort of character input get xscribble which operated much like PalmOS with a small recognition region.

I have come to be frustrated by how slow pen input is. This is no fault of the apps, but instead due to the fact that drawing a letter (think s or m or a) takes a lot longer than pressing a key. I am working on an idea to close the gap by writing using an alphabet where each character is only two straight strokes. This makes for a rather large learning curve but gives much quicker input. I can't imagine how to do better. These ideas are being tested in wmwrite. wmwrite can also be (will be able to be) used to implement chorded keyboard input and systems like Quickwrite in which each character is essentially one stroke of two possible lengths. All of this should eventually be able to be used in a rootless window mode like xstroke.

Meanwhile I have also found Gournal, which is a handy app for just recording pen input as raw strokes which is useful for taking notes when stroke based character input is too slow.

4.4 Booting

When everything is set up you may want to arrange that the new system is started automatically after booting. On the stock machine, the last init script run is /etc/rc.d/rc.WZ, which launches X using /home/webzine/.xinitrc. This starts some supporting services for the standard Progear tools, and FrontPath's own window manager. Move that out of the way at the end of /etc/inittab and replace it with an invocation of something like rc.deb which just does, e.g., 'chroot /mnt/debian su (user) startx'. Of course be sure that fstab arranged to have the new root partition mounted appropriately when the machine is booted. Logo