Is it possible to use nmcli completely without nm-applet?

Since I don't use GNOME now and try wmii, the nm-applet is no longer available for me.I know there is nmcli for the control. What I'm really interested in is that can it really be a substitute for nm-applet.

man nmcli, there are these words, which makes me confused:

  1. It is not meant as a replacement of nm-applet or other similar clients.

    What does other similar clients mean?

  2. The use case comprise:

    • Servers, headless machines:No GUI is available; then nmcli is used to talk directly to NetworkManager and control only system-wide connections.

    • User sessions: For this case, nmcli can talk to nm-applet to find user connections.It can still talk directly to NetworkManager for manipulating these connections. As nmcli doesn't have direct access to user configuration data in GConf, nm-applet handles that itself. That may, for example, cause the applet to pop up keyring dialogs when secrets are needed.

    As nmcli can work directly without X, Why can't it work as well when secrets are needed?

PS. Is there any alternate easy approach to control connections using command line?


Solution 1:

First of all let me say that nm-applet can be used in environments other than Gnome: I used it successfully in awesome and in openbox.

nmcli do not provide the same functionalities of nm-applet, e.g. you cannot configure new connections.

A valid alternative to connect to wired or wireless networks from command line is wicd-curses.

Solution 2:

similar clients mean applications that do similar things as nm-applet, but isn't nm-applet. Since Network Manager is driven by DBus, anyone is free to write clients to control it without interacting with Network Managers code in any way. It's sort of like how you can connect to a web server with different browsers without changing the server.

Headless servers doesn't need secrets the same way a laptop does.

I don't think the manpage says you can't use secrets. It says that if you have nm-applet installed, then it can be reused to provide per-user network configurations and personal passwords. If it isn't available, then I assume you would have to provide the secrets yourself.

I don't normally use Network Manager from the command line. But it uses DBus, so it would be relatively easy to write a curses-application for it, or something. Or you could just use dbus-end manually, but that might not be pleasant.