A few days ago I turned on Bluetooth on my laptop and then turned it off.
Now I see every time I start the laptop, I see the Bluetooth is turned on and I should turn it off manually and sometimes I forget.
How should I fix this problem? (I'm using Ubuntu 18.04)
There are more technical solutions - none of which worked for me, at least, not without killing the manager or the adapter - so, after a couple of hours going around in circles, I gave in and made a simple "fix" - I wanted to keep the icon, essentially, but have bluetooth switched off at start up.
Create a file, call it sbo.sh, the contents of which should be:
#!/bin/bash
sleep 1
rfkill block bluetooth
I saved this in /opt (any user space would do), then made sure I was owner:
sudo chown myname:myname /opt/sbo.sh
...and that it was executable:
sudo chmod u+x /opt/sbo.sh
Then I opened "Startup Applications Preferences" Clicked on "Add" then entered the following details:
Name:
Switch Bluetooth Off
Command:
/opt/sbo.sh
Comment:
Switch off bluetooth but keep icon at start
Seems to work. The one second pause ("
sleep 1
" in step 1) is important... it's enough of a lag for the device to become enabled. Doubtless not the most elegant work around, but after a couple of hours twiddling with things (like/etc/rc.local
, systemd, etc.) to no avail... it's something that works.