1

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).

Asitis
  • 539
  • In first bullet point, did you make it executable with 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 either bash or sh - which ever you've written the script in. There are some commands that are considered bashisms - they're not portable to other shells. Finally, consider adding sleep 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
  • This is a dupe, will look it up. To quickly help you: make it executable and add to startup applications: /bin/bash -c "sleep 10 && /home/user/localsettings/mousefix.sh". The sleep 10 is the key. – Jacob Vlijm Nov 03 '16 at 10:50
  • 4
    Got it! http://askubuntu.com/questions/708012/startup-applications-not-working mind the typo I made in the first version of the comment above ^. – Jacob Vlijm Nov 03 '16 at 10:51
  • Serg ; yes I did make it executable like that :) @JacobVlijm aah, so the script runs, but too soon? Wouldn't have figured that out myself. Thanks! – Asitis Nov 03 '16 at 10:54
  • You' re welcome, don' t mention it :) – Jacob Vlijm Nov 03 '16 at 10:54

0 Answers0