LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 07-14-2013, 01:01 AM   #1
alkahest
LQ Newbie
 
Registered: Mar 2013
Posts: 12

Rep: Reputation: Disabled
How can I re-enable the Touchpad?


Hello everyone,

I run Slackware 14 on a Dell Studio 17 notebook. I believe my touchpad is made by Synaptic, or similar.

Using BASH, I disabled my touchpad. First, I commanded 'xinput list', and found that my touchpad was given id=11. Then I commanded 'xinput set-prop 11 "Device Enabled" 0'. This disabled the touchpad. Thus, the cursor is frozen and I can't use the touchpad at all.

I want to re-enable the touchpad, but when I command 'xinput list', the touchpad is no longer listed. The id 11 has been reassigned to something called 'Speakup', which is a keyboard utility. The touchpad doesn't have an id number, so I can't re-enable it by setting "Device Enabled" to 1 (on).

How can I re-enable the touchpad?

Thanks!!!
 
Old 07-14-2013, 06:53 AM   #2
onebuck
Moderator
 
Registered: Jan 2005
Location: Central Florida 20 minutes from Disney World
Distribution: SlackwareŽ
Posts: 13,925
Blog Entries: 44

Rep: Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159
Member Response

Hi,

This script should help you to toggle the touchpad;
Code:
#!/bin/bash

# touchpad.sh Written by Atanas S / Siteground Support Team

# First we need to get the device ID from the xinput
# if it does not work for you, you may need to set the cut -f option to another number
# I would suggest that you test the command in your terminal first to see the result
# It should output an integer usually between 8-15, at least on my lap top :D

getdev=`xinput list |grep pointer |grep PS |cut -f 2`
devid=${getdev/id=/}

#Second we need to get the device status, if it is enabled or not

# if it does not work for you, you may need to set the cut -f option to another number
# I would suggest that you test the command in your terminal first to see the result
# It should output 0 or 1

getstatus=`xinput list-props $devid |grep 'Device Enabled' |cut -f 3`

#once we get the device status depending on the status we set it the other way arround
        if [ "$getstatus" == "1" ]; then
        newstatus="0"
        else
        newstatus="1"
        fi
`xinput set-prop $devid "Device Enabled" $newstatus`
By running the script you will toggle the state of the TouchPad.
Hope this helps!
 
Old 07-14-2013, 11:37 PM   #3
sundialsvcs
LQ Guru
 
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 10,659
Blog Entries: 4

Rep: Reputation: 3938Reputation: 3938Reputation: 3938Reputation: 3938Reputation: 3938Reputation: 3938Reputation: 3938Reputation: 3938Reputation: 3938Reputation: 3938Reputation: 3938
Following on to what onebuck just posted, you also need to be sure that your system is properly set-up to recognize another mouse-pointer device.

If everything's working as it should, either the touchpad or an external (USB?) mouse should "move the mouse pointer" equally. If this is indeed the case, then you know that X is aware of both devices and is accepting input from both. Now you can toggle the touchpad in the manner described. X should now ignore the touchpad but continue to accept input from the external mouse.

It's very important that you actually do what the script suggests: actually look at what the xinput list command is producing, then the two commands piped-together, then the three, finally all four. Determine which input-device is which. Be certain that the output (which winds up in the variable getdev) is picking-up (only...) the proper input device.

Last edited by sundialsvcs; 07-14-2013 at 11:38 PM.
 
Old 07-16-2013, 08:10 AM   #4
dive
Senior Member
 
Registered: Aug 2003
Location: UK
Distribution: Slackware
Posts: 3,467

Rep: Reputation: Disabled
If you use synclient instead of xinput life becomes easier:

synclient TouchpadOff=1 # off
synclient TouchpadOff=0 # on
 
Old 07-16-2013, 04:52 PM   #5
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Germany
Distribution: Whatever fits the task best
Posts: 17,148
Blog Entries: 2

Rep: Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886
To add to what dive already pointed out, I use this script, bound to a keyboard combination, to toggle my touchpad on and off:
Code:
#!/bin/bash

synclient TouchpadOff=$(synclient -l|grep -c 'TouchpadOff.*=.*0')
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to disable and enable touchpad in linux? costcatch Linux - Laptop and Netbook 1 06-22-2012 05:18 PM
Touchpad disable/enable typing. zuriel45 Linux - Software 2 01-21-2011 08:42 AM
i have different configuration to enable scrolling on my touchpad!!! kiruja Linux - Hardware 1 10-23-2009 06:20 PM
how to enable touchpad tap click Xfce fastestOS Slackware 4 08-30-2009 04:27 AM
Fedora 9 - How to ENABLE Synaptics touchpad BobNutfield Fedora 16 12-30-2008 08:25 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 09:54 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration