SynapticsTouchpadHowTo
|
Size: 1021
Comment:
|
Size: 4165
Comment:
|
| Deletions are marked like this. | Additions are marked like this. |
| Line 1: | Line 1: |
| == Synaptics Touchpads == | == For Newbies == |
| Line 3: | Line 3: |
| == for newbies == On laptops, the touchpad is the built-in mouse. "Synaptics touchpad" should not be confused with "Synaptic", the Ubuntu Package Manager, or Graphical User Interface equivalent of "apt-get" in a terminal. |
On laptops, the touchpad is the built-in mouse. "Synaptics touchpad" should not be confused with "Synaptic", the Ubuntu Package Manager, or Graphical User Interface for "apt-get" in a terminal. |
| Line 6: | Line 5: |
| In Breezy and later versions of Ubuntu, the synaptics touchpad on laptops should work out of the box. There should be an entry like this in /etc/xorg.conf: | In Breezy(5.10) and later, laptops with a synaptics touchpad should work out of the box. Go to a terminal and {{{grep}}} (look inside) your {{{/etc/X11/xorg.conf}}} file: {{{ grep Id /etc/X11/xorg.conf }}} If one of the lines is: {{{ Identifier "Synaptics Touchpad" }}} then you have a Synaptics Touchpad. {{{qsynaptics}}} (in KDE ksynaptics) is a GUI which allows you to configure your touchpad. At a terminal, enter: {{{ sudo apt-get install qsynaptic }}} == Turning Synaptics Touchpads On/Off with a shortcut key == ## Thanks to noob_Lance for [http://www.ubuntuforums.org/showthread.php?t=143095 this how-to] You may wish to turn the touchpad on or off so that it doesn't interfere with typing when using a USB or other mouse. Use following steps: '''Step 1''' from a terminal, edit /etc/xorg.conf {{{ sudo gedit /etc/X11/xorg.conf }}} and look for the following section of code: |
| Line 17: | Line 46: |
| and add one more Option at the End of the Section: {{{ Option "SHMConfig" "on" EndSection }}} '''Step 2''' |
|
| Line 18: | Line 53: |
| == Turning Synaptics Touchpads On/Off == | Next we will create 3 files - a bash script to turn the touchpad on, one to turn it on, and a python script to use a single key combination for both. At a terminal, {{{cd}}} to {{{/usr/local/bin}}} and make a new file: {{{ cd /usr/local/bin sudo gedit tpoff }}} and paste the following code in the file, save it and close it. {{{ #!/bin/bash # |
| Line 20: | Line 63: |
| KSynaptics should allow KDE users some control over their touchpad, though issues may exist. | synclient touchpadoff=1 }}} again, make a new file: {{{ sudo gedit tpon }}} paste the following, save and close: {{{ #!/bin/bash # |
| Line 22: | Line 74: |
| In Ubuntu, to turn the touchpad on or off (so that it doesn't interfere with typing) when using a USB or other mouse, use following steps: | synclient touchpadoff=0 }}} once again, make a new file: {{{ sudo gedit touchpad.py }}} paste the following, save and close {{{ #!/usr/bin/python import os import string |
| Line 24: | Line 87: |
| 1) from a terminal, edit /etc/xorg.conf: | def ReadFile(): myfile = open('/tmp/synclient.tmp', 'rb') for line in myfile: TestString(line) myfile.close() def TestString(string): for word in string.split(): if word == "TouchpadOff": setting = string.split() ChangeState(setting[2]) def ChangeState(current): if current == "0": os.system("synclient touchpadoff=1") else: os.system("synclient touchpadoff=0") os.system("rm /tmp/synclient.tmp") def Main(): ReadFile() os.system("synclient -l > /tmp/synclient.tmp") Main() }}} and finally, change the permissions of these three files: |
| Line 26: | Line 115: |
| sudo gedit /etc/xorg.conf | sudo chmod 777 tpon tpoff touchpad.py |
| Line 28: | Line 117: |
| this will | '''Step 3''' Next, edit your sudoers files to allow you to execute both scripts without a password. {{{ sudo visudo }}} and add this line {{{ {user} ALL = NOPASSWD: /usr/local/bin/touchpad.py }}} where {user} is your user name save (in nano hit <CTRL> <o>), and make sure to save it as: {{{/etc/sudoers}}} '''Step 4''' Next, install xbindkeys {{{ sudo apt-get install xbindkeys }}} when it's done, install xbindkeys-config, the GUI for xbindkeys {{{ sudo apt-get install xbindkeys-config }}} once each is installed, start both applications: {{{ xbindkeys }}}and {{{ xbindkeys-config }}} edit your file to the shortcut key you want. For example, to be able to switch the touchpad on/off by <Ctrl><F5>, fill in the following, under Edit: Name: Touchpad On/Off Key: Control + F5 | m:0x4 + c:71 Action: /usr/local/bin/touchpad.py then click apply & save & exit Now that that is done, restart xbindkeys: {{{ xbindkeys }}} You may need to restart X. Remember that each time you restart X, you will need to run xbindkeys again in order for the shortcut to work. (if anyone knows how to have it autrun, please let ["brallan" me] know and i'll include it here... == Turning On/Off tapping on a synaptics touchpad == == Turning On/Off the touchpad but leaving the |
For Newbies
On laptops, the touchpad is the built-in mouse. "Synaptics touchpad" should not be confused with "Synaptic", the Ubuntu Package Manager, or Graphical User Interface for "apt-get" in a terminal.
In Breezy(5.10) and later, laptops with a synaptics touchpad should work out of the box. Go to a terminal and grep (look inside) your /etc/X11/xorg.conf file:
grep Id /etc/X11/xorg.conf
If one of the lines is:
Identifier "Synaptics Touchpad"
then you have a Synaptics Touchpad.
qsynaptics (in KDE ksynaptics) is a GUI which allows you to configure your touchpad. At a terminal, enter:
sudo apt-get install qsynaptic
Turning Synaptics Touchpads On/Off with a shortcut key
You may wish to turn the touchpad on or off so that it doesn't interfere with typing when using a USB or other mouse.
Use following steps:
Step 1
from a terminal, edit /etc/xorg.conf
sudo gedit /etc/X11/xorg.conf
and look for the following section of code:
Section "InputDevice"
Identifier "Synaptics Touchpad"
Driver "synaptics"
Option "SendCoreEvents" "true"
Option "Device" "/dev/psaux"
Option "Protocol" "auto-dev"
Option "HorizScrollDelta" "0"
EndSectionand add one more Option at the End of the Section:
Option "SHMConfig" "on" EndSection
Step 2
Next we will create 3 files - a bash script to turn the touchpad on, one to turn it on, and a python script to use a single key combination for both. At a terminal, cd to /usr/local/bin and make a new file:
cd /usr/local/bin sudo gedit tpoff
and paste the following code in the file, save it and close it.
# synclient touchpadoff=1
again, make a new file:
sudo gedit tpon
paste the following, save and close:
# synclient touchpadoff=0
once again, make a new file:
sudo gedit touchpad.py
paste the following, save and close
import os
import string
def ReadFile():
myfile = open('/tmp/synclient.tmp', 'rb')
for line in myfile:
TestString(line)
myfile.close()
def TestString(string):
for word in string.split():
if word == "TouchpadOff":
setting = string.split()
ChangeState(setting[2])
def ChangeState(current):
if current == "0":
os.system("synclient touchpadoff=1")
else:
os.system("synclient touchpadoff=0")
os.system("rm /tmp/synclient.tmp")
def Main():
ReadFile()
os.system("synclient -l > /tmp/synclient.tmp")
Main()and finally, change the permissions of these three files:
sudo chmod 777 tpon tpoff touchpad.py
Step 3
Next, edit your sudoers files to allow you to execute both scripts without a password.
sudo visudo
and add this line
{user} ALL = NOPASSWD: /usr/local/bin/touchpad.pywhere {user} is your user name
save (in nano hit <CTRL> <o>), and make sure to save it as: /etc/sudoers
Step 4 Next, install xbindkeys
sudo apt-get install xbindkeys
when it's done, install xbindkeys-config, the GUI for xbindkeys
sudo apt-get install xbindkeys-config
once each is installed, start both applications:
xbindkeys
and
xbindkeys-config
edit your file to the shortcut key you want. For example, to be able to switch the touchpad on/off by <Ctrl><F5>, fill in the following, under Edit:
Name: Touchpad On/Off Key: Control + F5 | m:0x4 + c:71 Action: /usr/local/bin/touchpad.py
then click apply & save & exit
Now that that is done, restart xbindkeys:
xbindkeys
You may need to restart X.
Remember that each time you restart X, you will need to run xbindkeys again in order for the shortcut to work. (if anyone knows how to have it autrun, please let ["brallan" me] know and i'll include it here...
Turning On/Off tapping on a synaptics touchpad
== Turning On/Off the touchpad but leaving the
SynapticsTouchpadHowTo (last edited 2008-08-06 17:00:08 by localhost)