Topic: How to: Connect via static IP on wired LANs with network-manager-gnome

For the longest time I couldn't figure out how to connect to a static IP in my Cisco labs without uninstalling network manager and installing wicd. I couldn't even attempt to connect to a staticly configured connection in network manager, it was greyed out. But since wicd has problems with wireless authentication, I would have to switch back to network manager to connect to encrypted wifi networks. Then I finally figured it out: there is a config file in network manager for both your personal user account and the root account, and the root user's connections are set to automatically connect. The solution:

Open up a terminal and type

sudo nm-connection-editor

Change the name of the default wired connection, usually this will be "Auto Eth0" or "Auto Ethernet." Remember what the name was because you will use it in the next step. Edit the connection and uncheck the boxes next to "connect automatically" and "available to all users." Apply the settings. Then make a new connection with the same name as the one you just changed the name of. Uncheck the two boxes again and apply the settings. Close the root network manager configuration window. Run nm-connection editor as your non-root user (you can just right click the system tray icon and go to "edit connections") Uncheck the two boxes in the settings for your default connection here too and apply the settings. Create a new connection (I called mine "static".) Configure your static ip, netmask, and gateway, apply the settings, and you should be good to go! (I was connecting to an intranet in the lab so I didn't require any DNS settings.)

Re: How to: Connect via static IP on wired LANs with network-manager-gnome

Thanks Dear ~ But It's not need to open terminal and typing that just right click netwrok manager you will got it ~

#!/usr/bin/CrunchBang Linux >> ~ ~ I Love CrunchBanG ~~

Re: How to: Connect via static IP on wired LANs with network-manager-gnome

D3v1l_Bang the step with the terminal is actually necessary in order to run network-manager as root so the changes will be permanent. I don't know if they got it fixed in the recent updates but in the past I had to move to wicd, because I couldn't set a static IP with normal user nm-applet.

Last edited by slapfish (2011-05-30 12:38:03)

Re: How to: Connect via static IP on wired LANs with network-manager-gnome

slapfish wrote:

D3v1l_Bang the step with the terminal is actually necessary in order to run network-manager as root so the changes will be permanent. I don't know if they got it fixed in the recent updates but in the past I had to move to wicd, because I couldn't set a static IP with normal user nm-applet.

It's not that it needs to be run as root for some type of permanency, it has a connection created by default for the user "root" that is set to automatically connect. This will cause your statically configured connections to be greyed out and not even give you the option of connecting to them. You'll notice that any static connections you created by right clicking on the icon in the tray won't be present when you run nm-connection-editor as root.

Re: How to: Connect via static IP on wired LANs with network-manager-gnome

You are right on the "why" we need the root nm-connection-editor (It's been a while since I had to do that), but if you check the "available to all" check-button you'll get them to the normal user nm-applet, with auto-connection. The same applies to the wireless connections.