View Single Post
Old 31st December 2011, 04:48 PM
David Batson Offline
Registered User
Join Date: Jul 2009
Posts: 1,234
Re: Disable/Enable Bluetooth Hotkey

Using your rfkill script, I was able to toggle bluetooth as well.

As root, I created the file /etc/acpi/actions/ with the contents of your rfkill script. I then made the file executable from Nautilus as root by changing permissions.

Next I ran acpi_listen in terminal to see what Fn+F9 showed. I was getting button/f24 F24 00000080 00000000. I then created the file /etc/acpi/events/bluetoothconf as root with the following contents:
Finally I ran #acpid restart. Now my hotkey combo toggles the bluetooth radio on and off.

An alternative for some might be to create a custom keyboard shortcut in System Settings > Keyboard > Shortcuts > Custom Shortcuts, however this was not working for me with the Fn+F9 shortcut.

EDIT: After reboot I got some SELinux alerts. Had to run audit2allow 3 times (IIRC) to get SELinux to allow the rfkill script to run.
Fedora 19 Gnome on a ThinkPad X220, i5-2540M CPU, Intel HD Graphics 3000, Intel N 6205 wireless, and Sierra Wireless 754S Mobile Hotspot (AT&T)

Last edited by David Batson; 31st December 2011 at 05:03 PM.
Reply With Quote