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 toggle my wifi with the Fn+F9 key combination on my Samsung laptop in Fedora with XFCE. I have this script:

#!/bin/bash

if [ $(rfkill list wifi | grep ": yes" | wc -l) -eq 1 ] ; then
    rfkill unblock wifi
else
    rfkill block wifi
fi

I have binded this script in the Keyboard settings to the key combination, but it fails to toggle the wifi as it is not run as root. How can I change this?

Thank you.

share|improve this question

Your Answer

 
discard

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

Browse other questions tagged or ask your own question.