From f662e62442390e51da6e17bc2fd1176d5ec6d7ab Mon Sep 17 00:00:00 2001 From: imdano <> Date: Sat, 15 Mar 2008 00:25:59 +0000 Subject: [PATCH] Added README and INSTALL files. Added a setup.py script. Added the new init and suspend scripts to a folder called other, which also holds all files which don't currently go in the /opt/wicd folders. These are used by the setup.py script and put into their respective directories. --- INSTALL | 14 ++++++ MANIFEST.in | 6 +++ README | 59 ++++++++++++++++++++++++ setup.cfg | 4 ++ setup.py | 130 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 5 files changed, 213 insertions(+) create mode 100644 INSTALL create mode 100644 MANIFEST.in create mode 100644 README create mode 100644 setup.cfg create mode 100755 setup.py diff --git a/INSTALL b/INSTALL new file mode 100644 index 0000000..ddec942 --- /dev/null +++ b/INSTALL @@ -0,0 +1,14 @@ +To install, just run: +sudo python setup.py install + +For now almost all the files and directories are dumped to /opt/wicd, though +it's possible for the user to specify a different directory by editting two files; +setup.cfg, and wpath.py. Simply change all mentions of /opt/wicd in those files +to the directory of your choice. + +It should also be noted that wicd also installs some files elsewhere, namely +init.d and suspend.d scripts, dbus configuration files, and pixmaps. Exactly +what gets put where can be viewed by opening up and reading setup.py. + +In the (near) future, all the files will not all be put in one directory, and will +instead follow linux standards for directory structure. diff --git a/MANIFEST.in b/MANIFEST.in new file mode 100644 index 0000000..77fabca --- /dev/null +++ b/MANIFEST.in @@ -0,0 +1,6 @@ +include data/wicd.glade +include data/wicd.png +recursive-include other * +recursive-include encryption * +recursive-include images * +recursive-include translations * diff --git a/README b/README new file mode 100644 index 0000000..5172e6e --- /dev/null +++ b/README @@ -0,0 +1,59 @@ +THEORY OF OPERATION: + +Wicd is designed to give the user as much control over the behavior of network connections +as possible. Every network, both wired and wireless, has it's own profile, with it's own +configuration options and connection behavior. Wicd will try to automatically connect +only to the networks the user specifies it should try, with a preference first to a wired +network, then to wireless. + +For wired connections, users have several options for determining what network settings to +use. Wicd allows creation of an unlimited amount of wired profiles, which each have +their own unique settings. The user can choose to automatically connect to a selected +default profile, choose a profile from a pop-up window every time wicd connects, or +have wicd automatically choose the last profile used to manually connect. + +For wireless networks, users can select any number of wireless networks to automatically +connect to, from which wicd will choose the one with the highest signal strength to try +to connect. + +If the user chooses, wicd will try to automatically reconnect when wicd detects a +connection is lost. If the last known connection state is wired, wicd will try +to first reconnect to the wired network, and if it is not available, will try +any available wireless networks with automatic connection enabled. If the last +known connection state is wireless, wicd will first try to reconnect to the +last network it was connected to (even if it not set to automatically connect +to that network normally), and should that fail will try both a wired connection +and any available wireless networks set to automatically connect. + +Wicd uses built-in linux wireless-tools, such as ifconfig and iwconfig, to +get and configure network info. There is some flexibility in its use of DHCP, +providing support for dhclient, dhcpcd, and pump. Wicd uses wpa_supplicant +to handle all wireless encryption settings, and uses a template-based system +to create the configuration files wpa_supplicant uses. These templates can +be editted and new templates can be created and imported into wicd by the user, +allowing connection to networks with uncommon encryption settings. + + + +STRUCTURE: + +There are two major parts to wicd; the daemon, which runs at the root level, and the +user-interface, which runs at the user level. The two parts run as separate processes, +and make use of D-Bus to communicate. + +The daemon is responsible for making and configuring connections, reading/writing +configuration files and logs, and monitoring the connection status. The daemon's job +is split between two processes, daemon.py and monitor.py. All the connection status +monitoring, as well as the auto-reconnection logic, takes place in monitor.py. +Everthing else is done by daemon.py. + +The user-interface, made up of a tray icon, main GUI window, and its child dialogs, +gets configuration and network information from the daemon by either querying it, using +the methods in the daemon's dbus interface, or by receiving signals emitted from the daemon +over D-Bus. Any configuration changes made in the UI are passed back to the daemon, which +actually applies the changes and writes them to configuration files. + +Since the GUI just queries for connection and configuration information from the daemon +it is possible to run wicd without the GUI at all. Additionally, the daemon is started by +wicd's init script as soon as Linux loads, and before any user logs in, making it possible to +use with "headless" machines. diff --git a/setup.cfg b/setup.cfg new file mode 100644 index 0000000..0208394 --- /dev/null +++ b/setup.cfg @@ -0,0 +1,4 @@ +[install] +install_lib=/opt/wicd +install_scripts=/opt/wicd +install_data=/opt/wicd diff --git a/setup.py b/setup.py new file mode 100755 index 0000000..1e27a79 --- /dev/null +++ b/setup.py @@ -0,0 +1,130 @@ +# +# Copyright (C) 2007 Adam Blackburn +# Copyright (C) 2007 Dan O'Reilly +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License Version 2 as +# published by the Free Software Foundation. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# + +from distutils.core import setup + +setup(name="Wicd", + version="1.5.0", + description="A wireless and wired network manager", + long_description="""A complete network connection manager +Wicd supports wired and wireless networks, and capable of +creating and tracking profiles for both. It has a +template-based wireless encryption system, which allows the user +to easily add encryption methods used. It ships with some common +encryption types, such as WPA and WEP. Wicd will automatically +connect at startup to any preferred network within range. +""", + author="Adam Blackburn, Dan O'Reilly", + author_email="compwiz18@users.sourceforge.net, imdano@users.sourceforge.net", + url="http://wicd.net", + license="http://www.gnu.org/licenses/old-licenses/gpl-2.0.html", + scripts=['configscript.py', 'autoconnect.py', 'gui.py', 'wicd.py', 'daemon.py', 'suspend.py', 'monitor.py'], + py_modules=['networking', 'misc', 'wnettools', 'wpath'], + data_files=[ + ('/etc/init.d', ['other/wicd']), + ('/etc/acpi/resume.d', ['other/80-wicd-connect.sh']), + ('/etc/dbus-1/system.d', ['other/wicd.conf']), + ('/etc/acpi/suspend.d', ['other/50-wicd-suspend.sh']), + ('/usr/share/applications', ['other/hammer-00186ddbac.desktop']), + ('', ['launchdaemon.sh']), + ('/usr/share/pixmaps', ['other/wicd.png']), + ('images', ['images/good-signal.png']), + ('images', ['images/low-signal.png']), + ('images', ['images/no-signal.png']), + ('images', ['images/good-signal-lock.png']), + ('images', ['images/wired.png']), + ('images', ['images/wicd-purple.png']), + ('images', ['images/signal-25.png']), + ('images', ['images/signal-50.png']), + ('images', ['images/wicd-green.png']), + ('images', ['images/signal-100.png']), + ('images', ['images/wicd.png']), + ('images', ['images/low-signal-lock.png']), + ('images', ['images/wicd-blue.png']), + ('images', ['images/bad-signal.png']), + ('images', ['images/bad-signal-lock.png']), + ('images', ['images/wicd-orange.png']), + ('images', ['images/signal-75.png']), + ('images', ['images/high-signal.png']), + ('images', ['images/wicd-red.png']), + ('images', ['images/high-signal-lock.png']), + ('encryption/templates', ['encryption/templates/peap']), + ('encryption/templates', ['encryption/templates/wep-hex']), + ('encryption/templates', ['encryption/templates/wpa']), + ('encryption/templates', ['encryption/templates/wep-passphrase']), + ('encryption/templates', ['encryption/templates/wep-shared']), + ('encryption/templates', ['encryption/templates/ttls']), + ('encryption/templates', ['encryption/templates/leap']), + ('encryption/templates', ['encryption/templates/peap-tkip']), + ('encryption/templates', ['encryption/templates/eap']), + ('encryption/templates', ['encryption/templates/active']), + ('data', ['data/wicd.png']), + ('data', ['data/wicd.glade']), + ('translations', ['translations/wicd.pot']), + ('translations', ['translations/ids']), + ('translations/de_DE/LC_MESSAGES', ['translations/de_DE/LC_MESSAGES/wicd.mo']), + ('translations/zh_HK/LC_MESSAGES', ['translations/zh_HK/LC_MESSAGES/wicd.mo']), + ('translations/fr_FR/LC_MESSAGES', ['translations/fr_FR/LC_MESSAGES/wicd.mo']), + ('translations/ca_ES/LC_MESSAGES', ['translations/ca_ES/LC_MESSAGES/wicd.mo']), + ('translations/ko_KR/LC_MESSAGES', ['translations/ko_KR/LC_MESSAGES/wicd.mo']), + ('translations/gl_GL/LC_MESSAGES', ['translations/gl_GL/LC_MESSAGES/wicd.mo']), + ('translations/no_NO/LC_MESSAGES', ['translations/no_NO/LC_MESSAGES/wicd.mo']), + ('translations/bg_PHO/LC_MESSAGES', ['translations/bg_PHO/LC_MESSAGES/wicd.mo']), + ('translations/po', ['translations/po/bg_PHO.po']), + ('translations/po', ['translations/po/ja_JA.po']), + ('translations/po', ['translations/po/de_DE.po']), + ('translations/po', ['translations/po/zh_CN.po']), + ('translations/po', ['translations/po/fr_FR.po']), + ('translations/po', ['translations/po/ar_EG.po']), + ('translations/po', ['translations/po/it_IT.po']), + ('translations/po', ['translations/po/fi_FI.po']), + ('translations/po', ['translations/po/sl_SI.po']), + ('translations/po', ['translations/po/es_ES.po']), + ('translations/po', ['translations/po/da_DK.po']), + ('translations/po', ['translations/po/sv_SE.po']), + ('translations/po', ['translations/po/ca_ES.po']), + ('translations/po', ['translations/po/nl_NL.po']), + ('translations/po', ['translations/po/no_NO.po']), + ('translations/po', ['translations/po/gl_GL.po']), + ('translations/po', ['translations/po/pl_PL.po']), + ('translations/po', ['translations/po/ru_RU.po']), + ('translations/po', ['translations/po/en_US.po']), + ('translations/po', ['translations/po/pt_BR.po']), + ('translations/po', ['translations/po/cs_CZ.po']), + ('translations/po', ['translations/po/tr_TR.po']), + ('translations/po', ['translations/po/zh_HK.po']), + ('translations/po', ['translations/po/hu_HU.po']), + ('translations/po', ['translations/po/ko_KR.po']), + ('translations/sl_SI/LC_MESSAGES', ['translations/sl_SI/LC_MESSAGES/wicd.mo']), + ('translations/da_DK/LC_MESSAGES', ['translations/da_DK/LC_MESSAGES/wicd.mo']), + ('translations/ja_JA/LC_MESSAGES', ['translations/ja_JA/LC_MESSAGES/wicd.mo']), + ('translations/zh_CN/LC_MESSAGES', ['translations/zh_CN/LC_MESSAGES/wicd.mo']), + ('translations/ru_RU/LC_MESSAGES', ['translations/ru_RU/LC_MESSAGES/wicd.mo']), + ('translations/it_IT/LC_MESSAGES', ['translations/it_IT/LC_MESSAGES/wicd.mo']), + ('translations/es_ES/LC_MESSAGES', ['translations/es_ES/LC_MESSAGES/wicd.mo']), + ('translations/pt_BR/LC_MESSAGES', ['translations/pt_BR/LC_MESSAGES/wicd.mo']), + ('translations/cs_CZ/LC_MESSAGES', ['translations/cs_CZ/LC_MESSAGES/wicd.mo']), + ('translations/sv_SE/LC_MESSAGES', ['translations/sv_SE/LC_MESSAGES/wicd.mo']), + ('translations/ar_EG/LC_MESSAGES', ['translations/ar_EG/LC_MESSAGES/wicd.mo']), + ('translations/tr_TR/LC_MESSAGES', ['translations/tr_TR/LC_MESSAGES/wicd.mo']), + ('translations/en_US/LC_MESSAGES', ['translations/en_US/LC_MESSAGES/wicd.mo']), + ('translations/fi_FI/LC_MESSAGES', ['translations/fi_FI/LC_MESSAGES/wicd.mo']), + ('translations/pl_PL/LC_MESSAGES', ['translations/pl_PL/LC_MESSAGES/wicd.mo']), + ('translations/hu_HU/LC_MESSAGES', ['translations/hu_HU/LC_MESSAGES/wicd.mo']), + ('translations/nl_NL/LC_MESSAGES', ['translations/nl_NL/LC_MESSAGES/wicd.mo']) + ] + )