Control: retitle -1 wired_connect_mode behavior doesn't match the wicd-manager-settings.conf(5) man page Control: tags -1 patch
On 2009-11-19 23:41:10 +0100, Vincent Lefevre wrote: > Note: in manager-settings.conf, I have "wired_connect_mode = 1", > in order not to connect automatically. [...] I wanted to see where the problem came from. In the wicd-manager-settings.conf(5) man page: wired_connect_mode = <0|1> 0 = connect to wired interface automatically 1 = do not connect to wired interface automatically which corresponds to what I expected, but in /usr/share/wicd/daemon/wicd-daemon.py, one has: def SetWiredAutoConnectMethod(self, method): """ Sets which method to use to autoconnect to wired networks. """ # 1 = default profile # 2 = show list # 3 = last used profile self.config.set("Settings", "wired_connect_mode", int(method), write=True) self.wired_connect_mode = int(method) self.wired_bus.connect_mode = int(method) This doesn't seem to be the same range of values! This is confirmed here: def GetWiredAutoConnectMethod(self): """ Returns the wired autoconnect method. """ return int(self.wired_connect_mode) [...] def _wired_autoconnect(self, fresh=True): """ Attempts to autoconnect to a wired network. """ wiredb = self.wired_bus if self.GetWiredAutoConnectMethod() == 3 and \ not self.GetNeedWiredProfileChooser(): # attempt to smartly connect to a wired network # by using various wireless networks detected # and by using plugged in USB devices print self.LastScan if self.GetWiredAutoConnectMethod() == 2 and \ not self.GetNeedWiredProfileChooser(): self.LaunchChooser() return True # Default Profile. elif self.GetWiredAutoConnectMethod() == 1: network = wiredb.GetDefaultWiredNetwork() if not network: print "Couldn't find a default wired connection," + \ " wired autoconnect failed." self.wireless_bus._wireless_autoconnect(fresh) return # Last-Used. else: network = wiredb.GetLastUsedWiredNetwork() if not network: print "no previous wired profile available, wired " + \ "autoconnect failed." self.wireless_bus._wireless_autoconnect(fresh) return Actually wired_connect_mode corresponds to the 3 radio buttons of "Wired automatic connection" in the preferences. So, I suppose that the real problem is wrong documentation, and the real solution to ignore the wired interface is to set wired_interface = None i.e. make sure that the "Wired interface" box in the preferences is blank. Assuming that this is a documentation bug, I've attached a patch. -- Vincent Lefèvre <vinc...@vinc17.net> - Web: <https://www.vinc17.net/> 100% accessible validated (X)HTML - Blog: <https://www.vinc17.net/blog/> Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)
--- a/in/man=wicd-manager-settings.conf.5.in 2014-12-21 20:40:46.000000000 +0100 +++ b/in/man=wicd-manager-settings.conf.5.in 2016-05-11 23:04:46.266698359 +0200 @@ -52,21 +52,23 @@ .br 3 = ktsuss .TP -.BI "wired_interface = " <interface_name> +.BI "wired_interface = " <interface_name|None> .TP .BI "always_show_wired_interface = " <True|False> .TP -.BI "wired_connect_mode = " <0|1> -0 = connect to wired interface automatically +.BI "wired_connect_mode = " <1|2|3> +1 = default profile .br -1 = do not connect to wired interface automatically +2 = show list +.br +3 = last used profile .TP .BI "prefer_wired = " <True|False> True = Switch to wired interface if a link is detected, even if already connected to wireless .br False = Do not switch to wired interface automatically .TP -.BI "wireless_interface = " <name_of_wireless_interface> +.BI "wireless_interface = " <name_of_wireless_interface|None> .TP .BI "wpa_driver = " <wext|madwifi|ndiswrapper|hostap|hermes|atmel|broadcom|ipw|ralink legacy|none> The default (and best supported) is wext. It should work properly in most cases.