Network manager is in fact a (local) server, that acts on requests of a (local) client. This client is normaly the network applet in a desktop and thus of course belongs to a GUI session.
Small explain
-----------------------------------------------------------------------------------------------------------------------------
| run level | name | Description |
-----------------------------------------------------------------------------------------------------------------------------
| 2 | Multi-User Mode | Does not configure network interfaces and does not export networks services |
| 3 | Multi-User Mode with Networking | Starts the system normally |
| 4 | Not used / user definable | For special purposes |
| 5 | System normally with GUI | Run level 3 + display manager |
-----------------------------------------------------------------------------------------------------------------------------
Propose for you is to disable Network Manager and configure interfaces manually.
Stop the Network Manager process
sudo service network-manager stop
Disable it
echo "manual" | sudo tee /etc/init/network-manager.override
or you can remove NetworkManager from the system
sudo apt-get purge network-manager
Then you need to manually set network
Edit /etc/network/interfaces
and write ip
,netmask
...
auto eth0
iface eth0 inet static
address xxx.xxx.x.xx
gateway xxx.xxx.x.x
netmask xxx.xxx.xxx.x
network xxx.xxx.x.x
broadcast xxx.xxx.x.xxx
After entering all the details you need to restart networking services using the following command
sudo /etc/init.d/networking restart
Setting up DNS
Edit /etc/resolv.conf
sudo nano /etc/resolv.conf
write
nameserver dns_server_ip
nameserver dns2_server_ip
After this step, your network will be configured without NM and will be work on run level 3 and 5.
Edit 1
You can start any app when login into GUI
automatically if you put a .desktop file in ~/.config/autostart to run applications after a user login. This may have following content:
nano ~/.config/autostart/nm.desktop
[Desktop Entry]
Type=Application
Name=<Name of application as displayed>
Exec=<command to execute>
Icon=<full path to icon>
Comment=<optinal comments>
X-GNOME-Autostart-enabled=true
init 2
, and my question is how i start NetworkManger automatically not remove it – Fat Mind May 21 '15 at 17:08This client is normaly the network applet in a desktop and thus of course belongs to a GUI session
Wait, what about booting to command line ? If NetworkManager starts with GUI login, why then it works when booting to tty ?nmcli
? There's also dmesg entries for NetworkManager when system boots – Sergiy Kolodyazhnyy May 22 '15 at 07:05