3

I am running xubuntu 16.04.

I am running two commands at startup to configure my mouse.

Both work fine in the terminal.

When I set them to run at startup using the "Sessions and Startup" app, one takes effect and one doesn't.

The one that does take effect is an xinput command to change sensitivity.

The one that doesn't take effect is as follows....

xset m 2 12

Why won't this xset command work when I set it through "Sessions and Startup". The startup command is enabled and certainly configured properly.

3
  • What if you alter the command to bash -c 'sleep 3 && xset m 2 12' ? Does that take effect ? Jan 21 '17 at 23:35
  • This solved it, but I had to set it to sleep for 10 seconds. If you post your answer I will flag as the answer.
    – Scorb
    Jan 22 '17 at 0:49
  • Will do so in about 20 minutes. Thanks Jan 22 '17 at 0:57
6

As it has been solved in the comments, the solution is to set the command to the command within a shell and delayed, like so:

bash -c 'sleep 10 && xset m 2 12'

The delays allows for GUI to properly start up, and then runs the specified command.

1
  • 1
    worked like a charm on ubuntu 19 Feb 15 '20 at 22:53
0

Write this to a text file

#!/bin/bash (newline of code) code Make the file executable and start that on login.

4
  • that is exactly what I did do. "Sessions and Startup" is the startup applications app in Xubuntu.
    – Scorb
    Jan 21 '17 at 23:14
  • OK, write this on a text file: Jan 22 '17 at 0:03
  • this approach did not work... I think the command is running fine, but for some reason xset is being set again afterwards or reset.
    – Scorb
    Jan 22 '17 at 0:25
  • Well, sorry! (That I couldn't help) Jan 22 '17 at 13:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.