Some strange thing: when I'm logging in to gnome DE the script/initd works. But not with LXDE, xfce or gnome classic. Something must be happening during logging in; after the boot process. But how to unravel this?
One way to "unravel" the conundrum is to take a trial and error approach. That involves trying different things to hopefully find one configuration that works for you. What you have described is just that, but since it hasn't yielded what you'd like to end up with, what choice is there but to continue?
The following are some observations on the issue.
In post #1, you mention that you've tried all the three methods at:
https://www.heatware.net/linux-tips/run-execute-script-on-linux-startup/
There is a systemd service file described there, not unlike the suggestion of
@f33dm3bits in post #5. It's described for ubuntu, and not for debian, but it would function the same on a debian systemd installation which is the one evidently running according to post #1.
Did you try that systemd method? If you did, and it failed, did you check the journal logs to see any information there about why it failed?
For debian, the above link suggests writing an init script to run from /etc/init.d/<script>. That script needs to be written according to a specific format, examples of which can be seen by inspecting some of the files already in that directory. The format is described in: man init-d-script.
Did you write such an init script, register it in the system and update with the update-rc.d command?
In relation to the actual commands that you used to disable the touchpad, it's worth noting that the man page shows some different, but equivalent commands. It may be worth trying the alternative command. It may seem odd that they would have any different outcome since they are described as equivalent. Nevertheless, sometimes odd and unpredictable outcomes happen.
The alternative command from the man page may be something like:
Code:
xinput set-prop "SynPS/2 Synaptics TouchPad" "Device Enabled" 0
In relation to the script not working in lxde, did you use the lxde autostart facility? There's a description of the process in the answer sections here:
There's quite a bit of information out there on this topic, but for some reason I just can't get it to work. This is on a raspberry pi running the 'DietPi' flavor over the raspian distro, and is pe...
stackoverflow.com
There are some more experiences described by users here which may reflect on this issue:
I recently upgraded from Debian 8, to Debian 9 stretch. Apparently they no longer utilize synaptics /synclient to control touch-pad input. What I am looking for is a simple command to enable or dis...
unix.stackexchange.com
It's worth noting that the baeldung resource mentioned by
@Alexzee in post #4, has different commands again for the same disabling process so it may be worth considering and trialing those.
It may seem like a lot of messing around to get where you want to be, but sometimes linux is like that for users who aren't that deeply familiar with all the software they use
.