Difference between revisions of "Wicd"
(→Installation: -> Notifications are optional now. Rephrased section to fit the guidelines.) |
m (→Random disconnecting) |
||
Line 115: | Line 115: | ||
If you have the package '''pm-utils''' installed, it may be the reason powersaving is on in your system[http://uselessuseofcat.com/?p=67]. You can put {{bc|#!/bin/sh | If you have the package '''pm-utils''' installed, it may be the reason powersaving is on in your system[http://uselessuseofcat.com/?p=67]. You can put {{bc|#!/bin/sh | ||
/sbin/iwconfig wlan0 power off}} into the file /etc/pm/power.d/wireless (create it if it does not exist and make it executable) and see if things get better. | /sbin/iwconfig wlan0 power off}} into the file /etc/pm/power.d/wireless (create it if it does not exist and make it executable) and see if things get better. | ||
+ | |||
+ | If your card does not support "iwconfig wlan0 power off", check the '''BIOS''' for power management options. Disabling PCI-Express power management in bios on a Lenovo W520 resolved this issue. | ||
=== Importing pynotify failed, notifications disabled === | === Importing pynotify failed, notifications disabled === |
Revision as of 20:51, 6 March 2012
Template:Article summary text Template:Article summary heading Template:Article summary text Template:Article summary end
Wicd is a network connection manager that can manage wireless and wired interfaces, similar and an alternative to NetworkManager. Wicd is written in Python and GTK+, requiring fewer dependencies than other network managers. Alternatively, a version of Wicd for KDE, written in Qt, is available from the Arch User Repository. Wicd can also run from the terminal in a curses interface, requiring no X server session or task panel (see #Running Wicd).
Contents
- 1 Installation
- 2 Getting Started
- 3 Troubleshooting
- 3.1 Failed to get IP address
- 3.2 Random disconnecting
- 3.3 Importing pynotify failed, notifications disabled
- 3.4 Dbus connection error message
- 3.5 Problems after package update
- 3.6 Note about graphical sudo programs
- 3.7 Making eduroam work with wicd
- 3.8 Problem changing from wicd to another network manager
- 3.9 Two instances of wicd-client (and possibly two icons in tray)
- 3.10 Bad password using PEAP with TKIP/MSCHAPV2
- 4 External links
Installation
Install wicd, available in the Official Repositories.
wicd: Includes everything needed to run the wicd daemon and the wicd-cli and wicd-curses interfaces.
wicd-gtk: Includes everything needed to run the GTK interface of wicd and the autostart file for the client to appear in the systray.
GTK client
For a GTK front-end, install wicd-gtk, available in the Official Repositories.
KDE client
For a KDE front-end, install wicd-kdeAUR, available in the Arch User Repository.
Notifications
To enable visual notifications about network status, you need to install the notification-daemon.
If you are not using gnome, you will want to install xfce4-notifyd instead of the notification-daemon, because it pulls a lot of unnecessary gnome packages.
Alternative
The wicd-bzrAUR buildscript is available from AUR, which should build the latest development branch. If you need an alternative version or you just want to roll your own package, you can easily build it using ABS.
Getting Started
Initial Setup
Wicd provides a daemon that must be started.
First, stop all previously running network daemons:
# rc.d stop network # rc.d stop dhcpcd # rc.d stop networkmanager
Now, edit /etc/rc.conf
as root:
# nano /etc/rc.conf
Disable (!) any existing network management daemons in the DAEMONS array, including network, dhcpcd, and networkmanager.
Now, add dbus (if not already present) and wicd to the DAEMONS array, in that order. The DAEMONS array should now look something like this:
DAEMONS=(syslog-ng dbus !network !dhcpcd !networkmanager wicd ...)
Save and close.
Add your account to network group:
# gpasswd -a USERNAME network
/etc/dbus-1/system.d/wicd.conf
, and add your user to that group.Reboot your computer or start the daemons:
# rc.d start dbus
and finally
# rc.d start wicd
If you added your user to a new group, logout and then login.
Running Wicd
To load Wicd, run:
$ wicd-client
To force it to start minimized in the notification area, run:
$ wicd-client --tray
If your desktop environment does not have a notification area, run:
$ wicd-client -n
You can add wicd-client to your DE/WM startup to have the application start when you log in.
wicd-client
processes when using this method. There has been discussion about this in the Arch forums and Arch bug reports (see #External_links). It appears that the wicd package puts a file in /etc/xdg/autostart/wicd-tray.desktop
, which will autostart wicd-client
upon login to your DE/WM. If this is the case, you will have two wicd-client
s running if you add an additional wicd-client
to your DE/WM startup file. Should that occur, confirm that the wicd-tray.desktop
file exists in /etc/xdg/autostart
; if so, having wicd in the daemons list of /etc/rc.conf
is sufficient.You can also run wicd as a curses application from the terminal like so:
$ wicd-curses
Troubleshooting
Failed to get IP address
If wicd repeatedly fails to get an IP address using the default dhcpcd client, try installing and using dhclient instead:
# pacman -S dhclient
Do not forget to select dhclient as the primary dhcp client in wicd options afterwards!
If wicd can get an IP address for a wired interface and is unable to get an IP address for a wireless interface, try disabling the wireless card's powersaving features:
# iwconfig wlan0 power off
Random disconnecting
If dmesg says wlan0: deauthenticating from MAC by local choice (reason=3)
and you lose your wifi connection, it is likely that you have a bit too agressive powersaving on your wifi card[1]. Try disabling the wireless card's powersaving features:
# iwconfig wlan0 power offIf you have the package pm-utils installed, it may be the reason powersaving is on in your system[2]. You can put
#!/bin/sh /sbin/iwconfig wlan0 power offinto the file /etc/pm/power.d/wireless (create it if it does not exist and make it executable) and see if things get better.
If your card does not support "iwconfig wlan0 power off", check the BIOS for power management options. Disabling PCI-Express power management in bios on a Lenovo W520 resolved this issue.
Importing pynotify failed, notifications disabled
In case the package did not get installed automatically -- the package's name is "python-notify":
# pacman -S python-notify
Dbus connection error message
Make sure to use the following command for your .xinitrc:
exec ck-launch-session [your environment here]
As an example, mine reads:
exec ck-launch-session openbox-session
Otherwise you will get dbus error messages and not be able to connect to networks.
- NOTE: If wicd suddenly stopped working and it complains about dbus, it is quite likely that you just need to remove wicd fully, including and all its configuration files, and re-install it from scratch:
pacman -R wicd rm -Rf /etc/wicd /var/log/wicd /etc/dbus-1/system.d/wicd* pacman -S wicd
Check this link for more details: http://bbs.archlinux.org/viewtopic.php?pid=577141#p577141
Wicd-client also throws a dbus connection error message ("Could not connect to wicd's D-Bus interface.") when wicd is not running due to a problem with a config file. It seems that sometimes an empty account gets added to /etc/wicd/wired-settings.conf in which case you simply have to remove the
[]
and restart wicd.
Problems after package update
Sometimes the wicd client fails to load after a package update due to dbus errors.
A solution is to remove the config files in the /etc/wicd/ directory.
# rc.d stop wicd # rm /etc/wicd/*.conf # rc.d start wicd
Note about graphical sudo programs
If you are receiving an error about wicd failing to find a graphical sudo program, run one of the following commands:
$ ktsuss wicd-client -n
$ gksudo wicd-client -n
$ kdesu wicd-client -n
These programs require the ktsuss (found in the AUR), gksu, and kdesu packages, respectively.
Making eduroam work with wicd
This profile will only work for eduroam institutions which use TTLS and will not work for PEAP.
Save the following as /etc/wicd/encryption/templates/ttls-80211
name = TTLS for Wireless author = Alexander Clouter version = 1 require anon_identity *Anonymous_Username identity *Identity password *Password optional ca_cert *Path_to_CA_Cert cert_subject *Certificate_Subject ----- ctrl_interface=/var/run/wpa_supplicant network={ ssid="$_ESSID" scan_ssid=$_SCAN key_mgmt=WPA-EAP eap=TTLS ca_cert="$_CA_CERT" subject_match="$_CERT_SUBJECT" phase2="auth=MSCHAPv2 auth=PAP" anonymous_identity="$_ANON_IDENTITY" identity="$_IDENTITY" password="$_PASSWORD" }
Open a terminal
cd /etc/wicd/encryption/templates echo ttls-80211 >> active
Open wicd, choose TTLS for Wireless in the properties of eduroam, and enter the appropriate settings for your institution. The format of the subject match should be something like "/CN=server.example.com".
NB. This only works in my institution by commenting subject_match, which is not secure, but at least it connects.
Problem changing from wicd to another network manager
When I tried to switch back to the knetworkmanager, without uninstalling wicd, I edited /etc/rc.conf and put a '!' in front of wicd, removed it from networkmanager, rebooted and obviously wicd did not load. When I started KDE though I got a message saying that wicd-client could not start normally because wicd was not running. Wicd-client should not have started as it is not in autostart. The trick stop it from loading is to go to /etc/xdg/autostart and do:
$ sudo nano wicd-tray.desktop
and make it hidden on startup, or if you are not planning to autostart wicd-client again just remove the file.
Two instances of wicd-client (and possibly two icons in tray)
See the note in Wicd#Running_Wicd about the autostart file in /etc/xdg/autostart and the forum post and bug report provided in Wicd#External_Links. Essentially, if /etc/xdg/autostart/wicd-tray.desktop exists, you only need wicd in /etc/rc.conf daemons and should remove it from your DE/WM autostart file.
Bad password using PEAP with TKIP/MSCHAPV2
The connection template PEAP with TKIP/MSCHAPV2 requires the user to enter the path to a CA certificate besides entering username and password. However this can cause troubles resulting in a error message of a bad password *. A possible solution is the usage of PEAP with GTC instead of TKIP/MSCHAPV2 which does not require to enter the path of the CA cert.