wicd移植

 

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

Code
>>>>>> sys.path  
[
'D:\\Python25\\Lib\\idlelib''C:\\WINDOWS\\system32\\python25.zip''D:\\Python25\\DLLs''D:\\Python25\\lib''D:\\Python25\\lib\\plat-win''D:\\Python25\\lib\\lib-tk''D:\\Python25''D:\\Python25\\lib\\site-packages']  
>>>>>> sys.path.append("e:\\Users\\py")  
>>>>>> sys.path  
[
'D:\\Python25\\Lib\\idlelib''C:\\WINDOWS\\system32\\python25.zip''D:\\Python25\\DLLs''D:\\Python25\\lib''D:\\Python25\\lib\\plat-win''D:\\Python25\\lib\\lib-tk''D:\\Python25''D:\\Python25\\lib\\site-packages''e:\\Users\\py']  

 

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  50 in   < module >
    import wicd.gui 
as  gui
  File 
" /usr/lib/python2.5/site-packages/wicd/gui.py " , line  2005 in   < module >
    setup_dbus()
  File 
" /usr/lib/python2.5/site-packages/wicd/gui.py " , line  177 in  setup_dbus
    proxy_obj 
=  bus.get_object( " org.wicd.daemon " ' /org/wicd/daemon ' )
  File 
" /var/lib/python-support/python2.5/dbus/bus.py " , line  244 in  get_object
    follow_name_owner_changes
= follow_name_owner_changes)
  File 
" /var/lib/python-support/python2.5/dbus/proxies.py " , line  241 in  __init__
    self._named_service 
=  conn.activate_name_owner(bus_name)
  File 
" /var/lib/python-support/python2.5/dbus/bus.py " , line  183 in  activate_name_owner
    self.start_service_by_name(bus_name)
  File 
" /var/lib/python-support/python2.5/dbus/bus.py " , line  281 in  start_service_by_name
    
' su ' , (bus_name, flags)))
  File 
" /var/lib/python-support/python2.5/dbus/connection.py " , line  607 in  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).

转载于:https://www.cnblogs.com/wangtianxj/archive/2009/05/20/1470706.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值