Recently I’ve fixed the tap-and-drag gesture, and swapped the right and middle click gestures on my netbook’s touchpad. I applied the configuration changes for these by adding the 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 file in your home directory and open it:
gedit ~/

Add your 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 ~/

Finally, set the dconf setting so GNOME knows where to find your script. Run the following command, but replace tom with your own username:
gsettings set org.gnome.settings-daemon.peripherals.input-devices hotplug-command "/home/tom/"

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.

Related Posts