From 7dff031ff6cd85ff1b77352b4d93d3bcee5705f3 Mon Sep 17 00:00:00 2001 From: gryf Date: Tue, 1 Sep 2020 08:52:41 +0200 Subject: [PATCH] Get rid of daemon path from config. Also, README update. --- README.rst | 28 +++++++++++++++++----------- wicd/config.py | 1 - wicd/wicd_daemon.py | 3 ++- 3 files changed, 19 insertions(+), 13 deletions(-) diff --git a/README.rst b/README.rst index 3ebf4be..7c7d6a4 100644 --- a/README.rst +++ b/README.rst @@ -27,23 +27,26 @@ Why are you doing this? My motivation is to make it usable again, and my effort concentrate on the daemon itself and curses TUI, as the most attractive parts of the project to me. -What's works: +What's done: -1. Installation. It was broken, but the fix was trivial. So now, the usual +1. Installation. It was broken, and was fixed. So now, the usual ``python setup.py install`` should just work. 2. TUI in ncurses. Actually, it's using `urwid`_ underneath. It still have some - issue, like crashing in some situations, just like wicd-1.7.4, but I have a - plan to take a close look at it. + issues, like crashing in certain situations, just like wicd-1.7.4. +3. Straight up installation process. Separation for runtime/build only paths + and options. Use configuration instead of templated ``wpath.py`` module. What is not: -1. GUI/client in GTK. WICD used to use `pygtk`_, which (unfortunately) is - Python 2 only project. I would be tempted to reimplement it with gobject, - but I have 0 motivation for doing so, because GTK2 is not supported through - it. -2. Applet for GNOME Shell. There was simple dispatcher for try icon used in - GNOME Shell, yet, it just use GUI. -3. Notification - it was used for GTK client. +1. GUI. Graphics interface was built using `pygtk`_, which is Python 2, and + dead project. +2. Applet for GNOME Shell. There was simple dispatcher for tray icon for the + GUI client in GNOME Shell, so since GUI client is unsupported in Python 3, I + have to dro pit aswell. +3. Notifications. `Notification library`_ was used for GTK client, and is + Python2 only. +4. `python-iwscan`_ and `python-wpactrl`_ are not supported, as they are + considered as dead projects. License @@ -58,3 +61,6 @@ the license attached as a ``LICENSE`` file in the root directory of the project. .. _been merged: https://github.com/zeph/wicd .. _urwid: http://urwid.org/ .. _pygtk: https://web.archive.org/web/20180416083422/http://www.pygtk.org +.. _Notification library: http://www.galago-project.org +.. _python-iwscan: https://web.archive.org/web/20080926094621/http://projects.otaku42.de/browser/python-iwscan +.. _python-wpactrl: https://web.archive.org/web/20100508185722/http://projects.otaku42.de/wiki/PythonWpaCtrl diff --git a/wicd/config.py b/wicd/config.py index e4234f2..3117e37 100644 --- a/wicd/config.py +++ b/wicd/config.py @@ -3,7 +3,6 @@ import os DEFAULTS = {'bin': '/usr/bin', - 'daemon': '/usr/share/wicd/daemon', 'encryption': '/etc/wicd/encryption-templates', 'etc': '/etc/wicd', 'log': '/var/log/wicd', diff --git a/wicd/wicd_daemon.py b/wicd/wicd_daemon.py index c74226b..9f5b215 100644 --- a/wicd/wicd_daemon.py +++ b/wicd/wicd_daemon.py @@ -1934,7 +1934,8 @@ def run(argv): child_pid = None if not no_poll: child_pid = Popen([CFG.python, "-O", - os.path.join(CFG.daemon, "monitor.py")], + os.path.join(os.path.dirname(__file__), + "monitor.py")], shell=False, close_fds=True).pid atexit.register(on_exit, child_pid)