Wicd (简体中文)
From ArchWiki
i18n |
---|
English |
简体中文 |
Italiano |
Türkçe |
Contents |
Introduction简介
Wicd是一个既能管理有线网络又能管理无线网络(如Wifi Radar)的网络接入管理器,和NetworkManager功能相似并且相互冲突。Wicd是用Python和GTK+写成的。wicd位于extra软件仓库中。
Installation安装
一般的安装
Wicd在[extra](默认已打开)软件仓库中。使用下面命令安装:
# pacman -S wicd
这即可自动安装相关的依赖,包括dbus, python 和 gtk2
你可能还需要DHCP, 无线安全管理程序, 以及图形界面图标,可通过下面命令安装:
# pacman -S dhclient wpa_supplicant hicolor-icon-theme
其他软件包安装(如果有需要)
如果你要完全定制安装,可使用 ABS。
示例:最新版本ABS安装
注意: 也许下面不能工作 如果包装过程包含一个补丁 (you can use part of the PKGBUILD from AUR or DIY entirely)
如果你想取得最新的版本为了能更好的工作, 那么编辑 $pkgver 在PKGBUILD. 也许你同时需要编辑 $pkgrel (改变它到 1) 和 $md5sums.
# abs $ cd /var/abs/local $ cp -r ../extra/network/wicd . $ nano PKGBUILD
然后运行
$ makepkg
如果一切运行顺利, 然后运行.
# pacman -U *pkg.tar.gz
使用wicd管理网络连接
守护进程daemon
使用多种网络管理工具容易产生各种问题,因此,请只用一种网络管理工具来管理网络连接。 所以,在使用wicd前,必须先关闭其他网络管理工具。
1、使用以下命令手动关闭network、dhcdbd和networkmanager这些守护程序。
# /etc/rc.d/network stop # /etc/rc.d/dhcdbd stop # /etc/rc.d/networkmanager stop
2、以root身份编辑/etc/rc.conf,注释掉(或者直接删除)相关的网络设置。(!network,之前加一个!就可以不加载了。)
A、在INTERFACES的参数前加一个(!) ,禁止使用,如下:
INTERFACES=(!eth0 !wlan0) #这里的lo不再需要了,因为其是由 /etc/rc.sysinit启动的。
B、禁止使用的各种网络管理守护进程,包括network, dhcdbd, 和 networkmanager:
DAEMONS=(syslog-ng @alsa !network dbus !dhcdbd !networkmanager wicd netfs ...)
C、添加守护进程dbus 和wicd 到DAEMONS中,使得守护进程参数列表看起来像这样:
DAEMONS=(syslog-ng dbus !network !dhcdbd !networkmanager wicd ...)
Note: 如果你使用了 hal,把 dbus 替换成hal,守护进程hal会自动启动 dbus 。
D、使用如下命令把你帐号加入到network组中,把$USERNAME替换成你自己帐号名称。
gpasswd -a $USERNAME network
E、最后,启动守护进程 dbus 和wicd :
# /etc/rc.d/dbus start # /etc/rc.d/wicd start
Note: 如果守护进程dbus已经启动,需要重新启动它:
# /etc/rc.d/dbus restart
启动并使用wicd图形管理工具
方法有两种,一种是命令行启动,一种是图形界面启动。图形界面只需要鼠标点击,下面介绍命令行启动,都不需要root权限。 命令行输入:
$ wicd-client
如果你不需要wicd出现在通知区,使用下面命令:
$ wicd-client -n
你也可以把wicd-client添加到你所使用的DE/WM 自启动列表中,这样每次登录就能自动启动图形管理界面。 Note that Wicd doesn't prompt you for a passkey. To use encrypted connections (WPA/WEP), expand the network you want to connect to, click 'Advanced', and enter the relevant info.
常见问题解决方法
D-BUS
如果dbus这个守护程序已经运行了,但是某些原因下wicd还是提示说dbus有问题,那么你就先关闭dbus和wicd,然后再启动dbus和wicd。
# /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
GUI 图形界面
如果在你点击了wicd的状态栏图标后,wicd的GUI没有出现,那么请你确保你是单击了图标而不是双击,因为单击一下图标是显示GUI,再单击一个图标就是关闭GUI,双击正好被程序误认为是开了又关了。
Hidden Wireless Networks and Autoconnection HACK
I had problems with my hidden network and the autoconnection function of wicd. It seems that the essid of my hidden network is not "<hidden>", but an empty string. Connect manually to the network and run:
$ iwlist scan
Output of my hidden network:
... wlan0 Scan completed : Cell 01 - Address: xx:xx:xx:xx:xx:xx ESSID:"" Mode:Master Channel:11 ...
If you have the same problems and your iwlist output shows ESSID:"", change /usr/lib/wicd/networking.py:
cd /usr/lib/wicd sed -i.orig -e 's/if CurrentNetwork\["essid"\] == "<hidden>":/if CurrentNetwork\["essid"\] \ == "<hidden>" or CurrentNetwork\["essid"\] == "":/' networking.py
This changes /usr/lib/wicd/networking.py and saves a backup of the original file to /usr/lib/wicd/networking.py.orig.
Based on wicd version 1.4.1-4
Related links相关链接
- Note on the network daemon and interfaces
- Note on interfaces at the official site
- KDE Autostart Issue
- Common Bugs