Ubuntu – How to quickly enable/disable touchpad in Xubuntu 14.04 without installing other applications

touchpadxubuntu

In Xubuntu 14.04. accessing the settings to disable and enable the touchpad are a bit hidden – in Settings-Mouse and Touchpad, and once there, there are a few other clicks needed.

enter image description here

I have tried by installing the panel application touchpad-indicator – but that seemed buggy in Xfce maybe due to conflicts with the Xfce settings…

Is there a quick and safe method to enable/disable touchpad?

Best Answer

That can be easily done with these two commands (inspired by a different answer):

Disable:

synclient TouchpadOff=1

Enable:

synclient TouchpadOff=0

My initial answer was to use

xinput set-prop 15 "Device Enabled" 0

and

xinput set-prop 15 "Device Enabled" 1

where the id number may be other than 15: it can be be found by running

xinput list

I found about these commands in this answer under a question on how to disable the touchpad.


The commands can be added into launchers.

I prefer creating .desktop files (in usr/share/applications or in .local/share/applications) for the two commands to be run easily with a launcher like Whisker Menu, Synapse, etc


Also:

  • by adding them into a single launcher,

  • setting advanced properties like in the image below

enter image description here

(namely 'show last used item' and 'inside button'),

  • and adding two specific icons,

the launcher will always display the current status of the touchpad.

enter image description here


Also it is never a bad idea to assign shortcuts (Settings Manager - Keyboard - Application Shortcuts) to the two commands.