Automatically run rfkill unblock on startup

startupwifi

I'm running Elementary OS on an old(er) HP Pavilion dm1. Unfortunately, on startup my wireless is hard disabled, and I need to run sudo rfkill unblock all to get it up and running. Works fine once I do though.

Is there any way to either:
1) Automatically run this line with startup
2) Not need to do this anymore?

When I use rfkill to view any blocks, there's a hard block on the wireless, and the wireless button's light is orange. Pressing the button does nothing. After running the line, I can switch wireless on and off at will.

Best Answer

You have three options:

  • You can add the command rfkill unblock all using "System Settings > Startup Applications > Add"

  • Or add it to your /etc/rc.local file, before any return statement:

    rfkill unblock all
    
  • Not sure of this one; you can create a script (unblock.sh) in /etc/init.d with the single line rfkill unblock all >&2. Then, run chmod +x unblock.sh

Related Question