Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I would like to run a command (that turns off bluetooth devices) at every startup. I normally use cron for these, but this is a command that needs to be ran as root. How do I do this?

share|improve this question
4  
If you don't want bluetooth, why don't you just disable the bluetooth service? –  Garrett Nov 18 '11 at 20:07

4 Answers 4

You could try putting the commands in /etc/rc.local. Commands in this file should be run at the end of the boot sequence.

Disabling the drivers, and or software as has described by skrewler is often a good solution.

share|improve this answer

You're looking to modify your init.d scripts / setting. This can get complex and depends on your distro. You might be able to edit or create /etc/init/bluetooth.conf or /etc/defaults/bluetooth. But I think Vixie Cron supports cron jobs for root and has a start up time setting.

share|improve this answer

You can still use cron to do it.

make an entry in /etc/crontab like this

@reboot  root /path/to/your/command

or as root type

crontab -e

and make an etry like:

@reboot /path/to/your/command

The /etc/crontab is the global crontab and thus you need to specify the user, crontab -e invokes the per-user crontab.

share|improve this answer

If you are on Fedora run this chkconfig --level 12345 bluetooth off

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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