0

Recently I purchased logitech bluetooth mouse. It's lagging on ubuntu 20.04 and I found solution here. Unfortunately this solution suggests run it manually. I tried systemd and crontab to automatically run it. But no success. Can you tell me how to run this script or update bluetooth configuration?

Here is script I needed to run

sed -i -E "s/^(MinInterval=.+)$/MinInterval=6/;s/^(MaxInterval=.+)$/MaxInterval=7/;s/^(Latency=.+)$/Latency=0/;s/^(Timeout=.+)$/Timeout=2160/" /var/lib/bluetooth/device_address/mouse_address/info
sudo service bluetooth restart

hurelhuyag
  • 101
  • 2

1 Answers1

0

If you want to run scripts on login, you can insert the script in ~/.profile or ~/.xprofile file.

edit: Didn't notice sudo. My bad.

You could add this script to root-user crontab with @reboot annotation.

install a cronjob client if you have not yet eg. cronie

sudo crontab -e to edit root users cronjobs

insert @reboot [path to script] to a new line

source: https://www.maketecheasier.com/run-bash-script-as-root-during-startup-linux/

Vahvaloac
  • 31
  • 3