# Controlling the metric in NetworkManager

## dufeu

I've set up a multi-boot Atom based netbook as a 'research' pc. As part of that, I'm using NetworkManager on all the 'nix OSes {other than sysrescd}. Currently, I've installed Gentoo, LinuxMint, SystemRescueCD and WinXP.

I can set each of the OSes to come up such that 'eth0' is a {different} specific IPv4 address. However, I'm having issues with the 'wlan0'.

I have each OS boot into CLI. This is because I'm researching different Windowing environments {I have need to support a number of visually impaired users}. Currently, it's not until I log into a GUI that NetworkManager {depending on WM} starts the 'wlan0' nic.

As I understand from what I read, I should be able to have 'wlan0' come up automatically at boot but it doesn't. So the first thing I'd like are some good examples of the NetworkManager configuration settings I need to enable 'wlan0' at boot. It's not clear to me from both the Gentoo guides I've read and from the on-line Network Manager documentation what I really need to do.

For what it's worth, I've installed:kde-misc/networkmanagement

net-misc/cnetworkmanager

net-misc/networkmanageras support for KDE, CLI and XFCE4/LCDE envrionments respectively.

My thinking is that no matter which environment I'm in, I want to be able to change/test nic settings at need/will.

For CLI, I have tried 'cnetworkmanager' but I get error messages for some of the options. i.e. If I do:

```
# cnetworkmanager --we

True
```

that works fine.

If I try:

```
# cnetworkmanager --ap

Traceback (most recent call last):

  File "/usr/bin/cnetworkmanager", line 178, in <module>

    aap = dev["ActiveAccessPoint"]

  File "/usr/lib/python2.7/site-packages/dbusclient/__init__.py", line 174, in __getitem__

    value = super(DBusClient, self).__getitem__(key)

  File "/usr/lib/python2.7/site-packages/dbusclient/__init__.py", line 77, in __getitem__

    return pmi.Get(iface, key, byte_arrays=True)

  File "/usr/lib/python2.7/site-packages/dbus/proxies.py", line 70, in __call__

    return self._proxy_method(*args, **keywords)

  File "/usr/lib/python2.7/site-packages/dbus/proxies.py", line 145, in __call__

    **keywords)

  File "/usr/lib/python2.7/site-packages/dbus/connection.py", line 651, in call_blocking

    message, timeout)

dbus.exceptions.DBusException: org.freedesktop.DBus.Error.AccessDenied: Property "ActiveAccessPoint" of interface "org.freedesktop.NetworkManager.Device" isn't exported (or may not exist)
```

that doesn't work so well.

If I use an 'nm-applet' based version of Network Manager to set 'wlan0', 'wlan0' becomes the preferred route. I can't find anywhere how to set the metric so that 'eth0' goes back to being my preferred route. To get actual work done which involves anything from the over my lan, I reboot the netbook with the 'wlan0' nic powered off from the keyboard.

As for KDE - I either can't find the NetworkManagement tool even after installing it twice {for whatever reason} or I simply don't understand what I'm looking for/at.

I need to know all these options in order to assist others.

Examples for booting up 'wlan0' in a CLI would be great as well as instructions for setting the metric for preferred routing. Oh, and what I'm supposed to be looking for/doing in KDE. At least, that's what I _think_ I want to know. If there is something else I should know, please tell me or point me to it!

Thank you.

----------

## ppurka

 *dufeu wrote:*   

> 
> 
> I have each OS boot into CLI. This is because I'm researching different Windowing environments {I have need to support a number of visually impaired users}. Currently, it's not until I log into a GUI that NetworkManager {depending on WM} starts the 'wlan0' nic.
> 
> 

 Can't help you with the rest of the stuff. For getting nm to connect automatically, without need for a GUI, you need to make sure your connections are "system connections" or "available to all users". At least for the cases in which I used it, it means that just once you need to connect to the wireless access point, and then go into its settings in nm-connection-editor and set the option "available to all users".

----------

