Recently I’ve fixed the tap-and-drag
swapped the right and middle click
on my netbook’s touchpad. I applied the configuration changes for these by
synclient configuration commands to
Startup Applications. It
didn’t take long before I noticed that some changes would revert after I
suspended and woke the system. Even adding the changes to my Xorg configuration
didn’t make them stick. What’s the deal?
It turns out that GNOME 3 will overwrite some touchpad options with it’s own hardcoded defaults. Whenever GNOME re-detects your touchpad, even after a suspend, it will wipe out your options with its own that cannot be changed.
Fortunately GNOME provides a
hook so that after your
changes are erased, you can set them again. Using a
dconf value, you choose to
run your own script.
Here’s how to make your custom touchpad configuration persistent through reboots
and even suspends. Start by creating a file to hold your script. Run this
command to create a
touchpad_settings.sh file in your home directory and open
synclient commands to this file and save it. Mine looks like this:
synclient SingleTapTimeout=360 FastTaps=1 synclient TapButton2=2 TapButton3=3
Make the file executable:
chmod +x ~/touchpad_settings.sh
Finally, set the
dconf setting so GNOME knows where to find your script. Run
the following command, but replace
tom with your own
gsettings set org.gnome.settings-daemon.peripherals.input-devices hotplug-command "/home/tom/touchpad_settings.sh"
You don’t need to set your touchpad options any other way now. GNOME should run your script whenever you log in or wake the system from suspend.