0

On xfce, I can just do it in the settings, but I am trying to switch to i3.

Running this command when I am booted disables the touchpad effectively:

xinput set-prop "SynPS/2 Synaptics TouchPad" "Device Enabled" 0

I am on Ubuntu 17.10 so I did not find rc.local in /etc/.

I looked around and found this solution on stackexchange which reenables rc.local on systemd.

So, I followed it and added the above command to rc.local which now exists.

However, my touchpad is not being disabled so I am not sure what to do.

2

You can disable the touchpad on boot up by creating a .desktop entry in your /.config/autostart/ directory.

In order to perform that, follow the below steps.

First we need to create the desktop entry in .config/autostart/ in the home directory of our user using the following command.

touch /home/<user>/.config/autostart/touchpad.desktop (file name is optional)

then we need to add entries in the file and make the file executable.

vim /home/<user>/.config/autostart/touchpad.desktop

and paste the following in that file.

[Desktop Entry]
Name=Disable touchpad
GenericName=Touchpad disabler
Comment=Disables touchpad
Exec=xinput set-prop "SynPS/2 Synaptics TouchPad" "Device Enabled" 0
StartupNotify=true
Terminal=false
Type=Application
Name=touchpad.desktop

save the file and exit the editor.

And make it executable using the following steps

chmod 755 /home/<user>/.config/autostart/touchpad.desktop

Reboot and check. Your touch pad would be disabled in your login.

To enable tocuhpad after disabling it, you may run the following in a terminal.

xinput set-prop "SynPS/2 Synaptics TouchPad" "Device Enabled" 1

Note that this would enable touchpad only for the current session. You have to remove the desktop entry or change the value from 0 to 1 in order to enable the touchpad on boot up.

If you want to disable the touchpad only and not the physical buttons (Left and right click), then

replace Exec=xinput set-prop "SynPS/2 Synaptics TouchPad" "Device Enabled" 0 to

Exec=synclient TouchpadOff=1
| improve this answer | |
  • The script works, but adding it to crontab doesn't seem to make it execute on boot, unless I did something wrong. – Vpie649 Dec 19 '17 at 20:56
  • @Vpie649 Please try the new method which i have edited in the answer. – ran Dec 20 '17 at 6:37
  • @ran I did exactly what you have suggested but it doesnt work for me (Xubuntu), although the turn off command works just fine in the shell. – Sebastian Mar 22 '18 at 10:51
0

Putting

exec --no-startup-id xinput --disable "SynPS/2 Synaptics TouchPad"

into i3 config seems to work.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.