Disable wireless on startup
There are so many ways to disable the card. The simplest I would say would be to put:
sudo ifdown wlan0
in your /etc/rc.local
above the line exit 0
. This should disable the wireless card (replace wlan0
with your wireless interface card)
If you want to enable/disable on a keyboard press, this thread on Ubuntu Forums explains how to link a keyboard event to a script. If you want it to toggle when you push keys you will have to add some logic to the script. Though the simplest way might be to have one key to enable and another to disable.
down script
#!/bin/bash
IFACE=wlan0
ifconfig ${IFACE} down
and up script
#!/bin/bash
IFACE=wlan0
ifconfig ${IFACE} up
You can stop it connecting to specific connections automatically quite easily.
- Right click the Network Manager notification applet
- Click Edit Connections...
- Under the Wireless tab, click edit on the connection(s) you want to disable by default and click edit.
- Uncheck Connect automatically
- Click apply, close the window, rinse and repeat.
When you want to connect, just left click the applet and select an access point.
Note: This doesn't power off the wifi card and it'll still be searching for wireless access points. This might not be what you're looking for. But if it is, great!
Note 2: If your connection drops, it won't automatically reconnect.
Create session on startup application such as:
Settings >> Preference >> Startup Application
Add then fill command :
dbus-send --system --type=method_call --dest=org.freedesktop.NetworkManager /org/freedesktop/NetworkManager org.freedesktop.DBus.Properties.Set string:org.freedesktop.NetworkManager string:WirelessEnabled variant:boolean:false
false means off but it can be to enable by fn+F2 or something else.