Ubuntu Setup Guide Part IV. Middle Mouse Scrolling

Posted in Guides, Life in General, Linux, Lists, Ubuntu by aliencam | 1 Comment »

==Thinkpad/IBM Mouse only==

Jaunty uses the same evdev system that Intrepid used, that I had some troubles with. However, the solution should be the same, and I just hope it works correctly this time.

Here are the original settings, before middle mouse scrolling works:
$ xinput -list-props "TPPS/2 IBM TrackPoint"
Device 'TPPS/2 IBM TrackPoint':
Device Enabled (109): 1
Evdev Axis Inversion (251): 0, 0
Evdev Reopen Attempts (242): 10
Evdev Axis Calibration (243):
Evdev Axes Swap (244): 0
Evdev Middle Button Emulation (252): 2
Evdev Middle Button Timeout (253): 50
Evdev Wheel Emulation (254): 0
Evdev Wheel Emulation Axes (255): 0, 0, 4, 5
Evdev Wheel Emulation Inertia (256): 10
Evdev Wheel Emulation Timeout (257): 200
Evdev Wheel Emulation Button (258): 4
Evdev Drag Lock Buttons (259): 0

Now, to get this working, you need to create “/etc/hal/fdi/policy/mouse-wheel.fdi”. Easiest way to do this is to open up a terminal, and enter:
sudo gedit /etc/hal/fdi/policy/mouse-wheel.fdi

Now, paste in the following content and remove the extra space in each line (between “< " and "merge"
< match key="info.product" string="TPPS/2 IBM TrackPoint">
< merge key="input.x11_options.EmulateWheel" type="string">true
< merge key="input.x11_options.EmulateWheelButton" type="string">2
< merge key="input.x11_options.ZAxsisMapping" type="string">4 5
< merge key="input.x11_options.XAxisMapping" type="string">6 7
< merge key="input.x11_options.Emulate3Buttons" type="string">true
< merge key="input.x11_options.EmulateWheelTimeout" type="string">200

The 2nd to last line in there (200) is optional. This line prevents the middle mouse button from exhibiting the annoying paste function that an unconfigured button does. I need to set this option because as I’m scrolling through a document, I hate random sections being pasted where they don’t belong.

Save, exit, and restart X server by restarting the computer (the guide will cover re-enabling ctrl-alt-backspace to restart X later).

If you want an explanation of the other lines, in my post on this with the last version of Ubuntu, I wrote the following:

EmulateWheel should be pretty obvious, you don’t actually have a wheel with a trackpoint, so it emulates one

EmulateWheelButton: which button pretends to be a wheel? the mouse buttons are numbered 1 2 3 in order, so “2? is the middle one

YAxisMapping: which directions should the y-axis go? (4 is up, 5 is down)

XAxisMapping: which directions should the x-axis go? (6 is left 7 is right)

Emulate3Buttons: actually I’m not sure what this does in conjunction with emulatewheel. It probably allows you to use middle-click still (like to close firefox tabs, or whatever else middle click does)

EmulateWheelTimeout: if the button is held for longer than the ammount of time, it switches off the middle mouse click. Essentially, this is what turns off “middle mouse paste” when you are trying to scroll.

With these settings, my middle mouse scrolling vertically and horizontally works even after suspending.

–aliencam

UPDATE: oops, I realized that I forgot some code tags around the most important part of this post! (the mouse-wheel.fdi code) I fixed that now.

Ubuntu Setup Guide Part III. Firefox Tweaks.

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

Now, I’m putting Firefox as the first item on this list of things to do because Firefox is definitely where I spend most of my time.

Flash:
go to a site that requires flash (youtube doesn’t work anymore, try google videos) and click the “install missing plugins” button that pops up at the top right corner of the website. Choose the “Adobe Flash Player” and click “next,” click “install” and enter your password.
Once you finish, you need to restart firefox to get it to work.

Some about:config tweaks:


open a new tab and go to about:config. Here you will be able to adjust many very advanced options in Firefox, some of which could mess up your browser, so be careful and don’t change random things.

In the “Filter:” bar, search for “browser.search.openintab” It should read “false” by default, double-click, or right-click and change it to “true.” This will make it so that every time you use the search bar (top right corner of the browser,) it automatically opens in a new tab.

now search for “middlemouse.paste” and change that value to “false.” Now every time you use the middle-mouse button to scroll, it won’t also paste randomly.

next, go to layout.spellcheckDefault and change the value to “2” This allows spellcheck to work in every field, instead of just large text entry boxes.

Installing Firefox Extensions


One might say that I love my firefox extensions. I would not argue with them at all. All or most of these can be installed by searching for them on the Firefox extension website, then clicking “install.” If they aren’t on that site, google the name and they might be hosted on the author’s site. Here is a list of Firefox Extensions by importance:

Absolutely Essential:

  • Adblock Plus (blocks ads, see configuration steps below)
  • Tabs Open Relative (new tabs open next to the current one)
  • Xmarks (syncs bookmarks and passwords)

Pretty Much Essential:

  • Wise Stamp (awesome custom email signatures)
  • Read It Later (saves pages for you to read later)
  • Twitterbar (post to twitter from the address bar)
  • Down Them All! (download embedded media and multiple files)
  • FireFTP (FTP client in Firefox)

Useful:

  • Better Amazon
  • Better Gcal
  • Better Gmail 2
  • Better Greader
  • Customize Google
  • FasterFox (some tweaks for broadband connections. you can do these manually in about:config)
  • Firebug (useful for web development)
  • Google Gears (! If using 64 but see later, installing this is different. enables offline stuff)
  • Greasemonkey (allows website tweaking. I keep disabled except during a woot off)
  • Hide Find Bar (auto hides the find bar when you aren’t using it)
  • LongURL Mobile Expander (expands tinyurls and other on mouseover. Also available as aGreasemonkey script)
  • Menu Editor (necessary for customization section next)
  • TinyURL Creator (creates tiny URLs)
  • User Agent Switcher (lets you pretend to be IE or another browser to trick websites)

Not Really Necessary At All

  • Alexa- Sparky (helps the Alexa ratings of websites you visit, kind of like spyware)
  • Fission (moves the loading bar to the address bar, like Safari)
  • Mr. Uptime (tells you when a website is back up)
  • Novell Moonlight (lets you use Microsoft Silverlight in Linux/Unix)
  • Retail Me Not (alerts you to coupons on websites using retailmenot.com)
  • ScreenGrab (allows fullscreen screenshots of websites since print to pdf doesnt work well)
  • Stealther (locally disables cache and history and stuff temporarily)
  • Stylish (allows you to tweak websites or firefox with userstyles.org scripts)
  • URL Fixer (fixes .cmo to .com and stuff)

Now once you install all of these your firefox window will be covered in buttons and icons for all these extensions. Most of these are useless and just waste space/time, so I get rid of almost all of them. See “Customization” section below.

Google Gears


Google gears is an extremely useful extension for offline browsing (particularly it lets you use Gmail and Google reader offline), and for speeding up websites like wordpress. Unfortunately, Google does not release a 64 bit version of it, but since it is open source, users have been able to recompile it to work with 64bit versions of Firefox. Strangely, enough, not much actually has to be changed, so I don’t understand why Google won’t release a 64 bit version… anyway, the quickest method I have found is to google “Gears 64 linux” and many people will have compiled and posted a version on their blogs. I have not done this because I don’t have the time right now, and last time I tried, I did something wrong.

Currently, the most recent version available is on Niel’s Blog. Go to that site, download the updated binary (at the moment it is gears-linux-opt-05180.xpi), and to install in Firefox, go to “File > Open” then select the .xpi file you just downloaded.

One problem with this method is that periodically you will get a message saying “Gears cannot be updated because it is not compatible with your architecture” Just ignore these messages, and when you are prompted to “update” firefox extensions, just uncheck google gears so the other extensions update. When this happens, wait a few days then do a google search to see if anyone has posted an updated version of the extension.

Adblock-Plus Configuration


When you install Adblock Plus and restart firefox, the first thing that happens is that it asks you which blocklist you want to subscribe to. Select EasyList (USA). Ever since they have implimented this feature, it is recommended (by the authors of adblock) that you DO NOT install Adblock-Plus Filter Uploader.

Once you have Easylist chosen, adblock will block almost all ads out there. Which, for me, and much of the internet, is actually a problem. Many websites rely on ads to survive, but unfortunately they choose annoying flashing, moving pictures, and similar ads. This is why we use adblock. On the other hand, tasteful and relevant text ads are not only not annoying, but often helpful in finding related websites. As such, I like to allow the Google text-only ads (like the ones I have on this site). There are two adblock-plus filters you can add to allow Google Text-Only ads.

Click the arrow on the “ABP Stop Sign”, and select “Preferences” (in the top right corner if you just installed adblock, otherwise Tools > Add-Ons > Extensions > Adblock > Preferences. ) and click “Add Filter…” Then enter the following two lines as new filters:

@@/pagead2.googlesyndication.com/*ads
@@/pagead2.googlesyndication.com/*$script,subdocument

The first one enables the ad, and the second the “Google” text and rounded corners around some of the text ads.

****NOTE: I’m not actually sure those filters work anymore… I’ll have to look into this more, definitely added to my todo list… dang. leave a comment if it does or doesn’t work***

Firefox GUI Customization/Condensing


NOTE: this section is near unintelligible, I wrote this right when I woke up. I will change it to a list format or comprehensible sentences later.

My screen is very small (12.1″) so I need to save every pixel possible so I can see more content. I also don’t want annoying things bugging me while I’m using Firefox. First thing I do is remove all of the icons from extensions. Top right corner and bottom right corner are covered with these. Most of these can be disabled by right-clicking on them, going to options, and changing some option in the extension itself.

Now, right-click on the menu bar and uncheck “Bookmarks Toolbar,” then select “Customize”. Drag off any items you don’t need (home, the “throbber” and the separator line in the top right) , and drag everything else to the top bar. Then check “Use Small Icons.” Now right-click and uncheck “Navigation Toolbar” as well.

Now there are still a few more changes that need to be made, and these are a bit more advanced. I like to get rid of the magnifying glass icon in the “search” bar, and I would like to combine the stop and reload buttons (you can only use one at a time anyway!), don’t show the forward or back buttons if there is nothing to go forward or back to, auto-hide status bar, and italicize unread tabs.

you can do this all with stylish scripts, guide on Lifehacker, userstyles.org but I would prefer to do it without the extension (this way I can keep stylish disabled except when I really need it).

First step is to make a UserChrome.css file. In Ubuntu Linux, go to /home/$USERNAME/.mozilla/firefox/***profile***/chrome ($USERNAME is your username and ***profile*** will be random letters and numbers). In Windows this will be at “C:\Documents and Settings\$USERNAME\Application Data\Mozilla\Firefox\Profiles\***profile***\chrome\”

Make a copy of userChrome-example.css, and rename it “userChrome.css” . Now open this new file, and paste the following section into the bottom (or right below the @namespace line, it doesn’t mater).

/* This removes the Search Bar Magnifying Glass */
.search-go-button-stack { display: none !important; }

/* Combine Stop and Reload buttons*/

#stop-button[disabled] { display: none;}

#stop-button:not([disabled]) + #reload-button {
display: none;
}

/* Remove Back button when there's nothing to go Back to */
#back-button[disabled="true"] { display: none; }

/* Remove Forward button when there's nothing to go Forward to */
#forward-button[disabled="true"] { display: none; }

/* Auto Hide Status Bar Unless Mouseover */
#status-bar:not(:hover) {margin-bottom:-20px;}
#statusbar-display[label*="."], #statusbar-display[label*="."] ~ * {margin-bottom:20px;}

/*This makes unread tabs appear in italics*/

#content tab:not([selected]) {
font-style: italic !important;
}

These were taken from various places; userstyles.org, lifehacker.com, and some other blogs.

now save and close the userChrome.css then restart firefox.

In Edit > Preferences > Content, I change the default font size to 15 instead of 16, to make everything just a little bit smaller.

in “Privacy” I set Firefox to keep only 30 days of history (even 30 days is a lot of data).

Then, using the preferences option in the “Menu Editor” plugin that I installed earlier, follow the following steps.

Open Preferences for Menu Editor (Tools > Add-Ons > Extensions > Menu Editor > Preferences)
Enable “Advanced Mode”.
Uncheck “visible” for “Edit”, “History”, and “Help”
Then, in the right column, change the dropdown menu to “Edit” and in the left, go to “Tools”
Drag the “Preferences” menu item from the right into “Tools” on the left.
Apply, and click “OK.”

Here are some Screenshots of before and after this customization for Firefox.

screenshotscreenshot-1

UPDATE:

I have now added the Wolfram Alpha search plugin to the firefox search bar. click here to install it.

Ubuntu Setup Guide II. Update and Repository Setup

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

Enabling Repositories


Before updating or installing any programs, you should enable more repositories. By default, you will only get security updates, recommended updates, and updates of proprietary drivers / nonfree software in the repositories. With this it is most likely that an update will not break anything new, but you will have older versions of everything.

In order to do this, go to System > Administration > Software Sources, then enter your password and go to the “Updates” tab.

Check both the “Pre-Released Updates” and the “Unsupported Updates” boxes. Pre-released updates means updates that will go into the next 6-month ubuntu release, but did not make the cut for this one, and unsupported updates are updates that are not widely tested for stability yet. Neither are necessary, but I like both of them.

Now, go to the “Third-Party Software” tab and enable both of the repositories there. These “partner repositories” enable the use of non-free software, like flash, mp3 codecs, dvd codecs, and similar. I would say these are necessary unless you want to keep your computer 100% open source (in which case I applaud you for being much more intense than I could stand to be right now).

Then, go to the “statistics” tab, and choose whether or not you want to submit statistical data to Ubuntu. I like to do this because it lets them know how many people are updating, and installing which programs from the repositories. Essentially it helps programs you like to use in the popularity contest of “default” programs.

Another optional step is to choose a different server. This can sometimes get your updates much faster, because you won’t be downloading from the same server as everyone else in the world. To do this, go back to the “Ubuntu Software” tab, and on the “Download From:” dropdown menu, choose “other” and then click “choose best server.” It will now run a series of tests to choose which server you are able to connect to and get the fastest speeds. When it finishes, it will automatically select the best choice, click “choose server,” then “close” and “close” again (the update button never works for me).

Now open up a terminal (Applications> Accessories > Terminal) and type sudo apt-get update, then sudo apt-get upgrade.

Fixing Update-Manager Behavior


I don’t like how update-manager behaves in this new version. What happens now is that once per day the update-manager window will open completely, but if you close it, you won’t see it until a week later unless you restart the computer. I prefer it to show an icon in the taskbar telling me that I need to update, and never pop up the update window.

Here are the steps to get back the old update-manager behavior (from the Release Notes):

Open a terminal (Applications > Accessories > Terminal) and enter the following:


gconftool -s --type bool /apps/update-notifier/auto_launch false

Now you will have an icon in the taskbar if you have available updates.

Restricted Extras


By default, Ubuntu can’t have certain things installed like MP3 codecs, flash player, MS fonts, and Java. You probably will want to install all of these, and thankfully if you have enabled the repositories above, there are two packages that handle most of this.
open a terminal and enter:
sudo apt-get install ubuntu-restricted-extras linux-restricted-modules

enter “y” when it asks you if you want to install all the packages, then let it run.

During installation you should be prompted (in the terminal window) to setup Java, When this happens, scroll down to the bottom with either page-down or the down arrow key, then arrow to the right to get to “ok”. Hit enter, then move the selection left to “Yes” and hit enter again.

You now should be able to do these things.

Ubuntu Setup Guide Part I. Installation

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

This is the first in my updated “aliencam’s Customized Ubuntu Setup Guide” for Ubuntu 9.04 Jaunty. The previous guide is for Ubuntu 8.04, and is now mostly out of date.

Before you install or upgrade to 9.04, I would suggest reading the release notes so you can see if there are any specific problems with your hardware and what the fixes are, or if fixes will be released in updates later. With my laptop, I see that there is a problem with some Intel video cards, and there are 3 options to fix that. (I will include those steps in this guide if the problem comes up)

I am installing Ubuntu 9.04 x64 Desktop on my Lenovo Thinkpad x61 tablet. I plan to do whatever I can to get ubuntu working as I like it, and to enable all of this laptop’s features. Some of what I will do is just for personal taste, and almost none of it is necessary. Here is what works on the x61t without any customization:

Trackpoint (mouse)
wifi
ethernet
audio
volume keys
USB devices
bluetooth
fn key adjustments (brightness, radio switch, battery, suspend, lock, etc)
“back” and “forward” buttons (next to arrow keys on keyboard)
tablet stylus (regular click works, but the eraser is only seen as regular click, and the right-click button does not work)
tablet “touch” (this is miscalibrated, where you poke is not where it reads)

settings I installed with: I install from a USB stick, use US International Keyboard with dead keys, a 154 GB EXT4 partition as root, and a 6 GB Swap partition. Timezone is set to “Phoenix” and I do not prefer to log in automatically.

This is just the introduction and once a few parts are completed I will start to compile them into a single post. I would do more than one segment tonight, but I have a final in MSE tomorrow morning, so I’m going to sleep instead.

–aliencam.

Some [Linux] Housekeeping

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

hRecent updates have broken functionality of both the fingerprint reader and screen brightness adjustment on my laptop  (Thinkpad X61 Tablet with Ubuntu 8.10).

Fingerprint Reader:


The problem with the fingerprint was that a recent security update had overwritten the /etc/pam.d/*-auth  files (it allerted me to this beforehand, but to prevent issues with the update I allowed it to totally overwrite my files).  If this happened to you, all you need to do is run the script to edit the /etc/pam.d/common-auth file to allow the fingerprint reader to be a method of authentication.

run the following command:

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

nothing should return, but when you restart the authentication daemon (I don’t remember the command offhand, so I just restarted the computer) the fingerprint reader should work again.

Fixing ACPI Brightness Adjustment


After updating to the 2.6.27-11 kernel, brightness controls would not work for me or any of my friends with the Thinkpad X61 laptop.  There is not an update released yet to fix this, and it has been marked as  “low priority”. The low priority kind of makes me upset since sometimes I can’t even see my laptop screen because of it’s low screen brightness, and other times I get half of the battery life I’m used to since the brightness is all the way up.

Anyway, the fix I found for this was on the issue’s bug report.

In order to do this, you need to edit the /etc/modprobe.d/options file and add the line “options thinkpad_acpi brightness_enable=1”. There are many ways to do this, but my preferred is the following:

in a terminal, type:
sudo nano /etc/modprobe.d/options

then arrow down to the bottom, and then type:
# set to get brightness controlls working in 2.6.27.11 kernel
options thinkpad_acpi brightness_enable=1

exit by pressing ctrl-x then enter to save and overwrite the file. Now you can reboot and the brightness control should work just fine.

If you have any questions or the problems are not fixed by these then leave a comment.

–aliencam

Recording Audio From Speakers

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

One commenter asked me in another post how to record audio that would otherwise be played through the speakers.  The specivif example this commenter referenced was “recording audio from youtube videos.”  While there are much better ways to rip the audio from youtube videos (my favorite is the online youtube movie/audio ripper vixy.net. You don’t need to download or install anything, just paste in the URL of the youtube video)   recording the audio that your computer is outputting can be useful in other situations as well.   The method has also changed in the most recent Ubuntu 8.10 Intrepid, so if you knew how to do this in 8.04 it might not be the same way anymore.  Here is a guide for my favorite method to do this.

Ubuntu 8.10 included the PulseAudio controller instead of ESD (is this correct? I’m not sure if it replaces ESD totally.) .  In my opinion this is much better than ESD and it has much more control.

Even though pulseaudio may be installed by default, the pulseaudio volume control is not.  To do this, install pavucontrol in synaptic or run the command:
sudo apt-get install pavucontrol

now just press alt-F2 and run “pavucontrol”

If you don’t have any ausio playing at the moment, it should look like this:

screenshot-volume-control

In order to record an audio stream other than the default (which should be the mic, unless you have changed settings elsewhere), go to the “recording” tab, and click on the down-pointing arrow (more like an upside-down carat).  Now select the “monitor” of your default audio output.

pavucontrol-recording

Now you can start playing whatever audio you want recorded, and it will record that instead of the mic.  If you want tohave this as the default, you can, under the “input devices” tab change the show setting to “all input devices”, then click the arrow next to the audio source monitor you wish to record, and mark it as default.

Hope this helps,

–aliencam

Fresh Pomegranate Recipes

Posted in Guides, Life in General by aliencam | No Comments »

Fresh Pomegranate Lemonade


Ingredients:

5 cups water
3/4 cup lemon juice
1 TBSP lime juice
2 TBSP fresh Pomegranate arils
2 1/2 TBSP sugar

Procedure:

This “Fresh” Pomegranate Lemonade uses fresh pomegranate, but it doesn’t use fresh lemons or limes. This is very sour also, like the Pomegranate Lemonade drink you can get at Ruby Tuesday, mostly because I don’t like to add a lot of sugar, so don’t feel bad about adding more.
This makes exactly 48.75oz, which isn’t very much, so you may want to double this if you have a big enough pitcher.

First, start with the 5 cups (40oz) of water in a pitcher, and add 3/4 cup (6oz) of lemon juice, and 1 Tablespoon (.5 oz) of lime juice. You can add the 2 and 1/2 Tablespoons of sugar now, or later.

There are two ways to get the pomegranate juice out of the pomegranate arils. For both, you will need to be wearing something that you won’t mind stained red. Don’t expect to get out any pomegranate stains. The method that I observed as being the quickest is to fill a small spoon with the arils, hold it in the pitcher, and squeeze down with your thumb. Sometimes you will need to pop each of the arils individually (the second method), which can be a little bit cleaner, but either way you are going to get at least your hands covered in red pomegranate juice.

After this, I actually left the seeds and the other pieces in the lemonade, they sink to the bottom anyway, but it does get a little bit more pomegranate juice in the pitcher.

Stir the whole mixture, and that is all! You now have delicious pomegranate lemonade!

This recipe licensed under Creative Commons Attribution Share-alike 3.0 US License. You may change it or use it commercially, as long as it is freely available to the public and you attribute the original recipe to me.

–aliencam

Thinkpad Middle Mouse Scrolling in Ubuntu 8.10

Posted in Guides, Linux, Lists by aliencam | 21 Comments »

I found a couple blogs that said they got middlemouse scrolling working on a thinkpad, but none of their methods worked on my x61Tablet with 64-bit Ubuntu 8.10 installed.  This version of ubuntu uses evdev instead of the xorg.conf file that previous versions used, so it makes configuring the middle mouse button a little bit more difficult.

The first thing you should do (just for your own records) is this command:

xinput -list-props "TPPS/2 IBM TrackPoint"

that will return the properties of your trackpoint.  (change “TPPS/2 IBM TrackPoint” to “DualPoint Stick” if you have an X200 or  X61s.) I did not do this before changing settings, so I don’t know what the original looks like (if you do, please post it in the comments so I can have a record of it! I posted the final results of that command at the end.)

Now, what you will need to do is create a file, /etc/hal/fdi/policy/mouse-wheel.fdi with the following command:

sudo nano /etc/hal/fdi/policy/mouse-wheel.fdi

then paste in the contents with ctrl-shift-v:

<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.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>

save and quit by hitting ctrl-x, then “y”.

To tell you what each line does:

EmulateWheel should be pretty obvious, you don’t actually have a wheel with a trackpoint, so it emulates one

EmulateWheelButton: which button pretends to be a wheel? the mouse buttons are numbered 1 2 3 in order, so “2” is the middle one

YAxisMapping: which directions should the y-axis go? (4 is up, 5 is down)

XAxisMapping: which directions should the x-axis go? (6 is left 7 is right)

Emulate3Buttons: actually I’m not sure what this does in conjunction with emulatewheel. It probably allows you to use middle-click still (like to close firefox tabs, or whatever else middle click does)

EmulateWheelTimeout: if the button is held for longer than the ammount of time, it switches off the middle mouse click.  Essentially, this is what turns off “middle mouse paste” when you are trying to scroll.

Now, the above configuration DOES NOT work for me, but it seems that it does for everybody else… If it still does not work for you, keep reading for the fix, and please leave a comment so I don’t feel so inept :P. What happens to me is that the xinput list-props command shows the buttons as being mapped correctly, but nothing happens in xev or in real use.  I cannot find errors in any log files or anywhere to indicate why or what is happening.

So, what I do to get it working is in the above file, change “YAxisMapping” and “XAxisMapping” to be misspelled by adding an extra “s” as such: “YAxsisMapping” “XAxsisMapping”

At this point, restart and test it again.  Just misspelling it works for many people.

If it still doesn’t work, create a new file.  This will be a shell script that is run at startup to map the horizontal scrolling correctly (If you don’t care about horizontal scrolling and only use vertical, just stop after you messed up or deleted the XAxisMapping and YAxisMapping lines).Use the following command:

nano /home/$USERNAME/.horizscrollscript

Then paste with ctrl-shift-v, or type in the following contents:

#!/bin/bash
#
#
# The following line sets the X-axis mapping to buttons 6 and 7 so that
# horizontal scrolling works.
xinput -set-int-prop "TPPS/2 IBM TrackPoint" "Wheel Emulation X Axis" 8 6 7

then save and close with ctrl-X, then “Y”.  make the file executible with:

chmod +x /home/$USERNAME/.horizscrollscript

Now open the gnome sessions manager (System > Prefferences > Sessions, or alt-f2 and “gnome-session-properties”) and click “add”

for the “Name” field, name it something so you know what it does (I named it Horizontal Scroll Script).

In the “Command” field, enter the path to the file (/home/$USERNAME/.horizscrollscript)

The comment field is optional.  Save and restart, and everything should be working!

Please leave a comment if this does or does not work for you, I’m curious to know if I messed something up and that is why the first part of the tutorial doesn’t work.  ***UPDATE: It seems to work for nearly everybody except me… ugh***

To test everything, you should try this command:

xinput -list-props "TPPS/2 IBM TrackPoint"

and it should return:

Device 'TPPS/2 IBM TrackPoint':
Device Enabled:        1
Middle Button Emulation:        1
Middle Button Timeout:        50
Wheel Emulation Inertia:        10
Wheel Emulation:        1
Wheel Emulation X Axis:        6, 7
Wheel Emulation Y Axis:        4, 5

Wheel Emulation Timeout:        200
Wheel Emulation Button:        2
Drag Lock Buttons:        0

those bolded lines are what we were trying to get! now to test how your computer sees you use those buttons, ust the command:

xev

then you can hit keys on the keyboard and watch what it returns, or put the mouse pointer in the box that pops up and watch that as well.  You should be able to see that scrolling down is 5, up is 4, left is 6 and right is 7. (close xev with ctrl-z or by pressing the “x” on the box.)

The websites I used to formulate this approach are:

http://psung.blogspot.com/2008/09/scrolling-with-thinkpads-trackpoint-in.html

http://mvogt.wordpress.com/2008/08/15/xorg-evdev-and-emulatewheel/

***Note:  There is a bug that makes it so that middlemouse scrolling does not work sometimes after a suspend/resume.  Here is the bug report on Launchpad.  There has been a patch released for the actual xorg-evdev, but not one specifically for ubuntu (so you would have to recompile and build evdev while applying this patch at this point)  Here is the URL for the Launchpad bug:

https://bugs.launchpad.net/ubuntu/+source/xserver-xorg-input-evdev/+bug/282387

There is a temporary fix also, removing and reloading the “psmouse” module seems to fix it without suspending/resuming again, or restarting the computer.  This is kind of dangerous because it literally unloads the mouse drivers and then reloads them, so you will have to use the keyboard only to enter this in a terminal.  Use these commands:

sudo rmmod psmouse
sudo modprobe psmouse

–aliencam

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/

Keyboard Shortcut Ubuntu 8.10

Posted in Guides, Linux by aliencam | No Comments »

In Ubuntu 8.10, Inrepid there is no obvious way to create a keyboard shortcut to run a command or open a program or similar.  However, I like to have the terminal on a keyboard shortcut (super ~) so, here is how to set up creating a keyboard shortcut in ubuntu 8.10.

press alt-f2 to open the launcher, and launch “gconf-editor”

then go to Metacity> keybinding_commands

choose any of the commands (I didn’t have any taken already, so I chose command_1) then set the value to the command you want to launch (so for myself, I changed the value to “gnome-terminal” to launch the terminal)

Then go to the folder Metacity > global_keybindings

select the “run_command_*” equivelent of the command number you chose in the first step (I would select “run_command_1”) and change the value to the hotkey that you want to launch that command.   So for my command, I want it to be the windows key, and the tilde (~) key, I set it to “<Super>dead_grave” the windows key is always “<Super>” and because I use the international (with dead keys) keyboard layout, I had to set it to “dead_grave” instead of regular “grave” or “tilde” (grave is the ` character, or what you get when you press the tilde key without a shift)

You could also set this in compiz general keybindings, but I prefer to use the gconf-editor because I can make a key run any command I want, and I don’t need to have compiz installed/running for it to work.

Note: this will only work in Gnome, to do a similar thing in any or all window managers, follow this guide: http://ubuntuforums.org/showthread.php?t=79560

–aliencam.

Creative Commons License