Archive

Archive for April, 2009

Configure ALPS (Synaptics) touchpad in Ubuntu Karmic and Jaunty

April 25th, 2009 12 comments

The Problem

Update: (29th October 2009): This guide holds true for Ubuntu 9.10 Karmic Koala as well. The only difference is how to restart the hal correctly. I’ll be examining that and posting it here.

Update: (29th April 2009) I was facing these problems using the 64 bit version of Ubuntu 9.0.4 Jaunty on a Wubi installation. I’ve since upgraded to a normal installation and the 32 bit version. Synclient is no longer exhibiting weird behavior as below and I haven’t installed GSynaptics on my latest install because I don’t see the need for it.

I don’t know now whether the problems with Synclient were caused because of the installation being 64 bit or because of the installation being a Wubi install.

Configuring the ALPS touchpad on Ubuntu’s Jaunty Jackalope was a nightmare for me. So when I finally got it working, I thought I’d enlighten others who might be facing the same problems. I’m working on a Sony VAIO VGN-NR498E model with an Intel chipset. Here goes!

Synaptics drivers for ALPS

Apparently, the synaptic drivers for the ALPS touchpad work fine. They’re installed by default and so you won’t have to do anything further for this.

Image Credit: yum9me

Alps Touchpad in Ubuntu 9.0.4

Alps Touchpad in Ubuntu 9.0.4

ALPS problems under Jaunty

There were several severe problems I was facing with the touchpad including:

  1. Hyper sensitivity
  2. Accidental tapping while scrolling
  3. Right click activated by Bottom Right corner instead of top left

The sensitivity problem was particularly acute as I kept accidentally clicking links while scrolling along the sides.

GUI clients like GSynaptics not enough

Like everyone else, I first checked out the options in the default “Mouse” package that ships with Ubuntu. While there were some nice options on it, they simply weren’t enough. There wasn’t an option to customize the minimum finger pressure for a click (the cause of accidental clicks), nor the option to change the maximum amount the finger could move for a click to register. I also couldn’t change the area of the touchpad that activated the right click.

So I installed the Gsynaptics package and it still wasn’t enough. Moreover, it was exhibiting strange behavior such as not saving the settings. My advice to touchpad users facing the same problems that I was facing is to not enable the GSynaptics module. It merely gets in the way.

In my opinion, we would greatly benefit from an inbuilt GUI client that would allow users to change all the options. Apparently on the GSynaptics site, a new application was being showcased called “GPointing Device Settings” whose source code is provided. However, despite repeated attempts, I wasn’t able to compile it – I’m not an expert on compilation, so I don’t know what I did wrong.

Synclient also doesn’t work properly!

Another odd phenomenon was that the program called Synclient which was supposed to show me all the current touchpad settings was displaying “0″ for most parameters while typing in “synclient -l” even after changing them with “parameter=value”. This initially led me to believe that my hardware didn’t support those clients, but later observations showed me that it did.

Update: As described at the top, this problem didn’t occur with a regular install of the 32 bit version of Jaunty. Don’t know if the fault was with Wubi or the 64 bit.

Using HAL and fdi files

So here’s the real way to change the touchpad settings. All the forums (which mostly referred to older versions of Ubuntu) told me to modify the Xorg.conf file located in “/etc/X11″. But when I tried to do this, I wasn’t able to startup Ubuntu properly – apparently, I must have messed things up. It turns out, that modifying Xorg.conf is wrong. At least in Ubuntu 9.0.4 Jaunty Jackalope.

The correct way to change settings is to modify or create “.fdi” files in the folder “/etc/hal/fdi/policy”. These are XML files that define the properties of various parameters. It doesn’t matter what filename you give them – something I went crazy trying to find out – as long as they have the extension “.fdi”. You’ll find some samples of fdi files in “/usr/share/hal/fdi/policy/one of the folders“. You should take these samples and modify them to your needs (who’s going to write XML from scratch?). For the touchpad, look for for filenames that contain x11, synaptics, input device etc. The one I took was “/usr/share/hal/fdi/policy/10osvendor/10-x11-input.fdi”. Look for one that has some sample settings commented out. You should be able to find out how to add new ones by looking at them.

It should also refer to “input.touchpad” somewhere inside the file – that way you’ll know it’s the right one. Take the file you want and copy it into “/etc/hal/fdi/policy” and give it whatever “.fdi” name you want.

Finding out your exact device name with lshal

Before adding these new settings to your fdi files, you need to let Ubuntu know that the settings refer to the touchpad. So first we need to know what Ubuntu calls your mouse.

Open a terminal, type “lshal” (that’s L-shal), and enter. A long list will scroll past your eyes before you can even see what’s at the top. So you need to save the output to a text file first – this is also useful for searching in the next step. So type in “lshal > test.txt”. A file called “test.txt” will be created in your home folder with the output. Open up the text file and search for “Alps”, or a part of whatever you think your touchpad is called. Find out exactly what Ubuntu calls your device – it’ll be under “info.product” or “input.product” between apostrophes.

Making changes to your fdi files

Now that you know what your device is called, you can open up your fdi file with the sample commands and add the following section before the closing </device> tag.

<match key=”info.product” contains=”whatever your device is called“>
<merge key=”input.x11_driver” type=”string”>synaptics</merge>
</match>

Once more, it doesn’t matter what filename you give it as long as it ends in .fdi

Once that is done, you can now proceed to make changes to your touchpad settings in that fdi file to your hearts content under the “info.capabilities” key. Some values that you might want to change are:

  1. FingerHigh
  2. MaxTapMove
  3. MaxSpeed
  4. MinSpeed

For example, to change the “FingerHigh” parameter, this what you need:

<merge key=”input.x11_options.FingerHigh” type=”string”>20</merge>. Put it in the same section as the other samples. Editing XML files can really be a pain, which is why I wish there was a GUI tool for this.

To see a complete list of everything you can change along with the explanation, type “man synaptics” into a terminal. Or you can see the synaptic options here.

Save the fdi file in “/etc/hal/fdi/policy”

Applying the settings

After making the changes, you can apply them by restarting hal and logging out and on again. To restart hal, I use “sudo /etc/init.d/hal restart”.

Update (31st October 2009): The latest technique in Karmic is to restart hal by typing “sudo service hal restart”. Some say that hal no longer exists, but this seems to work

So there it is. A brief explanation of what I learned out of three days of pain :) . But it was worth it. In part, this blog post is to ensure that I don’t forget what I learnt! I hope it saves you some pain as well.

Similar Posts:

  • Share/Bookmark
Categories: Technology Tags:

The Story of the champions of the round table – Book Review

April 20th, 2009 No comments

I’ve always loved the Arthurian legends and read whatever books I can get my hands on concerning them. The whole image of those days when knights errant went in search of adventure and enchantments – and damsels in distress were a plenty. Of course, it’s a highly romanticized version of how things really were, but I choose to ignore that for the moment – it’s the image after all. An image of a life when things were cut and dry – good and evil were clearly defined and chivalry was the greatest thing to aspire towards.

In fact, the saddest moments of the book is when this distinction between good and evil breaks down – when Lancelot, the paragon of virtue blemishes himself. And the achievement of the Holy Grail leads to nothing but the loss of all that was beautiful in the legends of Arthur.

I’ve read so many books concerning Arthur, that I realize that there is no canonical work. Most people refer to “Le Morte D’Arthur” as the definitive legend, but there is no such thing. Different authors have different tales to tell – and different manuscripts weave various legends about Sir Lancelot, Sir Tristram and Sir Percival.

In my quest for the most exhaustive Arthurian legends, I came across the work of Howard Pyle, whose set of four volumes impressed me with their exhaustive treatment of Arthur – enchanting me with tales I had never heard before, such as the origins of Sir Percival.

The Story of the Champions of the Round Table is the second book in the series, and one I have just finished reading. I wish to jot down my impressions of this great book while they’re still fresh in my mind.

The story of the Champions of the Round Table – Review

This book deals with the adventures of three knights – Sir Lancelot, Sir Tristram, and Sir Percival. In descending order, the greatest champions of the round table. It recounts in exquisite detail, the origins of these three knights and how they established themselves as the foremost of their kind. Apart from Sir Tristram, whose story ends tragically, the adventures of the other two set the stage for further adventures in the next two books in the series.

The Story of the champions of the round table-Book Review

The Story of the champions of the round table-Book Review

The language in Pyle’s books is not like those found in other Arthur books. While it retains the charm of the old world, it doesn’t flounder in over archaic expressions and lugubrious language. This makes me very happy. I love reading language that immerses me in the time and yet poses no barrier to my understanding.

This book by far, gives the most detailed descriptions of the histories of these three knights that I have ever come across. I read the book on my iPod Touch using Stanza, but the original book consists of 328 pages of the origins of just these three knights. Perfect for fans who want to hear the maximum possible about their favorite hero!

Also, Pyle makes sure that the stories make sense in various little ways. This is greatly appreciated. Furthermore, he also gives lovely short descriptions of the splendid scenery through which the knights sometimes travel through, adding to the the enchanting feeling.

As a bonus, Howard Pyle also illustrated these books (he was an artist as well) and the volume benefits greatly from these pictures.

Where to get it from

The book is out of copyright and the best place to get it from is Gutenburg for free. Make sure you get a copy that has the pictures included. Of course, if you want a hard copy, you will have to pay for it. Search on some online book store and maybe you’ll get your hands on it.

The next in the series, namely “The Story of Sir Lancelot and his companions” hasn’t been published onto Gutenberg yet. As of this writing, it’s in the Post Processing (PP) stage and so I’ve only been able to download a draft without pictures (which is the saddest part). I’ve found that the Internet Archive maintains scanned copies of these books which are available for free download. If you enjoy reading from a PDF (I don’t), then this might be just what you’re looking for!

So Arthur fans, don’t hesitate. Pick up this book and get ready for a real treat :)

Similar Posts:

  • Share/Bookmark
Categories: Book Reviews Tags:

Number of Google search results – Ubiquity Firefox extension

April 6th, 2009 8 comments

Getting the number of Google search results

Update (July 16th 2009): I’ve updated the command for the new Ubiquity 0.5 Parser (Version 2)

For us SEO practitioners out there, we often need to check how many pages are returned by Google for our search term. We do this to find out what the competition is, and whether or not a particular term is worth optimizing for. Too many pages (in the millions) and it may not be worth the effort.

To find this, we’ve always had to open up a new page perform a Google search and wait for the results, which can be time consuming, as well as involve a lot of tab jumping. Since I began to use Ubiquity, I began to think – why should I manually have to go to a new tab? I should be able to do it right from Ubiquity!

For Firefox Ubiquity users, the pop up on the top should have already appeared asking you to subscribe. Once you install, here’s how to use it:

Ubiquity number of  Google results

Ubiquity number of Google results

Using Ubiquity to get the results

Just call up results-google and type the search term. You can also have it selected on the page you’re on. You can use quotes as well to search for the exact phrase. In a few moments, the number of results should be on your screen. It’s that simple!

Please feel free to comment below if you have problems using this tool. Suggestions for improvements will be welcome. I’m not a professional JavaScript programmer, so I’ll do my best :)

Similar Posts:

  • Share/Bookmark
Categories: Technology Tags:

Ubiquity Torrent Search – MiniNova, IsoHunt, PirateBay, btjunkie

April 5th, 2009 12 comments

Update (November 28th 2009): Now that Mininova has been forced to lose most of its torrents, I’ve removed it from the list. It will be sorely missed and we all mourn its demise

Update (July 16th 2009): I’ve updated the command for the new Ubiquity 0.5 Parser (Version 2)

Having implemented a Ubiquity command to find the PageRank of a site, I’m on a roll!

This Ubiquity command allows you to search Mininova, PirateBay, and IsoHunt, opening the results in new tabs. I haven’t yet found a way to display the results in the preview window itself, but I’m not sure that would be a huge value add. The name of the command is torrent-mini-pirate-isohunt.

If you’re using Firefox’s ubiquity extension, the notification should have popped up by now – Post any feedback as comments!

Update: Added support for btjunkie as well.

Similar Posts:

  • Share/Bookmark
Categories: Technology Tags:

Check PageRank with Ubiquity Extension: page-rank

April 3rd, 2009 1 comment

Update (July 16th 2009): I’ve updated the command for the new Ubiquity 0.5 Parser (Version 2)

As a writer, I frequently need to check the Google PageRank (PR) of pages. My old solution was to have a plug in that gave me the PR of the site I was on. This required me to actually go to the site in question and wait for my tool to update itself with the PR.

Ubiquity PageRank

Ubiquity PageRank

When I heard of Firefox’s Ubiquity, I immediately wanted to extend it’s functionality – allowing me to easily check the PageRank of any site without leaving my current page. So after scouring around and not finding anything, I decided to build my own Ubiquity extension for it.

My JavaScript was terribly rusty and I had to learn it all over again. It’s so damn difficult to debug! I used the service of a site called www.liveindya.com along with jQuery.get. So by now, the toolbar on top should have popped up asking you to subscribe to it. Here’s how it works:

PageRank of the current page

Just call up Ubiquity and start typing the command name: page-rank. If your current page is a valid URL, you should get the PR in a few seconds.

PageRank of any other page

Just enter the page-rank command and type in the URL whose PR you wish you find. You can also select a URL on the web page and the command will take your selection and find it’s PR.

URL Auto Correct

The service mentioned above needs “http://” in the URL to work – so if you don’t have it, the tool will append “http://” automatically to the start of what you enter.

If it gives you an “Invalid URL” error, check your URL. If the URL is correct, then delete one character and retype it. This refreshes the preview and should give you the correct PR in a few seconds.

Took me five hours to code this simple extension. I hope you enjoy it!

Update (April 5th 2009): I’m gratified to note that the command has garnered some good reviews! If you have any improvements or errors you notice, please leave your comments below.

Update (April 5th 2009): I’ve changed the jQuery.ajax function and replaced it with CmdUtils.previewAjax. This removes the “Invalid URL” error in the middle of typing and waits for the user to finish before display the results.

Similar Posts:

  • Share/Bookmark
Categories: Technology Tags: