Thanks Todd,
The script works when I manually give the value for $DeviceID. There are some 
trailing characters beyond the device ID that make the system to complain. The 
external mouse can't seem to handle click/select and copy (I think the mouse 
has probs, and I'm still to get another model and use.)


my awk is too rusty to figure how to output only the number after id=. Trying 
to use sed as in, e.g.,

$   echo -n "dkdksl id=13 dkdsl" |  sed -ne 's/.*id=\([0-9]+\).*/\1/p'

does not extract the id (13, here). (I hope I'm not slowly messing up the 
system!)


While I would like to see your version work, the solution proposed by Vladimir 
would meet my needs better when it works!

William.



________________________________
From: Todd And Margo Chester <[email protected]>
To: "[email protected]" <[email protected]>
Sent: Tuesday, September 20, 2011 2:55 AM
Subject: Re: momentarily disabling synaptic touchpad


On 09/19/2011 04:28 PM, William Shu wrote: 
Hi,
>I have SL 6.0 installed on a Seagate FreeAgent GoFlex USB drive, which I use 
>on various laptops (and desktops). The touchpad is so sensitive on some 
>machines and I would like to disable it. At the same time, the attached mouse 
>seems to be selectively responsive, notably its left button. Looking through 
>the docs etc, a synaptics input driver has been installed, but the 
>corresponding xorg.conf file is not in place for me to modify. (From a 
>separate thread on nVidia, creating this file is NOT automatic in SL 6.)
> 
>
Hi William,

This is probably not exactly what you wanted.  But, anyway...

I have a sweet little old lady (70+) on FC15 that the slide pad
    drives
her crazy.  She is constantly putting her had down on it when she
    types.
She prefers to use her USB attached mouse.  So I wrote the following
script for her.  I don't remember where I put it though.  Maybe her
rc.local.

HTH,
-T

#!/bin/bash
#Disable the [annoying] Slide Pad mouse

#DeviceStr="`xinput list | grep -i touchpad | awk '{print $6}'`"
#DeviceID="`echo $DeviceStr | sed -e 's/id=//'`"

DeviceID="`xinput list | grep -i touchpad | awk -F "id=" '{print
    $2}'`"
if [ -z "$DeviceID" ]; then
   echo "DeviceID failed to resolve.  There is something wrong."
   echo "Cowardly exiting.  Bummer, dude ..."
   echo ""
   exit 1
fi

xinput set-prop $DeviceID "Device Enabled" 0
echo "touchpad mouse on device id $DeviceID has been disabled"
echo ""

Reply via email to