Disabling the Laptop TouchPad in Ubuntu Linux

March 27th, 2008 by rvdavid

http://www.rvdavid.net/disabling-the-laptop-touchpad-in-ubuntu-linux/

Here’s a quick tip on disabling the touchpad on the Ubuntu Linux distro. It’s been bugging me for a while now that I have to use a non-gnome native solution to disabling my touchpad qsynaptics written in QT.

For those who are impatient and just want the quick instructions, I recommend that you install synclient, and issue asynclient TouchPadOff=1 usually SHMConfig is already on and this would be enough – in addition, synclient is usually installed by default (it is in Ubuntu Gutsy Gibbon).

Also, syndaemon can be activated pretty much by issuing a syndaemon -d. This disables the touchpad automatically for you when you start using the keyboard.

If you’ve tried to do this and it does not work, I guess you’ll just have to read below.

Method 1: Using qsynaptics. (What I used to do)

qsynaptics as I mentioned above, is a QT application. It was written to configure the synaptic touch pad. If you are comfortable with this, then you can follow the steps below.

Step 1: install it through the repository:

$ sudo aptitude install qsynaptics

Step 2: Once you’ve installed it, you need to run the qsynaptics program through the terminal:

$ qsynaptics

This should load up the GUI for qsynaptics. There’s a fieldset that says “switch synaptics touch pad” with two radio buttons below it on | off.

Step 3: Select “off”

Loading the qsynaptics settings on startup

This config option gets saved, but you’ll have to add it as a startup program in Sessions settings.

So what you need to do is the following:

Step 4: Go to System >> Preferences >> Sessions. This should bring up the Session configuration screen.

Step 5: Click the “Add” button. This should bring up the “New Startup Program” form. Fill the fields in accordingly:
Name: Restore qsynaptics settings
Command: qsynaptics -r
Comment: Restore last qsynaptics settings

Method 2: Using synclient

synclient is a program that allows you to set the toucpad parameters on the fly.

For this to happen however, you will first need to edit your xorg.conf file. It won’t be major, but you should back up anyway (ALWAYS do a back up)

Enabling the SHMConfig setting

Step 1: Back up your xorg.conf file

$ sudo cp /etc/X11/xorg.conf /etc/X11/xorg.conf-backup

Step 2: Open up your systen’s xorg.conf file.

$ sudo vim /etc/X11/xorg.conf

Step 3: Find the input device section which has “Synaptics Touchpad” as the identifier.
Step 4: In this part of the confguraiton file, there should be an “Option” called “SHMConfig” followed by either “on” or “off” ->This setting needs to be set to “on”.

Step 5: Edit the file if necessary, save and exit from the editor. If you had to turn the setting on, you will need to restart your computer. If it was already on, then skip restarting.

And that’s it. You should be able to use synclient!

Review your options with synclient -l

Doing a synclient -l will display your current user settings.

rvdavid@notebook:~$ synclient -l
Parameter settings:
LeftEdge             = 1872
RightEdge            = 5072
TopEdge              = 1712
BottomEdge           = 4144
FingerLow            = 25
FingerHigh           = 30
MaxTapTime           = 180
MaxTapMove           = 220
MaxDoubleTapTime     = 180
SingleTapTimeout     = 180
ClickTime            = 100
FastTaps             = 0
EmulateMidButtonTime = 75
VertScrollDelta      = 60
HorizScrollDelta     = 80
VertEdgeScroll       = 1
HorizEdgeScroll      = 0
VertTwoFingerScroll  = 0
HorizTwoFingerScroll = 0
MinSpeed             = 0.0822368
MaxSpeed             = 0.197368
AccelFactor          = 0.00164474
EdgeMotionMinZ       = 30
EdgeMotionMaxZ       = 160
EdgeMotionMinSpeed   = 1
EdgeMotionMaxSpeed   = 304
EdgeMotionUseAlways  = 0
UpDownScrolling      = 1
LeftRightScrolling   = 1
UpDownRepeat         = 1
LeftRightRepeat      = 1
ScrollButtonRepeat   = 100
TouchpadOff          = 1
GuestMouseOff        = 0
LockedDrags          = 0
RTCornerButton       = 2
RBCornerButton       = 3
LTCornerButton       = 0
LBCornerButton       = 0
TapButton1           = 1
TapButton2           = 2
TapButton3           = 3
CircularScrolling    = 0
CircScrollDelta      = 0.1
CircScrollTrigger    = 0
CircularPad          = 0
PalmDetect           = 1
PalmMinWidth         = 10
PalmMinZ             = 200
CoastingSpeed        = 0
PressureMotionMinZ   = 30
PressureMotionMaxZ   = 160
PressureMotionMinFactor = 1
PressureMotionMaxFactor = 1

To turn off the touchpad, you will need to modify the “TouchPadOff” setting and change it to zero “0″ instead of one “1″.

synclient lets you do this on the fly! Simply issue a synclient TouchPadOff=1 command and presto! Your touchpad is off.

As with method 1, you can add this to

Go to System >> Preferences >> Sessions. This should bring up the Session configuration screen.

Click the “Add” button. This should bring up the “New Startup Program” form. Fill the fields in accordingly:
Name: Disable touchpad
Command: synclient TouchPadOff=1
Comment: Disable TouchPad

You could also assign the command “synclient TouchPadOff=1″ to a shortcut key to turn the touch pad off and “synclient TouchPadOff=0″ to another shortcut key to turn the touch pad on.

Method 3: Using syndaemon

This method is probably the most elegant. When running in daemon mode, it disables the touchpad when you are using the keyboard and enables the touchpad when you stop typing.

Before doing this however you will need to verify that your the SHMConfigsetting is “on” and make sure that the toucpad is on. So if you have previously issued asynclient TouchPadOff=1 command, you will need to enable your touchpad again by issuing asynclient TouchPadOff=0. The following steps will enable syndaemon.

Step 1: If not already, Install syndaemon

$ sudo aptitude install syndaemon

Step 2: Run syndaemon in daemon mode

$ syndaemon -d

Step 3: As with the previous two methods, you can enable this at startup by adding the command that starts syndaemon as a new startup program.

Go to System >> Preferences >> Sessions. This should bring up the Session configuration screen.

Click the “Add” button. This should bring up the “New Startup Program” form. Fill the fields in accordingly:
Name: run syndaemon daemon
Command: syndaemon -d
Comment: syndaemon daemon


你可能感兴趣的:(session,ubuntu,command,System,UP,Parameters)