I have a bluetooth mouse which is way too sensitive out of the box. So via xinput I set the correct settings and saved them in a mousefix.sh
. I put this file in /home/user/localsettings/mousefix.sh
and I want it to run whenever I login.
So I added it to Startup Applications with these commands, but none seem to pick it up on boot;
/home/user/localsettings/mousefix.sh
bash /home/user/localsettings/mousefix.sh
sh /home/user/localsettings/mousefix.sh
So how would I write the command to this script to do get it working at login? (As a workaround I just run bash /home/user/localsettings/mousefix.sh
from the terminal after logging in)
This might be a duplicate question, but I've searched all over and all similar questions have accepted answers like "Just add it Startup Applications", which I did, but it's not working (yet).
chmod +x
? calling it with full path like that won't work unless it is executable. Two other bullet points are good way, but I'd suggest you stick to eitherbash
orsh
- which ever you've written the script in. There are some commands that are consideredbashisms
- they're not portable to other shells. Finally, consider addingsleep 5
. The script runs when you log into GUI, not at boot. Giving it delay will allow for margin to let the GUI properly start, and then run the rest of the script – Sergiy Kolodyazhnyy Nov 03 '16 at 10:48/bin/bash -c "sleep 10 && /home/user/localsettings/mousefix.sh"
. The sleep 10 is the key. – Jacob Vlijm Nov 03 '16 at 10:50