Middle Mouse Scrolling in Ubuntu 10.04 Lucid Lynx

Posted in Guides, Linux, Ubuntu by aliencam | No Comments »

For this release, Ubuntu switched away from hal/udev  and went back to the old xorg configuration (I like this much better). There have been improvements and changes to the xorg.conf since we last used it (8.10 wow that’s been a long time!)  so now instead of putting everything in one giant /etc/X11/xorg.conf file and risking a single typo from breaking your x-server, we can put files in xorg.conf.d . This splits up configuration files so they can be more easily organised.

Here are the steps to get the middle-mouse scrolling again in Ubuntu 10.04, the Lucid Lynx. This should work for just about every thinkpad, and this same procedure will work in any Linux operating system using the xorg.conf.d method (if the /usr/lib/X11/xorg.conf.d/ folder doesn’t exist, then your distro is probably not using this method).

Begin by opening a terminal, and editing/creating the configuration file:
sudo gedit /usr/lib/X11/xorg.conf.d/20-thinkpad.conf

Now, paste in the following contents:
Section "InputClass"
Identifier "Trackpoint Wheel Emulation"
MatchProduct "TPPS/2 IBM TrackPoint|DualPoint Stick|Synaptics Inc. Composite TouchPad / TrackPoint|ThinkPad USB Keyboard with TrackPoint"
MatchDevicePath "/dev/input/event*"
Option "EmulateWheel" "true"
Option "EmulateWheelButton" "2"
Option "Emulate3Buttons" "false"
Option "XAxisMapping" "6 7"
Option "YAxisMapping" "4 5"
Option "EmulateWheelTimeout" "200"
EndSection

you’ll probably want to delete and re-type all of those quotation marks, I don’t trust wordpress’ “code” tags to keep those straight. Then you’re ready to save and close the file. A quick restart of X (reboot your computer, or ctrl-alt-backspace if you enabled that in System > Preferences > Keyboard > Layouts > Options > Key Sequence to Kill the X Server > check the box. )

The line “EmulateWheelTimeout” is not absolutely necessary, but it does help prevent things from being randomly pasted everywhere whenever you try to scroll (for some reason people think it is funny to automatically map middlemouse to “paste”).

Sources: http://www.eastwoodzhao.com/thinkpad-middle-button-scroll-ubuntu-linux-10-04-lucid-lynx/
http://fedoraproject.org/wiki/Input_device_configuration
http://www.thinkwiki.org/wiki/How_to_configure_the_TrackPoint#xorg.conf.d
http://blog.aliencam.net/articles/ubuntu-9-04-setup-guide/ (yes, I just cited myself.)

–aliencam

Raw Configuration Logs 1

Posted in Linux, Ubuntu by aliencam | 3 Comments »

I was very disappointed in my post release schedule for the previous version of Ubuntu (9.04 Jaunty). I didn’t get most of my posts done until 3 or 4 months after the OS had been out… I vow not to do that again. Part of the way I’m going to do this is to post my raw daily configuration logs. Seasoned linux users, and even some novices, should be able to follow these if they really need to get something done, but now nobody will have to wait for me to get my act together and write a real post.

Here is what I have done as of 3:00PM on Saturday, Oct 31, 2009 (approaching 24 hours after I started the install).

_________________________________________________________________________
Programs Installed:

bootchart
sysv-rc-conf
seahorse-plugins
flashplugin-installer
vlc
mozilla-plugin-vlc
ubuntu-restricted-extras
ttf-droid

GNOME DO ——
deb http://ppa.launchpad.net/do-core/ppa/ubuntu karmic main
deb-src http://ppa.launchpad.net/do-core/ppa/ubuntu karmic main
install the key (hightlight, right-click, use fireGPG to import the key)
—————

________________________________________________________________________
Configurations:

CTRL-ALT-Backspace: ————–

Select “System”->”Preferences”->”Keyboard”
Select the “Layouts” tab and click on the “Layout Options” button.
Select “Key sequence to kill the X server” and enable “Control + Alt + Backspace”.
———————————-

Gnome-Do: ———————–
open do (win-space), click arrow key in top right> preferences
General > check “start Gnome Do at Login” and “Hide Window on First Launch (quiet mode)”.
Appearence > Theme > select “mini”
Plugins > select (addtionally to the defaults) “files and folders”
———————————

_______________________________________________________________________
Customizations:

system>preferences>appearence>interface check “show icons in menus”

system>preferences>appearence>fonts select “best contrast” rendering

system>preferences>appearence>fonts >details change “resolution: 96” to “72 dpi”

right-click on panel >properties>size> change 24px to 19 px.

WINDOW PICKER: ——————-

sudo apt-get install window-picker-applet maximus
startup applicatoins: “maximus -m”
add “window picker” to panel
right-click window picker (the lines on the left) preferences, uncheck “show windows from all workspaces”.
in “startup applications, edit “maximus” and change the command to be “maximus -m”

————————————-
remove bottom panel remove menu bar, add main menu, trash bin, cpu frequency monitor, workspace switcher, remove firefox and help shortcut icons

MIDDLE MOUSE SCROLLING:—————————
sudo gedit /etc/hal/fdi/policy/mouse-wheel.fdi
paste in and remove the spaces after the < : < match key="info.product" string="TPPS/2 IBM TrackPoint">
< merge key="input.x11_options.EmulateWheel" type="string">true< /merge>
< merge key="input.x11_options.EmulateWheelButton" type="string">2< /merge>
< merge key="input.x11_options.YAxisMapping" type="string">4 5< /merge>
< merge key="input.x11_options.ZAxsisMapping" type="string"> 4 5< /merge>
< merge key="input.x11_options.XAxisMapping" type="string">6 7< /merge>
< merge key="input.x11_options.Emulate3Buttons" type="string">true< /merge>
< merge key="input.x11_options.EmulateWheelTimeout" type="string">200< /merge>
< /match>

————————————————-

________________________________________________________________________
Firefox:
EXTENSIONS:————————————————–

firegpg
adblock plus (select the default filter)

CUSTOMIZATIONS:———————————————-
about:config broswer.search.openintab > true
middemouse.paste > false

right-click, uncheck “bookmarks tookbar”

________________________________________________________________________
Restored Items:

encryption keys (just drag into seahorse program)

FSPOT RESTORE:———————————————
restore “photos” folder
overwrite the ~/.config/fspot folder (that has the fspot.db in it)
———————————————————–

________________________________________________________________________
To Do:

investigate AppArmor Firefox (ubuntu technichal overview)
try: http://tpctl.sourceforge.net/configure-trackpoint.html

Installing Ubuntu 9.10 Karmic Koala

Posted in Linux, Ubuntu by aliencam | 14 Comments »

I just installed the newest version of Ubuntu, Karmic Koala. The website said that an install should only be about 20 minutes, so I wanted to time it. I started at 3:52, and by 4:00, the installation was “configuring apt” with the option to “skip” (I did not skip until 7 minutes later, after it had been “downloading language packs” for 5 minutes ( I only want english) :P. The installation had completed by 4:10, and I was browsing the internet by 4:12.

Computer: Thinkpad x61 Tablet with Multi-Touch (7764).

Works OOTB:
Audio
Volume keys
Tablet buttons (the “lock” button, arrow keys, and power button)
All applicable FN key combinations
“Back” and “Forward” web browsing buttons
Tablet with stylus
Tablet with touch (!) (needs to be calibrated at the edges)
Wifi
Ethernet
Bluetooth
Suspend/Hibernate (Hibernate is a little slow still, but much faster than it was in 9.04)
…and most everything else

Doesn’t Works OOTB:
Middle-mouse-scrolling (ugh.)

Anyway, it is great to have a nice clean computer to use, and I really like the new boot screens (they should have put that as the default desktop background).

Ubuntu Setup Guide VIII. Wacom Tablet Config & Rotation

Posted in Linux by aliencam | 7 Comments »

The tablet on the X61t is amazing. Unfortunately, not everything works out of the box. This guide goes through setting up most of the tablet-related things on the x61t.

what doesn’t work:  wacom cpl and all of it’s configurations, screen rotation, touch (kind of works, but it needs the wacomcpl configurations that don’t work), the “eraser” button, the rotation hotkey,

First thing you need to do is make sure you have wacom-tools and xserver-xorg-input-wacom installed:

sudo apt-get install wacom-tools xserver-xorg-input-wacom

Now, we run into a roadblock.  Ubuntu 9.04 does something strange with the names of each device, so if you go and try to use any of the utilities that were just installed (wacomcpl and xset wacom being just a few of what is included in the above), it can’t find the actual input devices.  In order to remedy this, we need to install a short script from the Ubuntu forums.

Open a root text editor (alt-f2 then enter “gksu gedit”, or type that into a terminal) and paste in the following content:

# wacom-names script by Roger E. Critchlow, Jr. (4-12-09)
# modified by gali98/Favux (4-14-09)
#
# Obtained/shortened by aliencam (aliencam.net) from:
# http://ubuntuforums.org/showthread.php?p=7068115#post7068115
#
#! /bin/sh
## find any wacom devices
for udi in `hal-find-by-property --key input.x11_driver --string wacom`
do
type=`hal-get-property --udi $udi --key input.x11_options.Type`
## rewrite the names that the Xserver will use
hal-set-property --udi $udi --key info.product --string $type
done

Now save it in /etc/init.d/ as “wacom-names”

Close gedit, and in a terminal, enter:

sudo chmod +x /etc/init.d/wacom-names

now you must make sure the file is at /etc/init.d/wacom-names before you do the next step, otherwise you’ll have problems booting, and could run into some other fun issues. Do this by actually going to the file explorer  (Places > Computer > Filesystem)  and looking for the file “wacom-names” in /etc/init.d.   (or type find /etc/init.d/wacom-names into a terminal and make sure it returns “/etc/init.d/wacom-tools” )

One more check, and “ls -l /etc/init.d/wacom-names” in a terminal should return “-rwxr-xr-x 1 root root 508 2009-06-27 00:50 /etc/init.d/wacom-names”    (with a different date and time of course)

Now, back in the terminal, the following line sets the script to run after HAL, but before X, meaning that before X even sees the devices, they are correctly named:
sudo update-rc.d wacom-names start 27 2 3 4 5 .

then it should return something similar to:

update-rc.d: warning: /etc/init.d/wacom-names missing LSB information
update-rc.d: see <http://wiki.debian.org/LSBInitScripts>
Adding system startup for /etc/init.d/wacom-names ...
/etc/rc2.d/S27wacom-names -> ../init.d/wacom-names
/etc/rc3.d/S27wacom-names -> ../init.d/wacom-names
/etc/rc4.d/S27wacom-names -> ../init.d/wacom-names
/etc/rc5.d/S27wacom-names -> ../init.d/wacom-names

the “Missing LSB information” line is nothing to worry about for these purposes.  LSB Information is a line in the file that is supposed to say what the dependencies for the file are, making sure that it is executed in the correct order. We added it to run in S27 in levels 2, 3, 4, and 5, so it should be fine. I wonder though if this will slow down boot time (this will be analyzed and addressed if necessary in one of the next sections) (UPDATE: it does not seem to adversely affect boot times.)

After restarting the computer, test this by entering “xsetwacom list” into a terminal, it should list the available wacom devices now. You can then use the “wacomcpl” (wacom control panel) to configure the tablet devices.

One thing I noticed was that after enabling the script, kerneloops reports a kernel bug every reboot and every time I resume from suspend/hibernate. It doesn’t seem to cause any real problems, but I would like to find out what is going wrong and how to fix it.

REMOVAL:
if you need to remove this script from startup, simply enter this command into the terminal:
sudo update-rc.d -f wacom-names remove

then delete the actual file with this command:
sudo rm /etc/init.d/wacom-names

SOURCES for wacom-names guide:
http://ubuntuforums.org/showthread.php?p=7068115#post7068115
https://help.ubuntu.com/community/X61T

Once you have the devices renamed properly configure touch by pressing alt-F2, and entering “wacomcpl”. You then need to click the “touch” device in the list, and select “Calibrate”. Then press the center of the pink selected box (first in the top left corner, then the bottom right) and it will recalibrate the touch device.

You also probably want to set the button on the stylus to be right-click, and the back button to be middle. To do this, in wacomcpl go to the “stylus” device, click “tool buttons”, and change “Button 2” to “right”. Then hit “Okay” and close wacomcpl.


Keeping Configuration After Reboot

Now, if you have a problem loosing the calibration every time you restart the computer (I do), the following steps will save your configuration between reboots.

first, you need to edit the .xinitrc file in your home directory. Open a terminal and enter:
gedit ~/.xinitrc

Now, put a # before the line “. /etc/X11/xinit/xinitrc” Save, and close. Now, you need to set this file to run on startup. Open System > Preferences > Startup Applications, and create a “New” entry.

Name it something you will remember, I chose “Wacom Config”
The command should be:
sh /home/$USERNAME/.xinitrc
and for a comment, I put “Sets wacom tablet configuration on boot.”

Now, just configure your wacom tablet settings as normal with wacomcpl (see above) and the settings will be saved.

UPDATE: (July 26, 2009) A recent update fixed the problem that was making this necessary.  If you did this fix and all of the sudden your configuration stopped working, just go into the System> Preferences > Startup Applications  and disable or delete the .xinitrc launcher that was created (the wacom configuration setting).


Screen Rotation Script

Screen rotation is one of the things I am most asked about with the X61t. Unfortunately, you can’t use the standard display control panel to rotate the screen because then the tablet input will not be rotated. Fortunately, this is a very easy fix once you have applied the wacom-names script (detailed above in this guide.)

This particular script rotates the screen clockwise 90 degrees every time you run it, so if you want the screen to be facing the right, you will have to run it three times, left is just once, inverted is twice, and four times to get it back to normal. I chose not to do an automatic rotation script because those use CPU cycles, and significantly decrease battery life. If you want automatic screen rotation see https://help.ubuntu.com/community/X61T#Setup%20Automatic%20Screen%20Rotation

First, create a new file for the rotate script in your home directory:
gedit ~/.rotate

Now, paste the following content into the empty rotate file, then save and close gedit:

#Screen Rotation Script by aliencam (http://aliencam.net)
#This script will only work if your Xserver has the correct tablet device names
#follow the guide on http://blog.aliencam.net/articles/ubuntu-9-04-setup-guide/
#! /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

else
if [ “$orientation” = “right” ]; then
/usr/bin/X11/xrandr –orientation inverted
xsetwacom set stylus rotate 3
else
if [ “$orientation” = “inverted” ]; then
/usr/bin/X11/xrandr –orientation left
xsetwacom set stylus rotate CCW
else
if [ “$orientation” = “left” ]; then
/usr/bin/X11/xrandr –orientation normal
xsetwacom set stylus rotate

else
/usr/bin/X11/xrandr –orientation normal
xsetwacom set stylus rotate
fi
fi
fi

fi

If you want the code formatted correctly (wordpress removes all my tabs and whitespace!) download the file here: http://cameronkopas.com/blog/wp-content/uploads/2009/06/rotate.txt into your home directory, and rename it from “rotate.txt” to “.rotate” (the “.” before the filename makes it a hidden file)

Now, we have to  make the file executable:

chmod +x ~/.rotate

At this point, you are ready to run the script. You can execute it by clicking on it in your home folder, but since we made it hidden it is more likely that you want to set a shortcut to execute the file. In the past, I have had a button on the panel at the top that I could click to rotate the screen, but now I realize that it would be much better (and space-conserving) to simply use the rotate screen button on the tablet itself.

If you still want to have a button on the panel, right click on an empty space, select “Add to panel” (you might have to move something to get empty space) then add a “Custom Application Launcher”, making the command “/home/$USERNAME/.rotate”

To set one of the tablet hardware buttons to be a shortcut key, you first have to find out it’s keycode. To do this, open a terminal and launch the program “xev”

Then move your mouse over to close the window that it spawns, but don’t close it yet. When your mouse is in position, press the tablet rotate button and you should get something like the following:
KeyPress event, serial 32, synthetic NO, window 0x4a00001,
root 0xaa, subw 0x0, time 1510919, (164,-20), root:(611,29),
state 0x0, keycode 199 (keysym 0x0, NoSymbol), same_screen YES,
XLookupString gives 0 bytes:
XmbLookupString gives 0 bytes:
XFilterEvent returns: False

In there you can see “keycode 199” remember this or write it down, then you can close the box that xev spawned. (if yours does not show a keycode, type the command “setkeycodes 6c 199”. see Here for the rest of the tablet buttons, and Here for other keys entirely.

At this point, you need to create an xmodmap file in your home directory, and set your computer to use that xmodmap file:
touch ~/.Xmodmap
xmodmap ~/.Xmodmap

Now, edit the file by entering “gedit ~/.Xmodmap” into a terminal to include the keys you want to map in the following format:
keycode < keycode> = < keysym>

So in my case, I want to map keycode 199 to the keysum XF86LaunchB (I’m saving LaunchA for later)
keycode 199 = XF86LaunchB

then save and close the file. You will have to restart X (haven’t gotten to setting that hotkey yet) so for now, logout and log back in, or restart the computer. You will then be asked which Xmodmap file you want to load, select the one you just created, press “load”, “do not ask me this again”, and then “okay”.

xmodmap

Now to actually set that key to launch the rotate script, you should already have compiz config settings manager installed (sudo apt-get install compizconfig-settings-manager if you don’t already). Open that in System > Preferences > (Display >) Compiz Config Settings Manager.

Within CompizConfig, click on “Commands” (should be top left) then go to the “Key Bindings” tab. Click on the word “Disabled” next to “Run Command 1” (I’m saving command 0 for later) then check the “Enabled” box. Now you need to click on “Grab Key Combination” and press the rotate screen button (it should then read XF86LaunchB). Now you can hit okay and go to the “Commands” tab.

In “Command Line 1” enter the command for the rotate script:
/home/$USERNAME/.rotate

Now check the “enable commands” box over in the left column, hit back, close compizconfig, and have fun with your new calibrated tablet with ondemand screen rotation!!!

SOURCES for rotation and hotkeys:
rotation script framework: http://wiki.control-d.com/index.php?title=Ubuntu_Intrepid_Ibex_(8.10)_on_a_Toshiba_Protege_M400#Rotating_the_screen
Tablet Hardware Buttons: http://www.thinkwiki.org/wiki/Tablet_Hardware_Buttons
Thinkpad Special Keys: http://www.thinkwiki.org/wiki/How_to_get_special_keys_to_work#Gnome.2Fmetacity

Ubuntu Setup Guide Part VII: Pidgin

Posted in Guides, Linux, Lists, Ubuntu by aliencam | 5 Comments »

Customizing Pidgin Settings:
if you use any instant messaging program, you will want to setup Pidgin to work with all of your accounts. It may be ugly and awkward to use at first, but once you change it’s settings it is actually very stable, quick, and it works perfectly for me.

When you first open Pidgin, you will need to add an account, just click “add”, then select the type of account it is, and enter your information. You can add as many accounts of any type as you like to pidgin, and it combines them all very well. Make sure you check the “remember password” option, or you will have to log into each account every time you start pidgin.

Once you finish that, go to Tools > Plugins, and enable the following plugins:

  • Buddy Notes
  • Buddy State Notification
  • Contact Availability Prediction
  • Log Reader
  • Psychic Mode
  • Timestamp
  • Pidgin-Encryption

You’ll also want to download the pidgin-facebookchat plugin from http://code.google.com/p/pidgin-facebookchat/  in order to be able to chat on facebook without actually logging onto the website.  (I don’t think I have actually typed in facebook.com in months, I chat through pidgin, reply to messaes via email or SMS, and update my status vis Twitter.)  To download the latest version, go to the website, and download the .deb file in the top right corner of the page. Then just install it by double-clicking on it.   Then restart Pidgin, and go back into the account manager (ctrl-a) and add the facebook account.

Now, go to Tools > Preferences and uncheck “show IMs and chats in tabbed windows”.  Then, select “None” in Smiley Themes.  Under “Logging” change “Log Format” to HTML.

If you have previous log files, you can copy those from your backup into /home/USERNAME/.purple/logs  andthey will work even if previous logs are from deadAIM, Trillian, and other AIM clients.

Finally, there are way too many libnotify alerts with all my accounts enabled, so go into File > Plugins,  scroll down to libnotify, and uncheck “Buddy Signs on”.

OpenSolaris (2008.05) on the Lenovo X61Tablet

Posted in Linux, Review by aliencam | 5 Comments »

I just installed OpenSolaris version 2008.05 (not the newest, the cd was given out at the ASULUG Installfest by an OpenSolaris rep) because I wanted to see how I like it. I am looking for another, lighter opperating system to supplement Ubuntu, and this is one of the first ones I have tried (SimplyMEPIS was my first test, but the newest version didn’t agree with me). Anyway, here is my first impression:

again, this is OpenSolaris 2008.05, NOT the newest version, 2008.11. I did not realize this was the old one until I had started installing it already.

I like Gnome, this is an improvement from that java desktop environment that I tried awhile back. I really did not like Solaris 10 when I tried that, mostly because of the desktop environment.

On the thinkpad x61t out of the box:

wifi works
the the trackpoint (mouse) works fine (no middle-mouse scroll, but not even ubuntu has that down OOTB)
sound DOES NOT work
tablet DOES NOT work.

the dock, with the CD drive, does work.
brightness adjustment does not work
none of the FN keys work (brightness, hibernate, sleep, lock, wireless radio)
bluetooth and wifi are stuck on (I don’t want Bluetooth on but I do want wifi…)
anything using the videocard seems to crash it.

I am currently updating the current version before I go through the upgrade process to 2008.11 version. Upgrading is not straightforward in this version, but it will be in the next version.

here are my problems with the OS itself:

device driver manager doesn’t open (I think that means there aren’t any device drivers found)
changing the visual effects settings to normal or high crashes the computer.
and I would also like to point out that the download for the updates is extremely slow, and it’s not on my end. (on ASU’s network I regularly get download speeds of 2MB/s and higher.)
random things take forever to open, or never open at all. (maybe this is due to the
hard resets, or because I’m running updates, or the hard resets during the update downloads).
Choosing a screensaver also just crashed the computer (it looks like anything that uses the videocard crashes this thing)
and when I brought the computer back up from crashing AGAIN, I couldn’t get wifi to work without toggling the wireless radio power switch on the laptop. (there aren’t any network managers that can do anything while the automagic network selector is running, and I don’t have any clue how to do anything with that)

Anyway, I’m going to bed and letting the update run overnight, hopefully I’ll wake up to a better functioning operating system. (OOTB version 2008.05 is unusable in my opinion.)

UPDATE: unfortunately, when I was playing around with the screensavers that crashed my computer, I somehow enabled one, and since that screensaver crashes my computer, I can’t open the screensaver selection menu to change/remove it, and none of the updates installed. This is just a mess, I’m going to try to download the 2008.11 version and install that.

Thinkpad Fingerprint Reader in Ubuntu 8.10 Intrepid

Posted in Guides, Linux, Ubuntu by aliencam | No Comments »

The version of thinkfinger in the Ubuntu 8.10 repositories does not yet work perfectly.  You can install and configure it close to the same way that it was in 8.04, however with one (annoying) difference.  Previously, you could just slide your fingerptint and it would be entered automatically, however a bug in this version makes it so that you have to slide your finger and then press the enter key.  if this doesn’t bother you, or you want to wait for the “official fix”, the follow these instructions (directions that fix this are  further below):

sudo apt-get install thinkfinger-tools libpam-thinkfinger

tf-tool --acquire

If that gives you an error, “could not get USB device” or similar, restart and try again.  Now it will ask you to slide your finger three times, do so until it reads 3 successful swipes.Then,

tf-tool --verify

It will ask you to swipe your finger one time, to verify the data on file. You no longer have to do the “tf-tool –add-user $USERNAME” command, it has been replaced by the above two commands.

At this point, there (thankfully) is a script that edits /etc/pam.d/common-auth so we don't have to. Execute the script with the following command:

sudo '/usr/lib/pam-thinkfinger/pam-thinkfinger-enable'

At this point everything should be working, just restart and you will be able to login and sudo using your fingerprint reader (keep reading to set it up to work on wake from suspend or screensaver).

If you do not want to have to press enter every time, before you install thinkfinger-tools and libpam-thinkfinger, you need to add the following sources to “Third Party Sources” under “Software Sources”:
deb http://ppa.launchpad.net/jon-oberheide/ubuntu intrepid main
deb-src http://ppa.launchpad.net/jon-oberheide/ubuntu intrepid main

Now, in order to have the fingerprint reader work to wake up from suspend or screensaver, use the following steps:

create a group “fingerprint” with the following command:

sudo groupadd fingerprint

then create a file with:

sudo nano /etc/udev/rules.d/60-thinkfinger.rules

Then paste in the following lines (use ctrl-shift-v to paste into terminal):


#
# 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”

Exit nano with ctrl-X, and save by hitting “y”.

Now, edit /etc/pam.d/gnome-screensaver with:

<code>sudo gedit /etc/pam.d/gnome-screensaver</code>

and add the lines:

auth sufficient pam_thinkfinger.so
auth required pam_unix.so try_first_pass nullok_secure

Between the two existing lines. save and exit.

Now add each user who has a fingerprint profile, and change the file permissions with the commands:

gpasswd -a $USERNAME fingerprint
chmod +x /home/$USERNAME/.thinkfinger.bir

Restart the computer, and it should work.  If you have any more problems leave a comment and I should be able to help you, or check out these other links that may help:

http://www.thinkwiki.org/wiki/How_to_enable_the_fingerprint_reader_with_ThinkFinger

and the bug report for the bug that requires you to hit enter:

https://bugs.launchpad.net/ubuntu/+source/thinkfinger/+bug/256429

There is one problem that I don’t know how to fix, every time I boot, I get an authentication box telling me that the application “Do” (I assume gnome-do) requires that the gnome-keyring be unlocked.  This only happens when you login with the fingerprint, not when you type in the password. There is no pam_gnome-keyring.so file, so I don’t know what else to add or change to get this to stop.  I will file a bug on launchpad when I get a chance.

I hope that works for everyone, it did for me!

–aliencam

NOTE: I did this yesterday, and today I noticed the fingerprint reader was getting really hot… I saw a mention of a bug that causes this on thinkwiki, but I think the problem only occurs when I am plugged in instead of on battery. I also know that turning on USB Autosuspend does solve it, and powertop will enable that for you… I will investigate further later.

further note: the problem did not persist. Enabling USB Autosuspend once seems to have fixed the problem indefinitely.  Use the powertop program and it should ask you to enable USB autosuspend if you have this problem. If not, read the thinkwiki entry on thinkfinger, and it should help. If that doesn’t help, leave a comment and I’ll get back to you.

UPDATE:
As of Feburary 16th, 2009 an update has broken functionality of thinkfinger. (it wrote over the /etc/pam.d/common-auth file) If the same thing happened to you, I wrote a post describing how to fix this problem.
http://blog.aliencam.net/2009/02/some-linux-housekeeping/

Thinkpad Fan Control in Ubuntu

Posted in Guides, Linux, Ubuntu by aliencam | 2 Comments »

Thinkpad fan control is an open source program for Linux (Ubuntu specifically) which monitors your laptop temperatures and fan speeds. It can be used to speed up/ slow down the fans for temperature or noise control, and can even shut off the fans completely if you wish to destroy your laptop. I have been using version 0.82 of this program ever since I got my laptop, and today when I was backing up my files I saw the 0.82 deb and wondered if there was a new version. There is, and there is also an Launchpad (kind of like Sourceforge, but for Ubuntu and better) repository for the program. So I do not really know how well this program has progressed since version 0.82 (current is 0.92) as I am writing this while I do it.

If you want more information on Thinkpad Fan Control (tp-fan) before installing it, check out it’s Launchpad page at https://launchpad.net/tp-fan and it’s homepage at http://www.gambitchess.org/mediawiki/index.php/ThinkPad_Fan_Control

If you want to install tp-fan and get automatic updates through Ubuntu’s update manager then follow the following instructions. If you don’t, just download and install the .deb at https://launchpad.net/tp-fan/+download

and the obligatory warning from the author:
“WARNING: THIS PROGRAM MAY DAMAGE YOUR COMPUTER.
PROCEED ONLY IF YOU KNOW HOW TO MONITOR SYSTEM TEMPERATURE.”

The Install:
First step is to install the Launchpad repository for tp-fan. Do this the graphical way by going to System > Administration > Software Sources
and then the “Third-Party Software” tab. Click add and paste in:
deb http://ppa.launchpad.net/surban/ubuntu hardy main

Then press “Close” and “Reload” when it asks you.

Then open a terminal and enter
sudo apt-get install tpfand tpfand-profiles tpfan-admin

and enter “y” when it asks you to install these without verification (it asks these because they are not official Ubuntu packages)

To use the program go to
System > Administration > Thinkpad Fan Control

again, be VERY CAREFUL using this program if you turn off anything. All I ever really use this for is to turn all the fans up to 100% if my laptop starts to get hot, but most of the time I leave it on hardware controlled as that does a pretty good job. (As a note, turning all the sensors to 100% for me lowered all of the temps about 9 degrees C after a little while.

-aliencam

aliencam's Customized Ubuntu Setup part VI: Fingerprint Reader

Posted in Life in General by aliencam | No Comments »

Lenovo Fingerprint reader (Lenovo Thinkpad laptops only!)

I suggest that before you do this you practice a few times. You must swipe your entire finger, and it is going to have to be at a slow and uniform speed. My thumbprint swipe takes about one second. I would like to post a video of this because people seriously have a very hard time with it, however I do not currently have a video. And it would be boring. But if i ever come across a video of correct thumb swiping procedure, I will be sure to post it.

In a terminal, enter:
sudo apt-get install thinkfinger-tools libpam-thinkfinger

Once that is complete enter:
sudo tf-tool --acquire

It will then ask you to swipe your finger three times. Do this and it will count each successful/ failed swipe. You need three successful swipes to finish. Then enter:
sudo tf-tool --verify

This will ask you to swipe your finger once, and will tell you if it matches or does not match. Now you need to make sure it actually uses that fingerprint information in password situations.
sudo gedit /etc/pam.d/common-auth

and change the contents of the file to read like this:
auth sufficient pam_thinkfinger.so
auth required pam_unix.so nullok_secure try_first_pass
auth optional pam_smbpass.so migrate

It should only be changing the first line and adding something to the second line, so I did not back up. I would suggest backing up if you are not comfortable in being able to undo that easily. Save and close, then enter:tf-tool –add-user $USERNAME
tf-tool --add-user $USERNAME
replacing “$USERNAME” with your username (should be all lowercase)
(Note: I don’t know if this needs to have sudo before it or not, but I tried both and both gave me an error. However when I logged out my thumbprint worked, so for now ignore the error.)

Now when you log in or need to enter your password in the terminal for sudo or need to enter it for nearly everything else, you can either slide your finger or type your password. For things like the Synaptic Package Manager or the Add/Remove Programs, it will not tell you that swiping oyur fingerprint is an option, but it will work anyway. (it will just say “enter your password”)
This does not however work for the screensaver password or the sleep-mode wake up password. For that you will either have to actually type in your password, or follow this marginally simple guide: http://www.thinkwiki.org/wiki/How_to_enable_the_fingerprint_reader_with_ThinkFinger and go to the section titled “xscreensaver/gnome-screensaver.” This is not in this guide because I like to have to type my password after a screensaver or sleep mode, and this is after all a guide to get Ubuntu set up how I like it.

Creative Commons License