Added missing icon images
Updated dbus config file to work under more distros Added support for determing wireless interface by parsing /proc/net/wireless (removing need for iwconfig call) A few minor formatting improvements.
@@ -161,7 +161,8 @@ def main (argv):
|
||||
dialog = wTree.get_widget("configure_script_dialog")
|
||||
wTree.get_widget("pre_label").set_label(language['before_script'] + ":")
|
||||
wTree.get_widget("post_label").set_label(language['after_script'] + ":")
|
||||
wTree.get_widget("disconnect_label").set_label(language['disconnect_script'] + ":")
|
||||
wTree.get_widget("disconnect_label").set_label(language['disconnect_script']
|
||||
+ ":")
|
||||
wTree.get_widget("window1").hide()
|
||||
|
||||
pre_entry = wTree.get_widget("pre_entry")
|
||||
|
||||
2
gui.py
@@ -182,7 +182,7 @@ language['running_dhcp'] = _('Obtaining IP address...')
|
||||
language['no_dhcp_offers'] = _('Connection Failed: No DHCP offers received. \
|
||||
Couldn\'t get an IP Address.')
|
||||
language['dhcp_failed'] = _('Connection Failed: Unable to Get IP Address')
|
||||
language['aborted'] = _('Connection cancelled')
|
||||
language['aborted'] = _('Connection Cancelled')
|
||||
language['bad_pass'] = _('Connection Failed: Bad password')
|
||||
language['done'] = _('Done connecting...')
|
||||
|
||||
|
||||
BIN
images/both-bad-signal-lock.png
Executable file
|
After Width: | Height: | Size: 1.1 KiB |
BIN
images/both-bad-signal.png
Executable file
|
After Width: | Height: | Size: 1.1 KiB |
BIN
images/both-good-signal-lock.png
Executable file
|
After Width: | Height: | Size: 1.1 KiB |
BIN
images/both-good-signal.png
Executable file
|
After Width: | Height: | Size: 1.1 KiB |
BIN
images/both-high-signal-lock.png
Executable file
|
After Width: | Height: | Size: 1.1 KiB |
BIN
images/both-high-signal.png
Executable file
|
After Width: | Height: | Size: 1.1 KiB |
BIN
images/both-low-signal-lock.png
Executable file
|
After Width: | Height: | Size: 1.1 KiB |
BIN
images/both-low-signal.png
Executable file
|
After Width: | Height: | Size: 1.1 KiB |
BIN
images/idle-bad-signal-lock.png
Executable file
|
After Width: | Height: | Size: 1.1 KiB |
BIN
images/idle-bad-signal.png
Executable file
|
After Width: | Height: | Size: 1.0 KiB |
BIN
images/idle-good-signal-lock.png
Executable file
|
After Width: | Height: | Size: 1.1 KiB |
BIN
images/idle-good-signal.png
Executable file
|
After Width: | Height: | Size: 1.1 KiB |
BIN
images/idle-high-signal-lock.png
Executable file
|
After Width: | Height: | Size: 1.1 KiB |
BIN
images/idle-high-signal.png
Executable file
|
After Width: | Height: | Size: 1.1 KiB |
BIN
images/idle-low-signal-lock.png
Executable file
|
After Width: | Height: | Size: 1.1 KiB |
BIN
images/idle-low-signal.png
Executable file
|
After Width: | Height: | Size: 1.1 KiB |
BIN
images/receiving-bad-signal-lock.png
Executable file
|
After Width: | Height: | Size: 1.1 KiB |
BIN
images/receiving-bad-signal.png
Executable file
|
After Width: | Height: | Size: 1.1 KiB |
BIN
images/receiving-good-signal-lock.png
Executable file
|
After Width: | Height: | Size: 1.1 KiB |
BIN
images/receiving-good-signal.png
Executable file
|
After Width: | Height: | Size: 1.1 KiB |
BIN
images/receiving-high-signal-lock.png
Executable file
|
After Width: | Height: | Size: 1.1 KiB |
BIN
images/receiving-high-signal.png
Executable file
|
After Width: | Height: | Size: 1.1 KiB |
BIN
images/receiving-low-signal-lock.png
Executable file
|
After Width: | Height: | Size: 1.1 KiB |
BIN
images/receiving-low-signal.png
Executable file
|
After Width: | Height: | Size: 1.1 KiB |
BIN
images/transmitting-bad-signal-lock.png
Executable file
|
After Width: | Height: | Size: 1.1 KiB |
BIN
images/transmitting-bad-signal.png
Executable file
|
After Width: | Height: | Size: 1.1 KiB |
BIN
images/transmitting-good-signal-lock.png
Executable file
|
After Width: | Height: | Size: 1.1 KiB |
BIN
images/transmitting-good-signal.png
Executable file
|
After Width: | Height: | Size: 1.1 KiB |
BIN
images/transmitting-high-signal-lock.png
Executable file
|
After Width: | Height: | Size: 1.1 KiB |
BIN
images/transmitting-high-signal.png
Executable file
|
After Width: | Height: | Size: 1.1 KiB |
BIN
images/transmitting-low-signal-lock.png
Executable file
|
After Width: | Height: | Size: 1.1 KiB |
BIN
images/transmitting-low-signal.png
Executable file
|
After Width: | Height: | Size: 1.1 KiB |
@@ -241,7 +241,7 @@ class ConnectionStatus():
|
||||
# If we just lost a wireless connection, try to connect to that
|
||||
# network again. Otherwise just call Autoconnect.
|
||||
cur_net_id = wireless.GetCurrentNetworkID(self.iwconfig)
|
||||
if from_wireless and cur_net_id > -1: # Needs to be a valid network
|
||||
if from_wireless and cur_net_id > -1:
|
||||
print 'Trying to reconnect to last used wireless ' + \
|
||||
'network'
|
||||
wireless.ConnectWireless(cur_net_id)
|
||||
|
||||
@@ -1,17 +1,19 @@
|
||||
<!-- This configuration file specifies the required security policies
|
||||
for connection-manager to work. -->
|
||||
|
||||
<!-- /etc/dbus-1/system.d/wicd.conf -->
|
||||
<!DOCTYPE busconfig PUBLIC "-//freedesktop//DTD D-BUS Bus Configuration 1.0//EN"
|
||||
"http://www.freedesktop.org/standards/dbus/1.0/busconfig.dtd">
|
||||
"http://www.freedesktop.org/standards/dbus/1.0/busconfig.dtd">
|
||||
<busconfig>
|
||||
|
||||
<!-- ../system.conf have denied everything, so we just punch some holes -->
|
||||
|
||||
<policy user="root">
|
||||
<allow own="org.wicd.daemon"/>
|
||||
<allow send_destination="org.wicd.daemon"/>
|
||||
<allow send_interface="org.wicd.daemon"/>
|
||||
</policy>
|
||||
<policy at_console="true">
|
||||
<allow send_destination="org.wicd.daemon"/>
|
||||
<allow send_interface="org.wicd.daemon"/>
|
||||
</policy>
|
||||
<policy context="default">
|
||||
<allow own="org.wicd.daemon"/>
|
||||
|
||||
<allow send_destination="org.wicd.daemon"/>
|
||||
<allow receive_sender="org.wicd.daemon"/>
|
||||
<allow send_interface="org.wicd.daemon"/>
|
||||
</policy>
|
||||
|
||||
</busconfig>
|
||||
|
||||
27
wnettools.py
@@ -105,13 +105,37 @@ def StopDHCP():
|
||||
def GetWirelessInterfaces():
|
||||
""" Get available wireless interfaces.
|
||||
|
||||
Attempts to get an interface first by parsing /proc/net/wireless,
|
||||
and should that fail, by parsing iwconfig.
|
||||
Returns:
|
||||
The first interface available.
|
||||
|
||||
"""
|
||||
iface = _fast_get_wifi_interfaces()
|
||||
if not iface:
|
||||
output = misc.Run('iwconfig')
|
||||
return misc.RunRegex(re.compile('(\w*)\s*\w*\s*[a-zA-Z0-9.-_]*\s*(?=ESSID)',
|
||||
iface = misc.RunRegex(re.compile('(\w*)\s*\w*\s*[a-zA-Z0-9.-_]*\s*(?=ESSID)',
|
||||
re.I | re.M | re.S), output)
|
||||
return iface
|
||||
|
||||
def _fast_get_wifi_interfaces():
|
||||
""" Tries to get a wireless interface by parsing /proc/net/wireless. """
|
||||
device = re.compile('[a-z]{3,4}[0-9]')
|
||||
ifnames = []
|
||||
|
||||
f = open('/proc/net/wireless', 'r')
|
||||
data = f.readlines()
|
||||
f.close()
|
||||
for line in data:
|
||||
try:
|
||||
ifnames.append(device.search(line).group())
|
||||
except AttributeError:
|
||||
pass
|
||||
|
||||
if ifnames:
|
||||
return ifnames[0]
|
||||
else:
|
||||
return None
|
||||
|
||||
class Interface(object):
|
||||
""" Control a network interface. """
|
||||
@@ -944,7 +968,6 @@ class WirelessInterface(Interface):
|
||||
cmd_list.append(key_name + '=' + network.get('key'))
|
||||
if info[5] == 'SHARED' and info[4] == 'WEP':
|
||||
cmd_list.append('DefaultKeyID=1')
|
||||
#TODO: Confirm whether this second SSID set is required.
|
||||
cmd_list.append('SSID=' + info[2])
|
||||
|
||||
for cmd in cmd_list:
|
||||
|
||||