1

After looking around for a bit on how to change my touchpad parameters automatically on booting up, I've found that I should be able to do this by creating the folder ~/.config/autostart in which I then create a touchpad.sh.desktop and a touchpad.sh file, where the first contains:

[Desktop Entry]
Type=Application
Exec=/home/jschoete/.config/autostart/touchpad.sh
X-GNOME-Autostart-enabled=true
Hidden=false
NoDisplay=false
Name[en_GB]=touchpad
Name=touchpad
Comment[en_GB]=natural scrolling and tap to click
Comment=natural scrolling and tap to click

and the latter:

#!/bin/bash

xinput set-prop 12 327 1
xinput set-prop 12 343 1

The latter file works as intended when executed manually, but it doesn't seem to get executed upon bootup, what is going wrong?

J. Schmidt
  • 190
  • 12
  • 2
    @Rishon_JR most of the proposed solutions in that article look inappropriate to me, since afaik xinput needs a running X server – steeldriver Mar 17 '23 at 17:00
  • 1
    Is the script executable, i.e. can you run it manually as `~/.config/autostart/touchpad.sh` or do you need to use `bash ~/.config/autostart/touchpad.sh`? – steeldriver Mar 17 '23 at 17:03
  • What about this [article](https://www.golinuxcloud.com/run-script-at-startup-boot-without-cron-linux/) – Rishon_JR Mar 17 '23 at 17:12
  • Change the whole command after `Exec=` to `sh -c 'sleep 10; xinput set-prop 12 327 1; xinput set-prop 12 343 1'` and see if that works ... See for example https://askubuntu.com/a/1450655 – Raffa Mar 17 '23 at 17:18
  • @Rishon_JR Obviously I did or I wouldn't be here. – J. Schmidt Mar 17 '23 at 18:23
  • @steeldriver this seemed to be the issue! I made it executable with chmod and now it worked after a reboot. – J. Schmidt Mar 17 '23 at 18:24

0 Answers0