现在的位置: 首页 > 综合 > 正文

wicd移植

2012年01月21日 ⁄ 综合 ⁄ 共 4194字 ⁄ 字号 评论关闭

 

Python 通过 PYTHONPATH 环境变量来查找 module,我们可以使用 sys.path 来查看或添加新的路径

Code

 

python -c "import sys; print sys.path"

 and see if /usr/lib/python2.5/site-packages is in that list. If it's not, that's the problem.

PYTHONPATH=$PYTHONPATH:/usr/lib/python2.5/site-packages wicd

修改 /etc/rc.conf
INTERFACES=(!eth0 !eth1)

.............

DAEMONS=(syslog-ng !network hal wicd netfs crond slim alsa laptop-mode)
重新启动后就可以在任务栏中直接选择要连接的无线网络了
PYTHONPATH=$PYTHONPATH:/usr/lib/python2.5/site-packages wicd-client -n
/etc/rc.d/dbus stop # we are stopping manually instead of restarting to eliminate possible errors

/etc/rc.d/wicd stop

/etc/rc.d/dbus start

/etc/rc.d/wicd start

 

 

/usr/bin # ./wicd-client
python[
869]: GLIB WARNING ** Gtk - Locale not supported by C library.
\0x09Using the fallback 
'C' locale.
matchbox
-keyboard-remote.c:34,mb_kbd_remote_process_xevents() got a message

Traceback (most recent call last):
  File "/usr/lib/wicd/wicd-client.py", line 50in <module>
    import wicd.gui 
as gui
  File 
"/usr/lib/python2.5/site-packages/wicd/gui.py", line 2005in <module>
    setup_dbus()
  File 
"/usr/lib/python2.5/site-packages/wicd/gui.py", line 177in setup_dbus
    proxy_obj 
= bus.get_object("org.wicd.daemon"'/org/wicd/daemon')
  File 
"/var/lib/python-support/python2.5/dbus/bus.py", line 244in get_object
    follow_name_owner_changes
=follow_name_owner_changes)
  File 
"/var/lib/python-support/python2.5/dbus/proxies.py", line 241in __init__
    self._named_service 
= conn.activate_name_owner(bus_name)
  File 
"/var/lib/python-support/python2.5/dbus/bus.py", line 183in activate_name_owner
    self.start_service_by_name(bus_name)
  File 
"/var/lib/python-support/python2.5/dbus/bus.py", line 281in start_service_by_name
    
'su', (bus_name, flags)))
  File 
"/var/lib/python-support/python2.5/dbus/connection.py", line 607in call_blocking
    message, timeout)
dbus.exceptions.DBusException: org.freedesktop.DBus.Error.ServiceUnknown: The name org.wicd.daemon was not provided by any .service files
matchbox
-keyboard-remote.c:34,mb_kbd_remote_process_xevents() got a message

 

Installation of Wicd should be done using your distribution package if one

exists.  If not, the installation is relatively straightforward.

If you are installing from a subversion pull or beta/rc tarball and you want
the native language translations, first run this:
  python setup.py get_translations
You will not need to do this if you're installing from a release tarball.

Next, configure Wicd for installation.  Wicd will, by default, follow the
FHS guidelines <http://www.pathname.com/fhs/> (or distribution standards
where applicable if we know about them and it's feasible to implement them).
You can specify exactly where every non-Python file (and some Python files)
in Wicd will be placed.  Pass "--help" as an option to the following command
for more information, otherwise run it as is to configure Wicd for installation.
  python setup.py configure

Finally, do the actual installation.  This step will need to be done as
root or with sudo in most cases:
  python setup.py install
If you are packaging Wicd, you will almost surely want to use the "--root"
option; for example:
  python setup.py install --root=/package-dir

To uninstall, you can use (using root or sudo):
  python setup.py uninstall

You *MUST* run "python setup.py configure" before "python setup.py install" -
the "configure" step generates wpath.py from wpath.py.in using the paths
specified from the arguments to "python setup.py configure".
As noted above in the configure step, "python setup.py configure" will use
acceptable defaults, so it is usually not necessary to specify any arguments
at all.

After installation, especially if Wicd has not been installed before, you
will probably need to restart the system message bus (dbus) or reload its
configuration.  You will also need to make sure the Wicd init script is
started at boot.  How to do those things is distribution-dependent, so if
you're not sure, ask in your distribution's support area(s).

抱歉!评论已关闭.