GNOME Bugzilla – Bug 153427
gnome-netstatus lacks method to bring interface up/down
Last modified: 2011-07-10 02:28:05 UTC
The modemlights applet has a button which allows the user to configure the interface up or down. This would be a useful feature for the netstatus applet too.
On Solaris this can be done by ordinary users using RBAC. Users who have been given the 'Network Managment' profile can run ifconfig privileged. To take advantage of this gnome-netstatus-applet would need to exec ifconfig like this: exec("/usr/bin/pfexec", "ifconfig", interface, action); Where action is one of "up", "down", "plumb", "unplumb". Note that unlike sudo(1m) pfexec(1) never prompts the user and doesn't care what stdin/stdout are set to.
It can be done under many Linux distributions too -- if the interface itself is configured to allow user control, then any user can 'ifup bnep0' or 'ifdown bnep0'. The existing modemlights applet supports this already -- it can run an arbitrary command so it can do the right thing on either Solaris or Linux. I use that facility a lot, which is why I consider its absence a serious lack in any new network status applet.
The way I would implement it really is well, I guess pretty much the way Apple did it. When using the right mouse button on the applet, it shows a list of profiles the user can select. These profiles are the ones shown in system-config-network on Fedora (no idea what this tool is called in the Gnome branches), but only those that apply to the device set in the preferences of this applet. Each of these profiles have a little space in front of them, perhaps a radiobutton. The active profile can have this radiobutton checked, or a little v (found in checkboxes) in front of them, or any way to make clear what the active profile is. Below all these then should be placed a disable device option. Enabling goes by selecting one of these profiles, so just checking disabled instead of changing this option to enabled should be clear enough. And a request from my side (not partiularly nessecary, but would be useful): add a re-enable option aswell to this menu, which is kinda useful with bcm43xx and lots of connection drops. Too bad I'm not much of a programmer, else i'd implement it myself :+ . Comments on this thought?
gnome-netstatus development has been stalled [1]. Maintainers don't have future development plan so i am closing the bugs as WONTFIX. [1] http://mail.gnome.org/archives/desktop-devel-list/2011-June/msg00073.html