The network manager in Ubuntu has the ability to restore the last user saved settings of network hardware devices, upon the next desktop login. For example, if you had disabled Bluetooth, then it should be disabled then next time you login to your desktop. If you had it turned ON, then it will be turned ON, automatically etc.
However, sometimes, out of no reason, even after manually disabling it (because I hardly use it), upon the next reboot, Ubuntu 12.04 automatically enables the Bluetooth device in my laptop computer. And when running, it consumes a reasonable amount of power too, so the first thing that I do after logging into the desktop is disabling it, manually.
Doing this over and over again is a hectic task, and if you are having the same issue and looking for a way to make Ubuntu disable it at the system boot-up, permanently, then you can follow the below steps.
Note: After disabling it using this method, you can re-enable it using the usual Bluetooth icon on the top-panel in Unity desktop. In fact, this is actually the original command that is executed, when you click on that icon to turn it ON or OFF.
Open your Terminal and enter the below command.
gksudo gedit /etc/rc.local
Then copy and paste the below command into the opened configuration file, but make sure to paste it before the text line that says ‘exit 0’, otherwise it will not work (as shown below).
rfkill block bluetooth
Then save the changes and close the file. That’s it.
Now try rebooting, and your Bluetooth device should be turned OFF by Ubuntu, no matter what state it was in, before.
Not just Bluetooth, but you can use ‘rfkill’ to disable any wireless network or device as well. For instance, if I wanted to disable Wi-Fi, then replace ‘bluetooth’ part of the above command with ‘wifi’. For disabling WiMax, replace it with ‘wimax’. If you wanted to disable all the wireless connections, then use ‘all’ instead.
If you want to know more about this command, then read its shortly written manual by using the below command.