Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I do not want NetworkManager to list or manipulate my wireless card. Can I hide its interface from NetworkManager somehow?

I have tried adding this in /etc/network/interfaces,

iface wlan0 inet static
    address 192.168.1.101
    netmask 255.255.255.0
    gateway 192.168.1.1
    wireless-essid Synaptotagmin
    pre-up wpa_supplicant -B -i wlan0 -c /etc/wpa_supplicant.conf
    post-down killall -q wpa_supplicant

and this in /etc/NetworkManager/nm-system-settings.conf,

[main]
plugins=ifupdown,keyfile

[ifupdown]
managed=false

[keyfile]
unmanaged-devices=/org/freedesktop/Hal/devices/net_00_19_e0_57_86_af

but NetworkManager Applet still lists and allows me to connect to wireless networks.

share|improve this question
    
Do you want other applications to be able to see your wireless card? Are you just trying to manually control the settings via your interfaces file or some non-NetworkManager mechanism? I assume a modprobe blacklist is more than you want? –  belacq Jan 18 '11 at 3:20
    
That's correct, I still want to be able to manually control the network interface outside of NetworkManager. –  ændrük Jan 18 '11 at 4:19

6 Answers 6

up vote 8 down vote accepted

According to this documentation, the syntax in /etc/NetworkManager/nm-system-settings.conf is different than what I'd read elsewhere. It should be:

[main]
plugins=ifupdown,keyfile

[ifupdown]
managed=false

[keyfile]
unmanaged-devices=mac:00:19:e0:57:86:af

This configuration makes NetworkManager oblivious to the existence of my wireless card, but still allows me to control it using other methods.

share|improve this answer
2  
the conf files seem to have changed in later releases im using oneiric. i did the same change but in the file /etc/NetWorkManager/NetworkManager.conf –  tomodachi Apr 16 '12 at 22:36

Use the following /etc/NetworkManager/nm-system-settings.conf:

[main]
plugins=ifupdown,keyfile

[ifupdown]
managed=false

This way your interfaces from /etc/network/interfaces will be unmanaged by Network Manager, i.e. it will not try to do anything with them.

share|improve this answer
    
Thanks, but the file already contains these settings. I've updated my question to include this. –  ændrük Jan 17 '11 at 19:47
    
I too had problems with this. It started working only after a Network Manager restart. –  Diego May 30 at 8:26

I think the wrong line may be:

unmanaged-devices=/org/freedesktop/Hal/devices/net_00_19_e0_57_86_af

as I didn't found that format specified in the official documentation.

Valid formats are unmanaged-devices=mac:<hwaddr> or, in recent Network Manager versions, unmanaged-devices=interface-name:<ifname>. Both are accepted together separated by semicolons, for example:

unmanaged-devices=mac:00:22:68:1c:59:b1;mac:00:1E:65:30:D1:C4;interface-name:eth2

This is an extract from NetworkManager.conf manual:

unmanaged-devices

Set devices that should be ignored by NetworkManager when using the keyfile plugin. Devices are specified in the following format:

mac: or interface-name:. Here hwaddr is the MAC address of the device to be ignored, in hex-digits-and-colons notation. ifname is the interface name of the ignored device.

Multiple entries are separated with semicolons. No spaces are allowed in the value.

Example:

unmanaged-devices=interface-name:em4

unmanaged-devices=mac:00:22:68:1c:59:b1;mac:00:1E:65:30:D1:C4;interface-name:eth2

share|improve this answer

I assume you're on Ubuntu Desktop; if that's the case, right-click on nm-applet (I think on Natty you just click) and uncheck 'Enable wireless'. The only caveat is that you'll have to do that every time you log in.

share|improve this answer
    
This disables the wireless chip rather than just telling NetworkManager to ignore the interface. –  Cumulus007 Feb 3 '13 at 18:47

In Ubuntu 14.04, it is in the /etc/NetworkManager/NetworkManager.conf. But you may need to deal with the permissions.

share|improve this answer

Just create a .sh file containing killall -q wpa_supplicant and execute it using cron when you log in.

share|improve this answer

Your Answer

 
discard

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.