As Unix Ubuntu does not support a natural scrolling and tap touchpad click I created simple script for enabling those options. As I got tired of executing it every time I reboot the laptop I wanted to add script to init.d but somehow it does not execute. Please find the code below:
#!/bin/bash
DEV="$(xinput list | grep Touchpad | grep -o '=[0-9][0-9]' | grep -o '[0-9][0-9]')"
TAP="$(xinput --list-props $DEV | grep 'Tapping Enabled (' | grep -o '[0-9][0-9][0-9]')"
SCROLL="$(xinput --list-props $DEV | grep 'Natural Scrolling Enabled (' | grep -o '[0-9][0-9][0-9]')"
xinput set-prop $DEV $TAP 1
xinput set-prop $DEV $SCROLL 1
I have done the following 1:
Move file to init.d
Sudo chmod a+x /etc/init.d/touchpad.sh
update-rc.d touchpad.sh defaults
2:
Open cronetab
@reboot /directory/touchpad.sh
Both methods does not work but script runs with:
sudo /etc/init.d/touchpad.sh start
Is there something I'm missing?
Thanks