SCIENTIFIC-LINUX-USERS Archives

September 2011

SCIENTIFIC-LINUX-USERS@LISTSERV.FNAL.GOV

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
William Shu <[log in to unmask]>
Reply To:
William Shu <[log in to unmask]>
Date:
Wed, 21 Sep 2011 03:48:40 -0700
Content-Type:
text/plain
Parts/Attachments:
text/plain (164 lines)


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:

       <merge key="input.x11_driver" type="string">synaptics</merge>
       <merge key="input.x11_options.SHMConfig" type="string">true</merge>

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 <[log in to unmask]>
To: [log in to unmask]
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

ATOM RSS1 RSS2