Fashion HOW-TO: Script + Hotkey to Enable / Disable Touchpad
time ago I use ubuntu, and little by little, you realize that some details are missing. But once you realize it's not that hard to get down to work and settle yourself those little details that make your day more enjoyable. Today we are concerned
a problem I have some time, and has increased more since I started playing games with Wine under Ubuntu 8.04, the touchpad. When using Windows might disable the touchpad with HotKey partner, but this key does not work on my Ubuntu for some time now.
As I suppose there will be many of you at the same sitiacion, I decided to create this little HOW-TO to make life a little easier for Ubuntu users.
[Hands ]
STEP 1, On SHMConfig some research we realized how easy it is to enable / disable the touchpad. We just have to run a command with the value 0 or 1. But before that we need an option to enable the touchpad. Began:
Edit the xorg.conf file with the command:
udo s gedit / etc/X11/xorg.conf
Now we have to find the section of the Synaptics touchpad, which should look like this :
In this section we add =>
Option "SHMConfig" so that it looks like:
Reset the X server (Ctrl + Alt + Bcksp) or failing that Ubuntu itself .
You can enable / disable the touchpad
by using Command Line:
synclient TouchpadOff = 1 / / Disable
synclient TouchpadOff = 0 / / Enable
STEP 2, On HotKey + Script
So far so good, but really want to open a console whenever we want off touchpad? Certainly not, so now let's move to assign this action to a HotKey, so that we can do it with a simple gesture keyboard. For them we will need to turn this into a script that changes the state of the variable automatically. So I've assembled the following script to query this value and change it. As easy as this:
# / bin / bash
state = `synclient-l TouchpadOff (Gconf-editor)
Execute the program gconf-editor
Sail to => apps \\ metacity \\ keybinding_commands
Edit
free tengais first key (for example 'command_1')
then navigate to:
apps \\ metacity \\
global_keybindings
desired combination Assign the key for 'run_commandoanterior' in our case
'run_command_1'
READY!
Now you can activate and deactivate the touchpad with the combination chosen.
binding Greetings and happy!
0 comments:
Post a Comment