Aggiornato al : dic 23, 2007

This document reports the work I did on the Toshiba Portégé M200/M205: at first I installed Linux and make the tablet hardware work properly with it (as much as possible) and then I installed several open source programs that do many interesting things, with the final target to allow people work in Linux as well as in Windows.
The first thing to decide was the distribution to use: there are lots of distributions and each one has its positive and negative sides. During my life I tested several Linux distributions and I’m quite informed about the latest enhancements they introduced, so for me the best choice is the latest Ubuntu version, Gutsy Gibbon. In fact, Ubuntu is the best mix of power, versatility, stability on the one hand (in fact it’s based on Debian) and easiness of use (that is surely required for users who will use the tablets).

Linux Installation and first organization

The installation was trivial: after having downloaded the iso from Ubuntu website or from many other websites and having recorded it on a cd, you can boot your computer using it, in that it’s a “live” version that allows you to use Ubuntu without the need to install it; however we want to install it, so double-click on the installation launcher that is on the desktop, the installation starts and, after few questions (the most difficult is about disk partitioning), your Ubuntu is up!
Few words about how I managed disk partitioning: at first there was a unique NTFS primary partition for Windows, using the easy tool GParted (part of Ubuntu) I resized it to about 20 GB and I created an extended partition in the remaining space; then I created three logical partitions in the extended one, the first one is a 15 GB FAT32 partition (to allow reading and secure writing from both Windows and Linux, useful for storing in it common files and documents), then a swap partition of about 2 GB and at the end a 20 GB ext3 partition for Linux. In the extended partition I put at first the shared FAT32 partition because we can take the space from it if we have to make the Windows partition bigger, without affecting the Linux partitions.
After the installation, Ubuntu proposed to me to install the updates, and I did it: this operation can be also done manually by launching the following commands from the terminal (by root):


apt-get update
apt-get dist-upgrade

Then I redirected the Documents, Pictures, Music, Videos, Downloads folders from both Windows and Linux to point to common folders in the shared partition, because it made no sense to have different folders for things that it’s better to have in common.

Hardware configuration

The hardware recognition from Ubuntu and Linux in general was really impressive, especially with the help of new kernels, if compared to Windows which doesn’t recognize anything without the drivers released from the companies who did the hardware devices.
Sound was automatically ok, and the same for the most basic computer functionalities, included the touchpad, my mouse that I connected to the USB port, ethernet and wireless interfaces and the nvidia video card that was correctly detected but for which a free and open driver (not the original proprietary one for legal reasons) was installed. However the proprietary driver is completely free (even if closed-source) and it’s necessary to use it to handle functionalities such as screen rotation, so I installed it using the “Restricted drivers manager” in which it was sufficient to mark a checkbox asking about using the proprietary driver or not, so really easy. You can also control videocard settings by installing the program nvidia-settings via apt, that is through the command (by root)


apt-get install nvidia-settings

Instead no automatic support for Wacom technology (portrait-orientable screen, stylus, automatic rotation) and for suspension/hibernation, let’s see how I enabled them.
At first a little premise: installation and configuration of several hardware devices can be done by working on the file /etc/X11/xorg.conf, for example to configure video card you can add and/or change many parameters in it and it’s right the file I worked on to enable Wacom technology.

Wacom technology and extra keys

Fortunately the new Xorg makes Wacom installation really simple, in that the file xorg.conf already contains all the necessary fields, it’s sufficient to uncomment them. It’s right what I did and, after having restarted Xorg, Wacom technology worked and I could use the stylus as a mouse to select, open, close, drag and drop all the objects on the desktop. However, no rotation yet. In Windows it’s sufficient to rotate screen and the Windows desktop automatically rotates from landscape to portrait and vice versa, in Linux it seems that an event associated to screen rotation isn’t present, so the operating system can’t realize that screen has been rotated and the desktop rotation can be done only manually. I looked on Internet for any workarounds, but no way. So let’s see how to obtain manual rotation. At first I installed wacom-tools from apt, which contains all the tools to handle rotation, then I added the following line to all the sections Device of the file /etc/X11/xorg.conf:


Option "RandRRotation" "true"

after that I created the shell script “rotate”, with the following content:

#!/bin/sh
NORMAL () {
xrandr -o normal
xsetwacom set stylus rotate 0
xmodmap -e "keycode 10 = 1 exclam"
xmodmap -e "keycode 11 = 2 at"
xmodmap -e "keycode 12 = 3 numbersign"
xmodmap -e "keycode 13 = 4 dollar"
xmodmap -e "keycode 14 = 5 percent"
xmodmap -e "keycode 15 = 6 asciicircum"
}
LEFT () {
xrandr -o left
xsetwacom set stylus rotate 2
xmodmap -e "keycode 10 = Left"
xmodmap -e "keycode 11 = Right"
xmodmap -e "keycode 12 = Up"
xmodmap -e "keycode 13 = Down"
xmodmap -e "keycode 14 = Return"
xmodmap -e "keycode 15 = Escape"
}
RIGHT () {
xrandr -o right
xsetwacom set stylus rotate 1
xmodmap -e "keycode 10 = Right"
xmodmap -e "keycode 11 = Left"
xmodmap -e "keycode 12 = Down"
xmodmap -e "keycode 13 = Up"
xmodmap -e "keycode 14 = Return"
xmodmap -e "keycode 15 = Escape"
}
INVERTED () {
xrandr -o inverted
xsetwacom set stylus rotate 3
xmodmap -e "keycode 10 = Up"
xmodmap -e "keycode 11 = Down"
xmodmap -e "keycode 12 = Right"
xmodmap -e "keycode 13 = Left"
xmodmap -e "keycode 14 = Return"
xmodmap -e "keycode 15 = Escape"
}
if [ $1 = 'normal' ]
then NORMAL
elif [ $1 = 'left' ]
then LEFT
elif [ $1 = 'right' ]
then RIGHT
elif [ $1 = 'inverted' ]
then INVERTED
else
orientation=`xrandr --verbose | grep connected | awk '{print $5}'`
if [ $orientation = 'normal' ]
then RIGHT
elif [ $orientation = 'right' ]
then INVERTED
elif [ $orientation = 'inverted' ]
then LEFT
elif [ $orientation = 'left' ]
then NORMAL
fi
fi

I put it in /usr/bin/, so you can call it by typing rotate , where can be normal, inverted, left, right. If you don’t specify anything, the script will rotate 90 degrees from the current orientation. The script code is really simple, for each direction it rotates the desktop, set correctly the stylus to correctly handle new screen orientation and set the extra keys (the little joystick and the two keys next to it).
Few words about the extra keys, that we want to behave as close as possible to the behaviour they have in Windows: the joystick behaves as the directional keys (and it automatically corrects directions when screen is rotated) and as “Enter” when pressed, while the other two keys behaves as “Esc” and “Ctrl+Alt+Del”, respectively.
In Linux each key on the keyboard has a keycode, and using the program xmodmap we can associate each keycode with the output that must be generated when we press that key.
The third extra key has already a correct behaviour, in fact it calls the shut down window, in which the user can choose among Shutdown, Standby, Hibernation and Logout. The other two extra keys have the same keycode as other keys (some numbers on the keyboard, from 1 to 6, taking into account that joystick can be pressed and oriented, so there are 5 directions only for it), so if we press them, numbers are generated. We can’t change them when we use the tablet in normal orientation, because, if for example we associate directions to the joystick, the number keys will change, too, and we don’t want that. However, we can change them when we have to use the tablet with the screen rotated, in that, even if also number keys change, we don’t mind about that because keyboard remains under the screen and we can’t access it. So the script, for each orientation, also handles extra keys: it sets the correct direction for joystick, associate the second key with “Esc” and doesn’t change the third one because it already works properly calling the Shutdown window. The keys will return to normality when screen orientation will be set again to “normal”. To avoid calling every time the script to set orientation (it could be uncomfortable to call it when the screen is rotated), I associated some keys shortcuts, which use the Super key (the key with the Windows Logo) and the arrows:

Super + Left Arrow = rotate left
Super + Right Arrow= rotate right
Super + Down Arrow= rotate inverted
Super + Up Arrow= rotate normal

You can also use gestures to get rotation: if you launch the program “wayv” (I will deal about it in the programs section at the end of this document), a little white window will appear at the top-left corner of your desktop and you can write with your stylus a “C” in it, that is equivalent to launch the command “rotate”, or you can write a “ɣ” to return to the normal orientation.
Maybe it’s not the best solution, but it works, surely it would be possible to find something better spending much time on it.
Another little problem was the stylus. It could be used as a mouse, with the tip used as the left button, but neither the thumb button nor the back button (eraser) of the stylus were properly set and there wasn’t a right button, so I added some lines in the file xorg.conf to set all this. In particular, I added the lines


Option "Button2" "3"
Option "Button1" "1"

in the section about the stylus, I added the line


Option "Button1" "2"

in the section about the eraser.
So now you can use the stylus thumb button to right-click and the back button as middle button.

Touchpad

The touchpad already worked well, but I edited its section in the file xorg.conf and added the following line:


Option "SHMConfig" "on"

which allows the user to install tools like gsynaptics and qsynaptics that configure the touchpad and that can be easily installed via apt (apt-get install gsynaptics qsynaptics).

Fn keys

The Fn keys seem to work properly, anyway it’s possible to install the tool fnfx to handle them. You can also go to System->Preferences->Keyboard Shortcuts to configure all these shortcuts.


SD_Slot drive

This drive seems not to work, because there is no driver for it on Linux. Some people reported that this drive works only in some conditions as rescue drive for booting the pc.

Some utilities

You can install some utilities for your tablet via apt, they are laptop-mode-tools and powernowd. Another utility you should install is a download manager, such as gwget or kget.

Suspension/Hibernation

Suspension and hibernation are handled by ACPI, but their support is far from being mature, in that it works only sometimes and in some cases it doesn’t work at all. In fact I tried them in the tablet and they rarely worked. It’s almost impossible to find a definitive solution on-line, in that solutions vary depending on the kernel version, Xorg version, hardware you have (especially the video card), drivers you use, Linux distribution and its version, ACPI version, and so on. However I managed to obtain something, in fact now both suspension and hibernation work, even if serial devices after them stop working, and this is a big problem in that Wacom technology uses serial configuration to work, so we have to renounce to the stylus till next reboot. Any workaround found on-line to make serial devices work again failed, it seems to be a kernel problem, which will be quite surely solved in next releases, so we have to wait for now or… renounce to suspend/hibernate or to use the pen after we do it.
However, let’s see how to make suspension and hibernation work: edit xorg.conf and add the following line

Option "NvAgp" "1"

to all the section “Device”; now install via apt the utility pm-utils and reboot your tablet (not sure it’s required but it can be useful). Now suspension and hibernation should work, but take into account that, because of a little bug, when you return from suspension/hibernation you probably have to close the screen and re-open it to force images to appear again. And of course remember that you can’t use stylus till next reboot.

Open-source software installation

After Linux installation and configuration I downloaded some applications and tools which can be useful, especially for tablets. Some of them have also a Windows version, even if in general they give the best in Linux. I created the folder “PenBasedApps” which contains all the links to these programs and placed it on the desktop.
I didn’t analyze them in details, but some of them really impressed me. As follows there is a brief description of each of these programs.


Cellwriter

It’s surely the most amazing application among the ones I saw. CellWriter is a grid-entry natural handwriting input panel. As you write characters into the cells, your writing is instantly recognized at the character level. When you press Enter on the panel, the input you entered is sent to the currently focused application as if typed on the keyboard. It can be downloaded (both source and deb package) from the webpage http://risujin.org/cellwriter/ , where you can also find a tutorial on how to use it. After a brief phase of training, in which I wrote 5 times each letter, in the tests I made Cellwriter was able to correctly recognize 90% of what I wrote, so better than the Input Panel of Windows.

Xournal, Gournal, Jarnal and NoteLab

They are applications for notetaking, sketching and keeping a journal using a stylus, so they are the correspondent Linux application to Windows Journal. Xournal and Gournal can be easily installed via apt (apt-get install xournal gournal), Jarnal can be downloaded from http://www.dklevine.com/general/software/tc1000/jarnal.htm and NoteLab from http://sourceforge.net/projects/java-notelab/ . The last two have also a Windows and a MacOS X version. Most of them are able to open pdf files, write on them with the stylus and save again them as pdf files, so it’s really useful when we are reading a document and we want to take notes on it and keep them. In particular, Xournal impressed me more than the others.

Matchbox

It can be installed via apt (apt-get install matchbox) or downloaded from the website http://matchbox-project.org/ . It’s an open-source base environment for the X Window System, similar to Gnome, KDE but suitable to run on non-desktop embedded platforms such as handhelds, set-top boxes, kiosks and anything else for which screen space, input mechanisms or system resources are limited. It’s used also in projects such as the OpenMoko “Neo1973” or OLPC (One Laptop Per Child). It’s not necessary to use it on tablets but it’s worth to give it a try.

matchbox-keyboard, onboard, gtkeyboard, gok and xvkbd

They are virtual keyboards, so they are the correspondent Linux application to the Windows virtual keyboard, but they are better, in that they often have useful additional features. They all are installable via apt. In particular, after a quick look, xvkbd impressed me more than the others, in that it seems it can emulate better than the others the behaviour of the keys: for example, by pressing in it Ctrl + Alt + Del we can see the Logout window, as it happens with the normal keyboard.

All in one Gestures, Mouse Gestures, xgestures, wayv, libstroke

A mouse gesture is a way of combining mouse movements and clicks which the software recognizes as a specific command. Mouse gestures can provide quick access to common functions of a program. They can also be useful for people who have difficulties typing on a keyboard.
The first two are Firefox extensions and they can be downloaded from Mozilla website, so they are limited to the Firefox web browser, for example allowing the user to navigate to the previously viewed page by pressing the right mouse button, moving the mouse briefly to the left, then releasing the button.
Take into account that you can’t use both of them in the same time, you have to enable one of them and keeping the other one disabled.
xgestures and wayv are instead used to enable gestures in all the operating system: the first one can be downloaded from http://www.cs.bgu.ac.il/~tzachar/xgestures.html (you have at first to install some dependencies via apt, that is libxmu-dev, libxrender-dev and libxtst-dev), while wayv can be installed via apt. I worked more on wayv and it seems to work well, I also integrated it with rotation.
libstroke is instead a library that can be used to create applications which use mouse gestures and can be installed via apt (apt-get install libstroke0); for further information please look at http://www.etla.net/libstroke/.

Other Firefox extensions

To improve Firefox you can install these two extensions from Mozilla website: Tab Mix Plus and Flashgot, the first one improves Firefox tab management while Flashgot interfaces Firefox with download managers like gwget or kget.

JMathNotes, JEquation, The Freehand Formula Entry System

They are programs that recognize mathematical expression inserted by the user by using stylus. They all are in early development stage and they have also a Windows version. JMathNotes and JEquation can be downloaded respectively from http://page.mi.fu-berlin.de/tapia/JMathNotes/ and from http://jequation.sourceforge.net/index.html and seem to be really promising. The Freehand Formula Entry System can be downloaded from http://www.cs.queensu.ca/drl/ffes/ , it requires the installation of many dependencies that have to be manually compiled and at the end I didn’t manage to make it work properly, in that it seems to understand the mathematical expressions I write, but it returns always errors, so it surely requires a better and deeper look.

Tablet apps

They can be downloaded from http://alexmac.cc/tablet-apps/ (both the source and the Ubuntu deb package are present) and allow the user to configure some aspects such as the pressure of graphics tablets and so also the pressure of the stylus on the screen.

Synergy

It can be installed via apt (apt-get install synergy) and lets you easily share a single mouse and keyboard between multiple computers with different operating systems, each with its own display, without special hardware. It’s intended for users with multiple computers on their desk since each system uses its own display. It’s sufficient to move the mouse outside the screen of a computer and it will go to the screen of the other computer. You can also copy and paste from a computer to the other one. Even if it’s still in development, it’s surely a promising software.

Dasher

Dasher can be installed via apt (apt-get install dasher) and is a computer accessibility tool enabling users to enter text efficiently using a pointing device rather than a keyboard. It has been likened to an arcade game (car driving), as users zoom through characters that fly across the screen in order to input text. It uses a probabilistic predictive model to give priority to more likely character combinations. Dasher can be used also with an eye-tracker and this makes it a really interesting software. I tried it and the result was not so good, but in the website they say it’s normal in a first time and that after learning good results will come, in fact they declare that the eye-tracking version of Dasher allows an experienced user to write text as fast as normal handwriting (29 words per minute),while experienced users with a mouse can write at 39 words per minute. Further information at http://www.inference.phy.cam.ac.uk/dasher/.

Other useful software

Grandr (apt-get install grandr) is an applet that allows you to select screen resolution and orientation from the GNOME Panel.

Gogh (http://www.goghproject.com/) is a GNU/Linux bitmap graphics editor, designed to work with pressure-sensitive input devices, like a Wacom tablet.

Gromit (apt-get install gromit) enables the user to make annotations on the screen. This is especially useful when making presentations, to highlight things or point out things of interest.

Denim (http://dub.washington.edu/denim/) is useful for web design, in that it converts the initial diagrams done to design the website and drawn with a graphics tablet (or with a mouse) directly into functional web site prototypes. It’s also available for Windows and MacOS X.

Yudit (apt-get install yudit) is a Unicode text editor that supports various input methods, included handwriting.

Tabatha (http://groundstate.ca/tabatha) is a quick, simple, popup menu to run system commands.

By Giacomo Fazio (aka l3golas)

Related Posts:


Leggi Anche




  • Tosh Says:
    giugno 26th, 2008 at 12:58

    Useful HowTo!

    Rispondi

  • pippo Says:
    novembre 15th, 2008 at 06:05

    ciao, stavo leggendo e mi hai fatto venire in mente alcune idee carine, tipo quella di gestire la rotazione con il gesture :-)

    vorrei chiederti una cosa, usi ubuntu?
    se si, hai anche te il fastidioso problema con la penna dopo il suspend?
    Io uso la intrepid e al “risveglio” il cursore e’ sfasato rispetto alla posizione della penna e devo per forza riavviare X.

    ciao

    PS cavolo, per colpa tua sto facendo le ore piccole … :-D

    PS2 anche io ho un m200.

    Rispondi

  • German Says:
    febbraio 10th, 2009 at 18:48

    do you know if this tutorial works for intrepid 8.10?,
    thanks in advance

    Rispondi