Monday, June 6, 2011

Unable to turn off touchpad on Ubuntu 10.10?

I ran into a situation, that the touchpad on Ubuntu 10.10 always enables itself after a while. If this has happened to you either, here's a solution for you.


This simple script uses gconf-editor,  where it changes the bool value indicating whether it is on or off.
- in ENABLED variable is stored the actual state
- next the condition is evaluated and the actual state changes

Here's the script:
#!/bin/bash

ENABLED=`gconftool-2 --get /desktop/gnome/peripherals/touchpad/touchpad_enabled`

if [ $ENABLED == true ]; then
  `gconftool-2 --type bool --set /desktop/gnome/peripherals/touchpad/touchpad_enabled 0`
else `gconftool-2 --type bool --set /desktop/gnome/peripherals/touchpad/touchpad_enabled 1`
fi

exit 0
Copy the script into /usr/bin or /usr/local/bin, from where it will be run. You can map a keyboard shortcut on it.

No comments:

Post a Comment