Ubuntu – standalone graphical application for configuring Network Manager

guinetwork-managersoftware-recommendation

I was working through a kiosk computing question yesterday. Somebody is trying to deploy Ubuntu as a single-application appliance in a way that they can hand the machine to a client and it'll let them configure a network on first-boot but after that it'll boot into Firefox.

The booting into Firefox part is simple but configuring networks is somewhat harder. nmcli is an option but what if the people handling these machines doesn't understand it? I'd like a graphical method.

Also there's the problem that there might not be an installed underlying desktop environment. Assume this is an Ubuntu Server installed with X, Network Manager and Firefox but no Unity/Gnome/KDE or their various configuration applications.

Version 0.9.10 of Network Manager —with its lovely curses-based nmtui command-line app— didn't make it into 14.04… So that's off the cards. I'd prefer to avoid any command line interaction on this one because I'm frankly not sure if the deploying people have password access to the command line. They might only have an on-screen keyboard.

We need to tick the following boxes:

  • So simple your grandma could use it.
  • Graphical so we don't have to force somebody to log in via a TTY
  • Standalone so it doesn't need a desktop running in the background
  • Dependency-light so we don't need to install half a desktop to run it.

What applications are available and (if they're part of a desktop) how do you install them in the lightest possible way?

The original question isn't mine but I can test answers as I have a kiosk-style machine.

Best Answer

  • I've tested this with fresh Ubuntu server 14.04 installation on a VBox. Setup with:

    sudo apt-get update
    sudo apt-get upgrade
    sudo reboot
    sudo apt-get install xserver-xorg xinit xterm
    sudo apt-get --no-install-recommends install firefox
    sudo reboot
    sudo apt-get --no-install-recommends install network-manager
    sudo reboot
    
  • It does not seem that many packages as half desktop with --no-install-recommends?!

    sudo apt-get --no-install-recommends install network-manager-gnome

    The following NEW packages will be installed:
      dbus-x11 gconf-service gconf-service-backend gconf2-common gnome-icon-theme
      hicolor-icon-theme humanity-icon-theme libappindicator3-1 libatk-bridge2.0-0
      libatspi2.0-0 libcairo-gobject2 libcolord1 libcroco3 libdbusmenu-glib4
      libdbusmenu-gtk3-4 libgconf-2-4 libgnome-bluetooth11 libgnome-keyring-common
      libgnome-keyring0 libgtk-3-0 libgtk-3-bin libgtk-3-common libindicator3-7
      liblcms2-2 libnm-glib-vpn1 libnm-gtk-common libnm-gtk0 libnotify4 librsvg2-2
      librsvg2-common libsecret-1-0 libsecret-common libwayland-cursor0
      libxkbcommon0 network-manager-gnome policykit-1-gnome
    0 upgraded, 36 newly installed, 0 to remove and 3 not upgraded.
    Need to get 5,787 kB of archives.
    After this operation, 34.2 MB of additional disk space will be used.
    
  • If not, I don't think this is the best way. What if we remove non-needed features from network-manager-gnome package.

    --disable-migration to remove gconf dep
    --enable-introspection=no no need for gi lib
    --with-modem-manager-1=no, --without-bluetooth depending on the case
    --with-gtkver=2 to build it using gtk2 only as firefox no extra
    --enable-indicator=no, indicator is gtk3. didn't work for me, raise errors in building

    1. So on other machine/or Vbox, make the minimum build

      sudo apt-get install dpkg-dev
      sudo apt-get build-dep network-manager-gnome
      apt-get source network-manager-gnome
      cd network-manager-applet-0.9.8.8/
      ./configure --prefix=/opt/nm/ --disable-more-warnings --disable-migration --enable-introspection=no --with-modem-manager-1=no --with-gtkver=2 --without-bluetooth 
      make
      sudo make install
      cd /opt/nm/
      tar czf ~/Desktop/nm-custom.tgz .
      
    2. Extract it on target machine

      sudo mkdir /opt/nm
      cd /opt/nm
      sudo tar xvf ~/nm-custom.tgz
      
    3. Install missing dependencies

      sudo apt-get --no-install-recommends install libnm-glib-vpn1
      
    4. Test

      sudo /opt/nm/bin/nm-connection-editor
      
Related Question