Ubuntu

is there a CLI to disable wireless in network-manager in Jaunty?

Asked by Brandon Williams on 2009-04-16

In Hardy, this command line could be used to disable wireless in network-manager:

dbus-send --system --type=method_call --dest=org.freedesktop.NetworkManager /org/freedesktop/NetworkManager org.freedesktop.NetworkManager.setWirelessEnabled boolean:false

Using boolean:true would enable wireless in network-manager.

This method no longer works in Jaunty. Is there a new way to do this that works with the latest network-manager?

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu network-manager Edit question
Assignee:
No assignee Edit question
Solved by:
Brandon Williams
Solved:
2009-04-21
Last query:
2009-04-21
Last reply:

I figured it out. The WirelessEnabled setting is now a dbus property, and is set using DBus.Properties.Set, rather than NetworkManager.setWirelessEnabled as was done before.

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