Ubuntu Intrepid Ibex (8.10) on a Toshiba Portege M400

Posted on Fri 24 October 2008 in Technology

After doing a fresh install of Ubuntu Intrepid Ibex (8.10) on my Toshiba Portege M400 there were some configuration changes that needed to be made.

Getting the tablet working

  1. Install the wacom-tools and xserver-xorg-input-wacom packages, if they’re not already installed:

    $ sudo apt-get install xserver-xorg-input-wacom wacom-tools
    
  2. Back-up your current, working xorg.conf file

    # sudo cp /etc/X11/xorg.conf /etc/X11/xorg.conf.1.bkp
    
  3. Make the following changes to the /etc/X11/xorg.conf file:

    # xorg.conf (X.Org X Window System server configuration file)
    #
    # This file was generated by dexconf, the Debian X Configuration tool, using
    # values from the debconf database.
    #
    # Edit this file with caution, and see the xorg.conf manual page.
    # (Type "man xorg.conf" at the shell prompt.)
    #
    # This file is automatically updated on xserver-xorg package upgrades *only*
    # if it has not been modified since the last upgrade of the xserver-xorg
    # package.
    #
    # If you have edited this file but would like it to be automatically updated
    # again, run the following command:
    #   sudo dpkg-reconfigure -phigh xserver-xorg
    
    Section "InputDevice"
        Identifier  "Generic Keyboard"
        Driver      "kbd"
        Option      "XkbRules"  "xorg"
        Option      "XkbModel"  "pc105"
        Option      "XkbLayout" "us"
    EndSection
    
    Section "InputDevice"
        Identifier  "Configured Mouse"
        Driver      "mouse"
        Option      "CorePointer"
    EndSection
    
    Section "InputDevice"
        Identifier  "Synaptics Touchpad"
        Driver      "synaptics"
        Option      "SendCoreEvents"    "true"
        Option      "Device"        "/dev/psaux"
        Option      "Protocol"      "auto-dev"
        Option      "HorizEdgeScroll"   "0"
    EndSection
    
    Section "InputDevice"
            Driver          "wacom"
            Identifier      "stylus"
        Option      "SendCoreEvents"    "true"
            Option          "Device"        "/dev/input/wacom"
            Option          "Type"          "stylus"
        Option      "ForceDevice"   "ISDV4" # Tablet PC ONLY
    EndSection
    
    Section "InputDevice"
            Driver          "wacom"
            Identifier      "eraser"
        Option      "SendCoreEvents"    "true"
            Option          "Device"        "/dev/input/wacom"
            Option          "Type"          "eraser"
        Option      "ForceDevice"   "ISDV4" # Tablet PC ONLY
    EndSection
    
    Section "InputDevice"
            Driver          "wacom"
            Identifier      "cursor"
        Option      "SendCoreEvents"    "true"
            Option          "Device"        "/dev/input/wacom"
            Option          "Type"          "cursor"
        Option      "ForceDevice"   "ISDV4" # Tablet PC ONLY
    EndSection
    
    Section "Device"
        Identifier  "Configured Video Device"
    EndSection
    
    Section "Monitor"
        Identifier  "Configured Monitor"
    EndSection
    
    Section "Screen"
        Identifier  "Default Screen"
        Monitor     "Configured Monitor"
        Device      "Configured Video Device"
    EndSection
    
    Section "ServerLayout"
        Identifier  "Default Layout"
        Screen      "Default Screen"
        InputDevice "Synaptics Touchpad"
        InputDevice     "stylus"
        InputDevice     "cursor"
        InputDevice     "eraser" 
    EndSection
    

    A copy of my xorg.conf can be downloaded from here

  4. Reboot the system, and the wacom tablet should now work

Rotating the screen

I created the following script as /home/derrick/bin/rotate.sh

#! /bin/sh

orientation=`xrandr -q | grep "LVDS"| awk '{print $4}' | sed 's/[^A-Za-z]//g'`
if [ "$orientation" = "normal" ]; then
    /usr/bin/X11/xrandr --orientation right
    xsetwacom set stylus rotate CW
    onboard &
else
    /usr/bin/X11/xrandr --orientation normal
    xsetwacom set stylus rotate
    killall onboard
fi

The script checks to see if the orientation is set to “normal”, and, if so, rotates the screen and tablet input 90 degrees clockwise. If it’s not set to “normal” it rotates it back. I’ve also set it to automatically start onboard, an on-screen keyboard when rotated. It then closes it when rotating it back to normal.
The script can be downloaded from here.

I then configured the screen rotation button on the tablet to execute the script using gconf-editor. You go to System Tools-> Configuration Editor, then in apps-> metacity, go to global_keybindings. At run_command_1, write Super_R. Then in keybinding_commands, at command_1 I put the following:

sh /home/derrick/bin/rotate.sh

You’ll want to make sure that you specify the path to where the script is on your own system, and that the permissions are correct. The following commands can be used to set these values automatically without having to go through the GUI:

gconftool -s /apps/metacity/global_keybindings/run_command_1 -t string Super_R
gconftool -s /apps/metacity/keybinding_commands/command_1 -t string /home/derrick/bin/rotate.sh

Check to make sure that Super_R isn’t set up as a keyboard shortcut for anything else. Now if you press the screen rotate button on the tablet it will rotate the screen and wacom input.

Getting the fingerprint scanner to work

Currently there is a [bug that requires you to press Enter to log in after swipping your finger. The following steps will allow you to swipe your finger to authenticate via su/sudo/gksu and gnome-screensaver.

  1. Install the libpam-thinkfinger and thinkfinger-tools packages

    sudo apt-get install libpam-thinkfinger thinkfinger-tools
    
  2. Acquire a fingerprint that you will use to log in. You will need to run this as your user, and repeat this step as each user you would like to be able to log in using the fingerprint scanner.

    sudo tf-tool --acquire
    
  3. Test the fingerprint

    sudo tf-tool --verify
    
  4. Run the supplied script to automatically configure PAM

    /usr/lib/pam-thinkfinger/pam-thinkfinger-enable
    
  5. Add a new group to the system

    sudo groupadd fingerprint
    
  6. Save the following to a new file, /etc/udev/rules.d/60-thinkfinger.rules

    #
    # udev rules file for the thinkfinger fingerprint scanner
    # 
    # gives access to the fingerprint reader to those in the "fingerprint" group
    #
    # Taken from:
    #  http://www.thinkwiki.org/wiki/How_to_enable_the_fingerprint_reader_with_ThinkFinger
    # which was taken and modified from:
    #  http://article.gmane.org/gmane.linux.drivers.thinkfinger/329
    #
    
    # SGS Thomson Microelectronics Fingerprint Reader
    SYSFS{idVendor}=="0483", SYSFS{idProduct}=="2016", SYMLINK+="input/thinkfinger-%k", MODE="0660", GROUP="fingerprint"
    
    # the also-needed uinput device
    KERNEL=="uinput", MODE="0660", GROUP="fingerprint"
    
  7. Make the following changes to your /etc/pam.d/gnome-screensaver file:

    @include common-auth
    auth sufficient pam_thinkfinger.so
    
  8. For each you would like to be able to use the fingerprint scanner to unlock the screen run the following commands:

    gpasswd -a <username> fingerprint
    chown <username>:root ~/.thinkfinger.bir
    
  9. Reboot the system, and you should now have a working fingerprint scanner

Setting wacom tablet pen functions

I like for the eraser to act as the mouse right-click, but by default it does the same left-click as the pen tip. This functionality can be set using the following command:

xsetwacom set eraser Button1 "button 3"

This setting goes away each time the system is rebooted, unfortunately. I’ve set it be executed each time I log into gnome by adding it to the session preferences.

  1. Go to System->Preferences->Sessions under the Gnome menu.
  2. Click “Add” under Startup Programs
  3. paste the following command:
    xsetwacom set eraser Button1 "button 3"
    

Now when clicking the eraser on the screen the right-click menu is displayed.

Turn off IPv6

You can disable the unnecessary IPv6 traffic by adding the following line to the end of the /etc/modprobe.d/blacklist file:

blacklist ipv6

You should now at least notice that web pages load faster, as the system is no longer trying to do a IPv4 and IPv6 DNS lookups.

Enabling GSynaptics

Install the GSynaptic package

sudo apt-get install gsynaptics

Edit the /etc/X11/xorg.conf file add the SHMConfig option as shown below:

Section "InputDevice"
    Identifier  "Synaptics Touchpad"
    Driver      "synaptics"
    Option      "SendCoreEvents"    "true"
    Option      "Device"        "/dev/psaux"
    Option      "Protocol"      "auto-dev"
    Option      "HorizEdgeScroll"   "0"
    Option      "SHMConfig"    "true"

EndSection

Then log out so X restarts, and log back in. You can then select System->Preference->Touchpad to use Gsynaptics to tweak the touchpad settings.

Note

Vertical scrolling with the touchpad will not work unless you remove the above section from the xorg.conf.