Linux - GeneralThis 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
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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).
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!
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.