Wicd (简体中文)
From ArchWiki
| i18n |
|---|
| English |
| Italiano |
| 简体中文 |
Contents |
[edit] Introduction简介
Wicd是一个既能管理无线网络(如Wifi Radar)又能管理有线网络的网络接入管理器,相似又相冲突于NetworkManager。Wicd是用Python和GTK+写成的。现在其对应与i686和x86_64的版本已经是extra源中一部分了。
[edit] Installation安装
[edit] Repository 软件源
首先根据你想要的软件版本,在/etc/pacman.conf打开[extra](默认已打开)或者[testing](默认没有打开)源。(打开就是去除#)
# nano /etc/pacman.conf
pacman.conf中找到类似于如下的这段:
[extra] # Add your preferred servers here, they will be used first Include = /etc/pacman.d/mirrorlist
然后就使用以下命令来安装,如果你系统中没有python和gtk相关程序,pacman也会自动检查依赖关系然后安装好的。(废话,本来就是pacman本身的基本功能。)
# pacman -Sy wicd
你很可能还要安装DHCP和无线安全管理程序.
# pacman -S dhclient wpa_supplicant
[edit] Latest 最新版本
Note: The following may not work if the packaging process includes a patch (you can use part of the PKGBUILD from AUR or DIY entirely)
If you want a more recent version because it works better for you, then edit $pkgver in the PKGBUILD. You may also want to edit $pkgrel (change it to 1) and $md5sums.
# abs $ cd /var/abs/local $ cp -r ../extra/network/wicd . $ nano PKGBUILD
Then run
$ makepkg
and if that went well, add it.
# pacman -U *pkg.tar.gz
[edit] AUR
There is a package in the users' repository which should build the latest SVN release. You can flag it out-of-date if it does not.
[edit] Daemons
因为wicd是一个基本的GNU/LINUX网络脚本前端程序,所以你不再需要在rc.conf中的deamon加载network了。(!network,之前加一个!就可以不加载了。)你当然也不需要networkmanager来干扰wicd了。以下命令就是要手动关闭network、dhcdbd和networkmanager这些守护程序。
# /etc/rc.d/network stop # /etc/rc.d/dhcdbd stop # /etc/rc.d/networkmanager stop
在rc.conf你要直接永久地移除网络相关的设置(也可以注释掉),这是因为这些网络设置都会由wicd来生成和管理,如下:
INTERFACES=(!eth0 !wlan0) #这里的lo不再需要了,因为其是由 /etc/rc.sysinit启动的。 ... DAEMONS=(syslog-ng @alsa !network dbus !dhcdbd !networkmanager wicd netfs ...)
确保你帐号是在network组中的。使用如下命令把你帐号加入到network组中。(如何查看netwok组中还有其它什么帐号呢?我还不知道,请教了。)
gpasswd -a $USERNAME network
安装Hicolo的图标主题,使用如下命令:(估计wicd这个程序要用到这个主题中的图标吧。)
pacman -S hicolor-icon-theme
如你所见,wicd是必须依赖于dbus的正常工作的。daemon中hal要先于wicd启动,因为hal会自动启动dbus的。现在为了确保wicd的GUI能运行,你首先要让dbus正常运行,再开启wicd这个守护程序,用如下命令实现。
# /etc/rc.d/dbus start # /etc/rc.d/wicd start
[edit] Starting启动
启动wicd的GUI,运行如下命令(不用root权限的):
$ /usr/lib/wicd/gui.py
启动wicd状态栏图标程序,运行如下命令(不用root权限):
$ /usr/lib/wicd/tray.py
为了在你登入系统时wicdGUI程序自启动,请在会话(gnome系统菜单中有)中加入/usr/lib/wicd/tray.py。
[edit] Troubleshooting发现与解决问题
[edit] D-BUS
如果dbus这个守护程序(相当于WIN中看服务)已经运行了,但是某些原因下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
[edit] GUI
如果在你点击了wicd的状态栏图标后,wicd的GUI没有出现,那么请你确保你是单击了图标而不是双击,因为单击一下图标是显示GUI,再单击一个图标就是关闭GUI,双击正好被程序误认为是开了又关了。哈哈。
[edit] Tray Icon 状态栏图标
If you had Wicd autostart, and you get a white box instead of the icon after a reboot, create a desktop entry instead of symlinking. This apparently occurs in a KDE environment where a desktop file is always a good idea.
First, make sure there are no existing symbolic links/shortcuts.
# for i in `find /{opt,usr/share,home} -type l -print0 | xargs -r0 file | grep wicd/tray*.py | sed -e 's/^\|:.*//g'`; do rm -iv $i; done
That searches for symbolic links to a wicd directory containing any rendition of tray.py under /opt, /usr/share and /home, then asks whether you want to delete them. You can do this yourself manually.
Now create the desktop file. In KDE, you can place it globally in /opt/kde/share/autostart or locally in ~/.kde/Autostart:
[Desktop Entry] Encoding=UTF-8 Name=Wicd Exec=/usr/lib/wicd/tray.py Icon= Type=Application StartupNotify=false