Hi there,
For me it didn't work just to disable bluetooth with the following code:
Code:
sudo systemctl disable bluetooth.service
, because after a restart, bluetooth was enabled again.
I found and alternative solution, and that would be the following (I use nano, feel free to use any other text editor):
Step 1:
Navigate to the folder:
Code:
/etc/systemd/system/
Step 2:
First create a script that will kill the bluetooth service once run:
Code:
nano bluetoothkill.sh
Step 3:
Instert the following script:
Code:
#!/bin/bash
rfkill block bluetooth
exit 0
Step 4:
Create a foo.service file in the same folder
Code:
/etc/systemd/system/
:
Step 5:
Insert the following script:
Code:
[Unit]Details=Additional startup scripts
After=network.target
[Service]
ExecStart=/etc/systemd/system/bluetoothkill.sh
[Install]
WantedBy=default.target
Step 6:
Run the following command in the terminal:
Code:
sudo systemctl start foo.service
Step 7:
Restart the machine and on the next boot you will notice that the Bluetooth service is no longer enabled by default on startup. You can still enable it when ever you like in the settings, or the terminal it is behaving without any errors.
If you like to add more scripts on startup, you can always edit the file and add additional lines under the [Service] bracket to run additional scripts on startup, for example:
Code:
ExecStart=/full-script-filepath/newscript.sh
Bookmarks