If you’ve got a laptop, you’ll no doubt notice your touchpad. Most people don’t mind it, but some people really don’t like the thing. For example: you might be typing something and all of a sudden, your curser moves, all because you have accidentally touched it. Most Linuxes have the ability to disable it while typing by messing with some settings. If you use Ubuntu, there’s even a guide here on MTE for this.
As cool as it is to be able to temporarily disable the touchpad, wouldn’t you rather have the ability to fully shut it off at startup? It’s possible. I should know as I’ve been using a custom .desktop file on my laptops for close to two years. It’s just one line of code in a .desktop file.
Making the .Desktop file
Open up your text editor of choice and paste the code below into it.
[Desktop Entry] Name=Disable touchpad GenericName=Touchpad disabler Comment=Disables touchpad Exec=synclient TouchpadOff=1 StartupNotify=true Terminal=false Type=Application Name[en_US]=disable-touchpad.desktop
Once pasted, save the file inside “/home/USERNAME/.config/autostart” as “disable-touchpad.desktop”.
Note: If you can’t figure out how to save in hidden folders, just save it to your home folder, open a terminal and enter:
mv disable-touchpad.desktop ~/.config/autostart
Open a terminal and enter the following commands to make the file executable. Making the file executable is super important. If you don’t, the file won’t run.
cd ~/.config/autostart sudo chmod +x disable-touchpad.desktop
Once the file is in the autostart folder, all you need to do is reboot your machine. In doing so, you’ll notice that you can no longer use your touchpad at all. Obviously, this is because of the .desktop file that was just placed.
Re-enabling the touchpad
If you want to permanently re-enable the touchpad, navigate your file manager to ~/.config/autostart and delete the “disable-touchpad.desktop” file. However, if you just need it temporarily, enter the following command into a terminal.
Changing 0 to 1 is akin to True and False. 1 keeps it disabled, 0 keeps it off. Knowing this command is great, because you can just enable it for as long as you need it, then just reboot (or turn your machine off) and when you turn it back on, the touchpad will be once again disabled.
The touchpad is an essential part of mobile computing. It’s a really great tool if you don’t really feel like carrying a mouse around. Some people, however, hate touchpads and no matter how much convenience it brings, they just wont use it. This is understandable. For the longest time, I have despised them. There’s just something about them that has always irritated me. I’m not quite sure what it is, but I do know that I’d rather use a mouse.
Some might argue that it’s better to just use your laptop’s hardware to disable the touchpad. This is understandable, but the thing is, hardware disabling can be hit or miss with some Linux laptops. Sometimes functions just don’t work, and it can be extremely frustrating. The very laptop I am writing this article on can’t disable my touchpad. This is why doing it via software is great. It works on everything and can be automated.
Let us know what you think.