-1

I wrote a bash script to alter the touchpad settings using xinput but when I try to run the script I am getting a message saying the file doesn't exist. Here is the script:

#!/bin/bash

# change 'Synaptics Move Speed (278)' mouse speed
xinput set-prop 11 278 1, 15, .05, 40

# change and invert 'Synaptics Scrolling Distance (275)'
xinput set-prop 11 275 -90, -90

# enable 'Synaptics Locked Drags (280)'
xinput set-prop 11 280 1

# change 'Synaptics Locked Drags Timeout (281)'
xinput set-prop 11 281 600

# change 'device accel Constant Deceleration (263)'
xinput set-prop 11 263 3

#change 'Device Accel Adaptive Deceleration (264)'
xinput set-prop 11 264 2

the script is called touchpad.sh and when I run 'sudo touchpad.sh', I get the error message:

sudo: touchpad.sh: command not found

Im confused because I can run each of these commands individually on the command line so Im not sure whats wrong.

Paul R
  • 208,748
  • 37
  • 389
  • 560
Josh Lowy
  • 15
  • 4

1 Answers1

1

Your script cannot be found by the shell.

The shell looks for files to execute in the folders listed in the PATH environment variable. When your script doesn't reside in one of those folder, you need to specify the full path to the file.

For example, if the script is located in your current working directory, you'd call it with

./touchpad.sh