Re: momentarily disabling synaptic touchpad

2011-09-21 Thread William Shu
Hi Todd,
Thanks for the hint with awk.

I also finally figured out why sed was not working: besides confusion with the 
specific types of regular expression to use, the erratic touchpad made me miss 
an escape (\) character just before the + sign. Thus, one should have had:
    ... |sed -ne 's/.*id=\([0-9]\+\).*/\1/p'`"

Regards,

William.




>
>From: Todd And Margo Chester 
>To: "scientific-linux-us...@fnal.gov" 
>Sent: Wednesday, September 21, 2011 7:31 PM
>Subject: Re: momentarily disabling synaptic touchpad
>
>
>On 09/20/2011 01:47 PM, William Shu wrote: 
>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!)]
>Hi William,
>
>SED is a nightmare at times.  Do two AWKs.  I drop the "echo -n"
>in the example.
>
>$ echo "dkdksl id=13 dkdsl" | awk -F "id=" '{print $2}' | awk
'{print $1}'
>
>13
>
>
>-T
>
>
>
>>
>>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 
>>To: "scientific-linux-us...@fnal.gov" 
>>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 ""
>>
>>
>>
>>
>
>
>

Re: momentarily disabling synaptic touchpad

2011-09-21 Thread Todd And Margo Chester

  
  
On 09/20/2011 01:47 PM, William Shu wrote:

  
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!)]
  


Hi William,

SED is a nightmare at times.  Do two AWKs.  I drop the "echo -n"
in the example.

$ echo "dkdksl id=13 dkdsl" | awk -F "id=" '{print $2}' | awk
'{print $1}'

13


-T


  


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 
  To:
  "scientific-linux-us...@fnal.gov"
  
  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 ""
  




  

  


  



Re: momentarily disabling synaptic touchpad

2011-09-21 Thread William Shu




- Original Message -
> From: Vladimir Mosgalin 
> To: scientific-linux-us...@fnal.gov
> Cc: 
> Sent: Wednesday, September 21, 2011 1:35 PM
> Subject: Re: momentarily disabling synaptic touchpad
> 
> Hi William Shu!
> 
> On 2011.09.21 at 03:48:40 -0700, William Shu wrote next:
> 
>>  A) using synclient and syndaemon (partial success).
>> 
>>  syndaemon works all the time, but synclient only works *sometimes*. 
> However, I'm not sure what I did, as my activities (below) don't seem 
> repeatable/reproducible. My guess is they are being controlled/overidden from 
> two or more independent sources.
>> 
>>  First, I reversed the order of lines in *.fdi file, though I'm not 
> convinced that matters, to:
>> 
>>          type="string">synaptics
>>          type="string">true
> 
> Did you try "on", btw? I believe "true" might be deprecated.

Yes, it was "On" before I changed to "true". it does not seem to matter though. 
I still get intermittent responses.

> 
> Unfortunately, I can't assist you on gnome interfering issues.. these
> are hard to debug and deal with. Can give another idea, though - there
> is alternative way to turning touchpad off while typing with syndaemon -
> it's to make it ignore palm touch, the synclient setting for that is
> described here
> https://wiki.archlinux.org/index.php/Synaptics#Disable_Trackpad_while_Typing
> (sadly, most of this article contents is for Xorg 8 w/udev, so it won't
> work with SL6 which uses Xorg 7.4 w/hal)
> 

I have just tried set PalmDetect=1, but no visible change (yet):

$ synclient PalmDetect=1

but I may just be in one of the non-responsive phase of the system!
 
> 
>>  B) gnome desktop manipulation (unsuccessful).
>>  The script for gnome could not work. complained of not finding 
> "/desktop/gnome/...". find could not trace it (rooted elsewhere) and 
> so I abandon the approach.
> 
> There won't be such file - it's gconf key (you can browse around with
> gconf-editor after installing corresponding package, for example).
> But if there is no such key, probably touchpad manipulation from isn't
> supported on SL6.. (this key exists on Fedora system, for example).

it seems the key needs a physical directory somewhere, even if it is not
literally stored there as a file or subdirectory, as the following shows:

I've traced the directory root to be "~/.gconf", viz:
  /home/wss/.gconf/desktop/gnome/peripherals/touchpad/
but meet handicap that gconftool-2 --set ... does not want subdirectories
starting with a period (e.g., .gconf), and the file "touchpad_enabled"
does NOT exist in it (since it's a key?).

having a soft link via:

$ ln -s /home/wss/.gconf tmpgconf

solved the first problem. Repeated running of the script made the second
problem go away. The transcript follows (script in file gnome-touchpadtoggle):

[wss@localhost synaptics]$ ./gnome-touchpadtoggle
Failed to get value for 
`/home/wss/.gconf/desktop/gnome/peripherals/touchpad/touchpad_enabled': Bad key 
or directory name: 
"/home/wss/.gconf/desktop/gnome/peripherals/touchpad/touchpad_enabled": Can't 
have a period '.' right after a slash '/'
Error setting value: Bad key or directory name: 
"/home/wss/.gconf/desktop/gnome/peripherals/touchpad/touchpad_enabled": Can't 
have a period '.' right after a slash '/'
[wss@localhost synaptics]$ 
[wss@localhost synaptics]$ ./gnome-touchpadtoggle
No value set for 
`/home/wss/tmpgconf/desktop/gnome/peripherals/touchpad/touchpad_enabled'$(gconftool-2
 --get "/desktop/gnome/peripherals/touchpad/touchpad_enabled")
[wss@localhost synaptics]$ $(gconftool-2 --get 
"/desktop/gnome/peripherals/touchpad/touchpad_enabled")
[wss@localhost synaptics]$ $(gconftool-2 --get 
"/desktop/gnome/peripherals/touchpad/touchpad_enabled")
[wss@localhost synaptics]$ echo  $(gconftool-2 --get 
"/desktop/gnome/peripherals/touchpad/touchpad_enabled")
true
[wss@localhost synaptics]$ gconftool-2 --set 
"/desktop/gnome/peripherals/touchpad/touchpad_enabled" --type boolean false
[wss@localhost synaptics]$ echo  $(gconftool-2 --get 
"/desktop/gnome/peripherals/touchpad/touchpad_enabled")
false
[wss@localhost synaptics]$ ./gnome-touchpadtoggle
[wss@localhost synaptics]$ ./gnome-touchpadtoggle

> 
>> 
>>  Once more, thanks for the assistance.
> 
> No problem, I'm glad at least some solution worked :)
> 
> 
> -- 
> 
> Vladimir
>


Re: momentarily disabling synaptic touchpad

2011-09-21 Thread Vladimir Mosgalin
Hi William Shu!

 On 2011.09.21 at 03:48:40 -0700, William Shu wrote next:

> A) using synclient and syndaemon (partial success).
> 
> syndaemon works all the time, but synclient only works *sometimes*. However, 
> I'm not sure what I did, as my activities (below) don't seem 
> repeatable/reproducible. My guess is they are being controlled/overidden from 
> two or more independent sources.
> 
> First, I reversed the order of lines in *.fdi file, though I'm not convinced 
> that matters, to:
> 
>        synaptics
>        true

Did you try "on", btw? I believe "true" might be deprecated.

Unfortunately, I can't assist you on gnome interfering issues.. these
are hard to debug and deal with. Can give another idea, though - there
is alternative way to turning touchpad off while typing with syndaemon -
it's to make it ignore palm touch, the synclient setting for that is
described here
https://wiki.archlinux.org/index.php/Synaptics#Disable_Trackpad_while_Typing
(sadly, most of this article contents is for Xorg 8 w/udev, so it won't
work with SL6 which uses Xorg 7.4 w/hal)


> B) gnome desktop manipulation (unsuccessful).
> The script for gnome could not work. complained of not finding 
> "/desktop/gnome/...". find could not trace it (rooted elsewhere) and so I 
> abandon the approach.

There won't be such file - it's gconf key (you can browse around with
gconf-editor after installing corresponding package, for example).
But if there is no such key, probably touchpad manipulation from isn't
supported on SL6.. (this key exists on Fedora system, for example).

> 
> Once more, thanks for the assistance.

No problem, I'm glad at least some solution worked :)


-- 

Vladimir


Re: momentarily disabling synaptic touchpad

2011-09-21 Thread William Shu


Vladimir,
Thanks for the assistance. Just to give feedback on state of things now since, 
for now, I have to settle for a suboptimal solution -- option (C) below, 
toggling touchpad on/off using xinput -- so as to get on with other things. 
Ideally, getting synclient to work predictably (A) would enable me control 
other things, such as the sensitivity/pressure on the touchpad.



A) using synclient and syndaemon (partial success).

syndaemon works all the time, but synclient only works *sometimes*. However, 
I'm not sure what I did, as my activities (below) don't seem 
repeatable/reproducible. My guess is they are being controlled/overidden from 
two or more independent sources.

First, I reversed the order of lines in *.fdi file, though I'm not convinced 
that matters, to:

       synaptics
       true

and then restarted the hal daemon.

Then, I went to system -> preferences -> mouse -> touchpad and unchecked 
"Disable touchpad when typing"; "Enable mouse clicks with touchpad" was checked.


I tried the following to switch touchpad, and tapping (for clicks) on and off. 
They worked as expected: 

[wss@localhost synaptics]$  synclient  TapButton1=1  TapButton3=3 TapButton3=2
[wss@localhost synaptics]$ synclient TouchpadOff=1
[wss@localhost synaptics]$ synclient TouchpadOff=0
[wss@localhost synaptics]$  synclient  TapButton1=0  TapButton3=0 TapButton3=0
[wss@localhost synaptics]$ 
[wss@localhost synaptics]$  synclient  TapButton1=1  TapButton3=3 TapButton3=2
[wss@localhost synaptics]$ synclient TouchpadOff=0
[wss@localhost synaptics]$ synclient TouchpadOff=1


Assuming that gnome was interfering, I tried the exercise again, but could not 
get synclient to work!


I also noticed that the option SHMConfig may be deprecated, as this man page 
excerpt [from synaptics(4)] suggests:

  Option "SHMConfig" "boolean"
  Switch  on/off shared memory for run-time debugging. This option
  does not have an effect on run-time configuration anymore and is
  only useful for hardware event debugging.




B) gnome desktop manipulation (unsuccessful).
The script for gnome could not work. complained of not finding 
"/desktop/gnome/...". find could not trace it (rooted elsewhere) and so I 
abandon the approach.




C) toggling touchpad on/off using xinput (successful).
I've used the shellscript you proposed using xinput. It works well. I attached 
it to the key Alt-T using system -> preferences -> keyboard shortcuts.


Once more, thanks for the assistance.

Regards,

William.




From: Vladimir Mosgalin 
To: scientific-linux-us...@fnal.gov
Sent: Tuesday, September 20, 2011 10:03 PM
Subject: Re: momentarily disabling synaptic touchpad

Hi William Shu!

On 2011.09.20 at 13:24:20 -0700, William Shu wrote next:

> Vladimir,
> Thank you so much for the suggestion. I followed the instructions on the web 
> page. For a moment it seems it will not work, then the touchpad was actually 
> disabled, but I have no clue what I did. Then, of its own, the pad was 
> activated after a few hours. I have rebooted the system as well as give the 
> command as root but no success. The output of synclient is given below.o

Did you create .fdi file and enabled configuring with synclient in it?
Because otherwise only options from .fdi file are going to work, you
have to enable synclient run-time configuring with separate option.

> The other command you gave seems to have an error! Not clear if part of a 
> shell script, but the characters -- ","0","*") -- after the last & seem 
> redundant.:


> 
>  syndaemon -i 1 -d -K && xinput set-int-prop \"SynPS/2 Synaptics 
> TouchPad\" \"Synaptics Two-Finger Pressure\" 32 10 &","0","*")
> 
> ignoring them and unquoting the "'s removed the errors, but seemed to have no 
> effect!

Yes, sorry. quotes were unneeded. Here is alternate version of second
command, anyhow, to enable two-finger tap, if you need middle button on
touchpad

xinput --set-prop --type=int --format=32 "SynPS/2 Synaptics TouchPad" 
"Synaptics Two-Finger Pressure" 10  


First one (syndaemon command) disables touchpad *temporarily* when you
are typing only; that's merely one of the options, as most people just
don't want touchpad to interfere with typing. Value after -i is in
seconds for how long touchpad will stay disabled after keypress. Maybe
you saw effect of that when thinking that touchpad was disabled
permanently?

I believe both syndaemon and synclient will work only when run-time
configuration is enabled in .fdi (after which you might need to reboot
or restart hal, as you can't detach and re-attach touchpad).


If you want to disable touchpad permanently, you can also use xinput,
like
xinput --set-

Re: momentarily disabling synaptic touchpad

2011-09-20 Thread Vladimir Mosgalin
Hi William Shu!

 On 2011.09.20 at 15:34:50 -0700, William Shu wrote next:

> Yes, I did create the fdi file, see below. (I also copied the file from 
> /usr/share/hal/policy/99-synaptics.fdi  to 
> /usr/share/hal/policy/20thirdparty/99-ssynaptics.fdi and renamed originals to 
> *.save)
> 
> 
> Your inititial solution seems the best .
> 
> Dumb question: how is it enabled for synclient?

input.x11_options.SHMConfig = on does that trick, which is done in your
config file.

synclient/syndaemon configuring doesn't work at all, still?

If you can't get syndaemon to turn off touchpad while typing, I don't
really know what to suggest; still, you might find one of other
solutions from last mail acceptable (binding to some key launch of
"touchpad on/off" script which uses xinput or gconftool, whichever
works)..

Btw, out of curiousity, did you check if fdi catched by system/works?
Like, try putting some obvious option there from synaptic(4) manpage to
check if it has effect.


-- 

Vladimir


Re: momentarily disabling synaptic touchpad

2011-09-20 Thread William Shu
Yes, I did create the fdi file, see below. (I also copied the file from 
/usr/share/hal/policy/99-synaptics.fdi  to 
/usr/share/hal/policy/20thirdparty/99-ssynaptics.fdi and renamed originals to 
*.save)


Your inititial solution seems the best .

Dumb question: how is it enabled for synclient?




William.

---[ file: /usr/share/hal/policy/20thirdparty/99-synaptics.fdi ]---






  
    
    
    On
    synaptics
    
  






From: Vladimir Mosgalin 
To: scientific-linux-us...@fnal.gov
Sent: Tuesday, September 20, 2011 10:03 PM
Subject: Re: momentarily disabling synaptic touchpad

Hi William Shu!

On 2011.09.20 at 13:24:20 -0700, William Shu wrote next:

> Vladimir,
> Thank you so much for the suggestion. I followed the instructions on the web 
> page. For a moment it seems it will not work, then the touchpad was actually 
> disabled, but I have no clue what I did. Then, of its own, the pad was 
> activated after a few hours. I have rebooted the system as well as give the 
> command as root but no success. The output of synclient is given below.o

Did you create .fdi file and enabled configuring with synclient in it?
Because otherwise only options from .fdi file are going to work, you
have to enable synclient run-time configuring with separate option.

> The other command you gave seems to have an error! Not clear if part of a 
> shell script, but the characters -- ","0","*") -- after the last & seem 
> redundant.:


> 
>  syndaemon -i 1 -d -K && xinput set-int-prop \"SynPS/2 Synaptics 
> TouchPad\" \"Synaptics Two-Finger Pressure\" 32 10 &","0","*")
> 
> ignoring them and unquoting the "'s removed the errors, but seemed to have no 
> effect!

Yes, sorry. quotes were unneeded. Here is alternate version of second
command, anyhow, to enable two-finger tap, if you need middle button on
touchpad

xinput --set-prop --type=int --format=32 "SynPS/2 Synaptics TouchPad" 
"Synaptics Two-Finger Pressure" 10  


First one (syndaemon command) disables touchpad *temporarily* when you
are typing only; that's merely one of the options, as most people just
don't want touchpad to interfere with typing. Value after -i is in
seconds for how long touchpad will stay disabled after keypress. Maybe
you saw effect of that when thinking that touchpad was disabled
permanently?

I believe both syndaemon and synclient will work only when run-time
configuration is enabled in .fdi (after which you might need to reboot
or restart hal, as you can't detach and re-attach touchpad).


If you want to disable touchpad permanently, you can also use xinput,
like
xinput --set-prop --type=int "SynPS/2 Synaptics TouchPad"  "Device Enabled" 8 0

By the way, if finding device by text string in xinput not working for
you, you can call "xinput list" to find device id of your touchpad and
then use it instead. 

In case you absolutely can't get synclient & syndaemon working for you,
just stick with xinput, they should work regardless of .fdi settings, I
believe. More examples of xinput are here
https://wiki.ubuntu.com/X/Config/Input


Here is automated script to turn touchpad on & off. Customize to your
liking and then bind its execution to some key. Script isn't mine, I'm
merely copypasting it:

#!/bin/sh
# get touchpad id
XINPUTNUM=`xinput list | grep 'SynPS/2 Synaptics TouchPad' | sed -n 
-e's/.*id=\([0-9]\+\).*/\1/p'`

# get the current state of the touchpad
TPSTATUS=`xinput list-props $XINPUTNUM | awk '/Device Enabled/ { print $NF }'`

# if getting the status failed, exit
test -z $TPSTATUS && exit 1

if [ $TPSTATUS = 0 ]; then
xinput set-int-prop $XINPUTNUM "Device Enabled" 8 1
else
xinput set-int-prop $XINPUTNUM "Device Enabled" 8 0
fi



Also, on gnome desktop you might get working something as simple as this
(but I'm really not sure it works on SL6.0 desktop):

#!/bin/sh
TOUCHPAD_ENABLED=$(gconftool-2 --get 
"/desktop/gnome/peripherals/touchpad/touchpad_enabled")

if [ "$TOUCHPAD_ENABLED" = "true" ]
then
   gconftool-2 --set "/desktop/gnome/peripherals/touchpad/touchpad_enabled" 
--type boolean false
else
   gconftool-2 --set "/desktop/gnome/peripherals/touchpad/touchpad_enabled" 
--type boolean true
fi 




-- 

Vladimir

Re: momentarily disabling synaptic touchpad

2011-09-20 Thread Vladimir Mosgalin
Hi William Shu!

 On 2011.09.20 at 13:24:20 -0700, William Shu wrote next:

> Vladimir,
> Thank you so much for the suggestion. I followed the instructions on the web 
> page. For a moment it seems it will not work, then the touchpad was actually 
> disabled, but I have no clue what I did. Then, of its own, the pad was 
> activated after a few hours. I have rebooted the system as well as give the 
> command as root but no success. The output of synclient is given below.o

Did you create .fdi file and enabled configuring with synclient in it?
Because otherwise only options from .fdi file are going to work, you
have to enable synclient run-time configuring with separate option.

> The other command you gave seems to have an error! Not clear if part of a 
> shell script, but the characters -- ","0","*") -- after the last & seem 
> redundant.:


> 
>  syndaemon -i 1 -d -K && xinput set-int-prop \"SynPS/2 Synaptics 
> TouchPad\" \"Synaptics Two-Finger Pressure\" 32 10 &","0","*")
> 
> ignoring them and unquoting the "'s removed the errors, but seemed to have no 
> effect!

Yes, sorry. quotes were unneeded. Here is alternate version of second
command, anyhow, to enable two-finger tap, if you need middle button on
touchpad

xinput --set-prop --type=int --format=32 "SynPS/2 Synaptics TouchPad" 
"Synaptics Two-Finger Pressure" 10  


First one (syndaemon command) disables touchpad *temporarily* when you
are typing only; that's merely one of the options, as most people just
don't want touchpad to interfere with typing. Value after -i is in
seconds for how long touchpad will stay disabled after keypress. Maybe
you saw effect of that when thinking that touchpad was disabled
permanently?

I believe both syndaemon and synclient will work only when run-time
configuration is enabled in .fdi (after which you might need to reboot
or restart hal, as you can't detach and re-attach touchpad).


If you want to disable touchpad permanently, you can also use xinput,
like
xinput --set-prop --type=int "SynPS/2 Synaptics TouchPad"  "Device Enabled" 8 0

By the way, if finding device by text string in xinput not working for
you, you can call "xinput list" to find device id of your touchpad and
then use it instead. 

In case you absolutely can't get synclient & syndaemon working for you,
just stick with xinput, they should work regardless of .fdi settings, I
believe. More examples of xinput are here
https://wiki.ubuntu.com/X/Config/Input


Here is automated script to turn touchpad on & off. Customize to your
liking and then bind its execution to some key. Script isn't mine, I'm
merely copypasting it:

#!/bin/sh
# get touchpad id
XINPUTNUM=`xinput list | grep 'SynPS/2 Synaptics TouchPad' | sed -n 
-e's/.*id=\([0-9]\+\).*/\1/p'`

# get the current state of the touchpad
TPSTATUS=`xinput list-props $XINPUTNUM | awk '/Device Enabled/ { print $NF }'`

# if getting the status failed, exit
test -z $TPSTATUS && exit 1

if [ $TPSTATUS = 0 ]; then
xinput set-int-prop $XINPUTNUM "Device Enabled" 8 1
else
xinput set-int-prop $XINPUTNUM "Device Enabled" 8 0
fi



Also, on gnome desktop you might get working something as simple as this
(but I'm really not sure it works on SL6.0 desktop):

#!/bin/sh
TOUCHPAD_ENABLED=$(gconftool-2 --get 
"/desktop/gnome/peripherals/touchpad/touchpad_enabled")

if [ "$TOUCHPAD_ENABLED" = "true" ]
then
   gconftool-2 --set "/desktop/gnome/peripherals/touchpad/touchpad_enabled" 
--type boolean false
else
   gconftool-2 --set "/desktop/gnome/peripherals/touchpad/touchpad_enabled" 
--type boolean true
fi 




-- 

Vladimir


Re: momentarily disabling synaptic touchpad

2011-09-20 Thread William Shu
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 
To: "scientific-linux-us...@fnal.gov" 
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 ""

Re: momentarily disabling synaptic touchpad

2011-09-20 Thread William Shu
ling   = 0
    CircScrollDelta = 0.1
    CircScrollTrigger   = 0
    CircularPad = 0
    PalmDetect  = 0
    PalmMinWidth    = 10
    PalmMinZ    = 199
    CoastingSpeed   = 0
    PressureMotionMinZ  = 29
    PressureMotionMaxZ  = 159
    PressureMotionMinFactor = 1
    PressureMotionMaxFactor = 1
    GrabEventDevice = 1
    TapAndDragGesture   = 1
    AreaLeftEdge    = 0
    AreaRightEdge   = 0
    AreaTopEdge = 0
    AreaBottomEdge  = 0
[wss@localhost ~]$ 






From: Vladimir Mosgalin 
To: scientific-linux-us...@fnal.gov
Sent: Tuesday, September 20, 2011 1:16 AM
Subject: Re: momentarily disabling synaptic touchpad

Hi William Shu!

On 2011.09.19 at 16:28:32 -0700, William Shu wrote next:

> 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.)  
> 
> Question 1: If I create the xorg.conf file, would that later create
> problems for me when I switch to other machines--legacy or recent? I
> would not want some of the clashes (no/incorrect video, etc.) I
> experienced with SL 52 on USB sticks.

It will create problems if you switch configuration if you create
full-fledged xorg.conf; for example video card ID on PCI bus creates
problem, and video card driver. However good thing is, you don't have to
create xorg.conf; modern xorg supports small snippets of config files in
which you can tweak only some part of config, and letting everything
else to be autoconfigured. Sadly, this doesn't work for some stuff like
video (if you have to set gamma, you have to put all sections like video
card - display - etc), but it works perfectly for input devices.
So, it's best to be without xorg.conf at all, if your system can handle
it (if you install nvidia binary drivers, you probably must have that
file :( )


Here lies the trouble, however, as SL6 uses Xorg 7.4 which doesn't
support udev-based configuration (it appeared in Xorg 8 and higher)
or config snippets from /etc/X11/xorg.conf.d; it uses older method of
hal-based configuration with config snippets from .fdi files. Check out
this page, here you can find exact solution which should work in SL6.0:
http://en.gentoo-wiki.com/wiki/Synaptics_Touchpad/Xorg_7.3

(of course, skip kernel & X11 compiling part :)


So, just create .fdi and customize it with options from manpage to your
liking, you can enable synclient real-time configuration, too. You won't
have to touch anything else or xorg.conf and this file won't interfere
with systems that don't have touchpads at all. This should answer your
second question, too.

> Question 3: Can the touchpad sometimes interfere with the use of the
> mouse? If so, how to minimize interference. the [replacement] mouse I
> use may not be the right quality?

Seems unlikely, I'd suspect faulty mouse, but can never be sure.. Still,
never heard or experienced any kind of interference between mouse,
touchpad and touchscreen - they all seem to work in any combination.


-- 

Vladimir

Re: momentarily disabling synaptic touchpad

2011-09-19 Thread Todd And Margo Chester

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

  



Re: momentarily disabling synaptic touchpad

2011-09-19 Thread Vladimir Mosgalin
Hi William Shu!

 On 2011.09.19 at 16:28:32 -0700, William Shu wrote next:

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

Btw, once you enable real-time configuration, you can do lots of magic
with your touchpad, for example this snippet (works on modern systems
but haven't checked on SL6 - but probably it should work) - tweaks
touchpad so that double-finger tap works as middle button that's
always missing on touchpads (of course, touchpad must supports
multitouch) and also disables touchpad while you are typing text, so it
won't be sending annoying commands during that.

syndaemon -i 1 -d -K && xinput set-int-prop \"SynPS/2 Synaptics TouchPad\" 
\"Synaptics Two-Finger Pressure\" 32 10 &","0","*")

It's kind of a magic so please don't ask me how it works, I have no idea :)
It just does!

-- 

Vladimir


Re: momentarily disabling synaptic touchpad

2011-09-19 Thread Vladimir Mosgalin
Hi William Shu!

 On 2011.09.19 at 16:28:32 -0700, William Shu wrote next:

> 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.)  
> 
> Question 1: If I create the xorg.conf file, would that later create
> problems for me when I switch to other machines--legacy or recent? I
> would not want some of the clashes (no/incorrect video, etc.) I
> experienced with SL 52 on USB sticks.

It will create problems if you switch configuration if you create
full-fledged xorg.conf; for example video card ID on PCI bus creates
problem, and video card driver. However good thing is, you don't have to
create xorg.conf; modern xorg supports small snippets of config files in
which you can tweak only some part of config, and letting everything
else to be autoconfigured. Sadly, this doesn't work for some stuff like
video (if you have to set gamma, you have to put all sections like video
card - display - etc), but it works perfectly for input devices.
So, it's best to be without xorg.conf at all, if your system can handle
it (if you install nvidia binary drivers, you probably must have that
file :( )


Here lies the trouble, however, as SL6 uses Xorg 7.4 which doesn't
support udev-based configuration (it appeared in Xorg 8 and higher)
or config snippets from /etc/X11/xorg.conf.d; it uses older method of
hal-based configuration with config snippets from .fdi files. Check out
this page, here you can find exact solution which should work in SL6.0:
http://en.gentoo-wiki.com/wiki/Synaptics_Touchpad/Xorg_7.3

(of course, skip kernel & X11 compiling part :)


So, just create .fdi and customize it with options from manpage to your
liking, you can enable synclient real-time configuration, too. You won't
have to touch anything else or xorg.conf and this file won't interfere
with systems that don't have touchpads at all. This should answer your
second question, too.

> Question 3: Can the touchpad sometimes interfere with the use of the
> mouse? If so, how to minimize interference. the [replacement] mouse I
> use may not be the right quality?

Seems unlikely, I'd suspect faulty mouse, but can never be sure.. Still,
never heard or experienced any kind of interference between mouse,
touchpad and touchscreen - they all seem to work in any combination.


-- 

Vladimir