Can I use NetworkManager without a tray/dock/bar?

I would like to use NetworkManager, but prefer a keyboard driven window manager that provides as much space on the screen as possible for my code. I just hate that little strip of real estate "trays" take up on my screen. I have tried running nm-* from the command line, but they seam to never work without a tray.


Solution 1:

If you're running on Ubuntu Maverick (and thus have network-manager 0.8.1), try the nmcli tool:

$ nmcli

Usage: nmcli [OPTIONS] OBJECT { COMMAND | help }

OPTIONS
  -t[erse]                                   terse output
  -p[retty]                                  pretty output
  -m[ode] tabular|multiline                  output mode
  -f[ields] <field1,field2,...>|all|common   specify fields to output
  -e[scape] yes|no                           escape columns separators in values
  -v[ersion]                                 show program version
  -h[elp]                                    print this help

OBJECT
  nm          NetworkManager status
  con         NetworkManager connections
  dev         devices managed by NetworkManager

As above, it's just one file, and comes with NM 0.8.1.

Solution 2:

From wikipedia...

NetworkManager has two components:

  • a service which manages connections and reports network changes

  • a graphical desktop applet which allows the user to manipulate network connections. The nmcli applet provides similar functionality on the command line.

In fact, there are multiple tools available for replacing those nasty GUI dependent applets. The two I am aware of are cnetworkmanager and network-manager-cli.

Neither of them are currently packaged in Ubuntu, nore are they perticularly stable. network-manager-cli looks more mature, but neither has seen any development for a while.

network-manager-cli has the added advantage of being single-file. Just plop it in your bin and you're off to the races.

According to joao-pinto's answer, NetworkManager 8.01 includes command line interfacec. As of this moment, 8.01 doesn't ship with Ubuntu, so you'll have to grab it from Trunk. Of course, soon enough, this whole woe will be deprecated and nobody will be complaining about anything.

Solution 3:

According to http://live.gnome.org/NetworkManager/ReleaseProcess, version 0.8.1 provides a command line interface.

You can get it from https://launchpad.net/~network-manager/+archive/trunk, please note that I don't use it. I have no idea about it's stability.

In case of problems you can use the ppa-purge utility to get back to the official package.

Solution 4:

If you're willing to consider other network management applications besides Network Manager, you can install wicd, which has both an ncurses console interface as well as a regular graphical window interface (not a tray icon).

Before you install it, though, make sure you know how to revert to Network Manager (or manual networking), because installing wicd will remove Network Manager and vice versa.