Wicd 简体中文

From ArchWiki

Jump to: navigation, search
i18n
English
Italiano
简体中文

Contents

[edit] 简介

Wicd是一个能处理有线网络和无线网络的网络连接管理器,与NetworkManager功能相似。它是基于Python和 GTK+开发的,是 extra 软件仓库,支持 i686x86_64 两种架构。

[edit] 安装

[edit] 软件仓库

需要在/etc/pacman.conf开启 [extra] (和/或 [testing] 取决于要安装的版本) 。

# nano /etc/pacman.conf

编辑如下配置:

[extra]
# Add your preferred servers here, they will be used first
Include = /etc/pacman.d/mirrorlist

现在可以安装软件包,它依赖于python-gtk。

# pacman -Sy wicd

可能还会需要 DHCP 和 安全网络管理器

# pacman -S dhclient wpa_supplicant

[edit] 最新的版本

注意: 如果打包时包含了补丁可能会不正常工作(可以使用AUR的PKGBUILD或者自己修改相关项)。

如果需要更新更好的版本,就需要编辑PKGBUILD$pkgver。同时也要编辑$pkgrel (改为 1) 和 $md5sums

# abs
$ cd /var/abs/local
$ cp -r ../extra/network/wicd .
$ nano PKGBUILD

运行

$ makepkg

成功编译打包之后就可以安装

# pacman -U *pkg.tar.gz

[edit] AUR

用户仓库中有一个基于最新 SVN 版本的软件包。

[edit] 守护进程

由于wicd是一个基于GNU/Linux网络脚本的前端, 所以不需要 network。 还有不能同时使用networkmanager

# /etc/rc.d/network stop
# /etc/rc.d/dhcdbd stop
# /etc/rc.d/networkmanager stop

可能要永久的关闭或删除它们, 只是通过Wicd的配置来管理网络连接, 在 rc.conf中:

INTERFACES=(!eth0 !wlan0) # lo is no longer needed here as it is brought up by /etc/rc.sysinit
...
DAEMONS=(syslog-ng @alsa !network dbus !dhcdbd !networkmanager wicd netfs ...)

确保把用户添加到network组

gpasswd -a $USERNAME network

安装Hicolor主题

pacman -S hicolor-icon-theme

如你所见,Wicd需要 dbus 守护进程。 注意dbus会自动被 hal启动。现在请确认这些问题不存在; you need the wicd daemon to be running before you can start the application.

# /etc/rc.d/dbus start
# /etc/rc.d/wicd start

[edit] 开始

启用GUI:

$ /usr/lib/wicd/gui.py

启用通知区域

$ /usr/lib/wicd/tray.py

可以添加 /usr/lib/wicd/tray.py 到窗口管理器启动脚本,以便当登录时启动Wicd。

[edit] 问题

[edit] D-BUS

如果 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] 图形界面

如果图像界面在点击通知区域后不出现,那就要确定只是点击了一次。双击通知区域图标是不会工作的; 双击时会导致打开后又立即关闭,好像没有事情发生。

[edit] 通知区域图标

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.

现在创建 desktop 文件。 在 KDE 中,可以编辑全局配置的 /opt/kde/share/autostart 或者局部配置 ~/.kde/Autostart

[Desktop Entry]
Encoding=UTF-8
Name=Wicd
Exec=/usr/lib/wicd/tray.py
Icon=
Type=Application
StartupNotify=false

[edit] 隐藏无线网络和自动连接的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.

基于Wicd 1.4.1-4版本

[edit] 其它资源

Personal tools