Tips & Tricks, Tutorials, Hacking, Troubleshooting,

One annoyance many people using laptops have discovered when first using Xfce, a popular lightweight desktop environment for Linux, is that their trackpad has the tap-to-click setting stuck “on” with no option to turn it off. Now, it should be said up front that a lot of people like tap-to-click, and if so, good for you. This article probably won’t do you a lot of good. For the rest of who at least want the option to turn off tap-to-click, here’s how to do it, and how to get the setting to stick when you restart your computer.

If you only want to turn off tap-to-click, the following command in the Terminal will do the trick:

synclient MaxTapTime=0

What this does it tell synclient to set the max tap time allowed to zero. This means in practice that any time your finger or palm touches the trackpad for longer than zero (and by definition, any touch is longer than zero), then it isn’t acknowledged as a tap. This isn’t exactly the same as turning off tap-to-click, but if your touchpad doesn’t acknowledge anything as being a tap… it’s just as good.

The problem with the above command is that it needs to be entered once per session. Log out or reboot and you’re right back to where you were before you typed it.

So what we need to do is figure out how to make that setting “stick” between boots. Not a difficult problem, as it turns out. We just need to create a little script.

So, open up a text editor. In Xubuntu, which uses Xfce as its desktop environment, Mousepad is the default text editor. It can be found in the Accessories menu, so open it from there.

Open Mousepad

Once Mousepad is open, type or paste in the following:

# turns off tap-to-click
/usr/bin/synclient MaxTapTime=0

The first line tells the system that the following is a command that will be run in Bash, which is our standard Terminal, so running this script will be exactly the same as if we had typed it manually.

The second line is just a comment (the pound sign at the beginning of the line means it isn’t treated as a command), that reminds us what the command does. And the third line is the actual command. It’s identical to what we typed earlier, except now it has the full path to synclient.

Now save our document, by choosing the Save As option.

Save Script

We’ll want to give it a memorable name; its’ really something so we remember it. Something like TapToClickFix will do.

Give Script a Name

In this image, you can see that we’ve used the name mentioned above, and have elected to save the file to our Desktop.

Now that we’ve saved the script, we need to make it executable. In other words, we need to let the system know that this script can be run as an application. To do this, first right-click on the script and select Properties.

View Properties

When the Properties window appears, click on the Permissions tab and tick the checkbox at the bottom, which will allow the script to run as a program.

Run Script As Program

When you’re done, simply dismiss the window. We now need to move the script to somewhere safe. Your Home folder works well, but the script could also be places in your /usr/bin/ folder if you’d like.

Once you have the script where you want it, there’s one more step (since the script won’t run automatically). We need to add the script to the list of items that are started automatically each time you start your computer. To do this, open the Settings Manager, which can be found in the Settings Menu.

Open Settings Manager

When the Settings Manager opens, click the Session and Startup icon.

Session and Startup Icon

When the Session and Startup window loads, click the Application Autostart tab.

Application Autostart Tab

Now click the Add button at the bottom of the window.

Click The Add Button

A new window will appear. This is how it looks with the necessary information filled in:

Add Application Window

Note: When adding the information to the window as shown above, the Description really isn’t necessary. You can also choose any Name you want. The Command, on the other hand, needs to be the exact path you chose when you saved the script.

And that’s it. Restart or reboot, and you should find that tap-to-click is now turned off. If you ever decide you want it back, simply return to the Session and Startup window, and either remove the item we just added (which will remove it permanently from your startup list), or simply untick the checkbox, which will leave it in available should you change your mind once more, but won’t use it unless you tick the checkbox again.

No comments:

Post a Comment