Unofficial PyQt based wicd-client launcher

Wicd is an open source wired and wireless network manager for Linux which aims to provide a simple interface to connect to networks with a wide variety of settings. Wicd project home page

Some of Wicd's features include:

  1. No Gnome dependencies (although it does require GTK), so it is easy to use in XFCE, Fluxbox, Openbox, Enlightenment, etc.

  2. Ability to connect to wired and wireless networks

  3. Profiles for each wireless network and wired network

  4. Many encryption schemes, some of which include WEP/WPA/WPA2 (and you can add your own)

  5. Remains compatible with wireless-tools

  6. Tray icon showing network activity and signal strength

  7. A full-featured console interface

I am using KDE 4.3 on my Linux box. When I start session in KDE, Wicd system tray icon does not apeear. There is allocated space on tray, status tooltip and responsive menu, everything but icon.

Root Cause Analysis

Wicd's client is Python program. Client uses gtk.StatusIcon to implement a tray icon.

Here is simple test, showing how to use gtk.StatusIcon.


#!/usr/bin/env pythonrp
# -*- coding: utf-8 -*-

import gtk
import pygtk

def quit_cb(widget, data = None):
    if data:
        data.set_visible(False)
    gtk.main_quit()

def popup_menu_cb(widget, button, time, data = None):
    if button == 3:
        if data:
            data.show_all()
            data.popup(None, None, None, 3, time)
    pass

def activate_icon_cb(widget, data = None):
    msgBox = gtk.MessageDialog(parent = None, buttons = gtk.BUTTONS_OK, message_format = "StatusIcon test.")
    msgBox.run()
    msgBox.destroy()

statusIcon = gtk.StatusIcon()

menu = gtk.Menu()
menuItem = gtk.ImageMenuItem(gtk.STOCK_ABOUT)
menuItem.connect('activate', activate_icon_cb)
menu.append(menuItem)
menuItem = gtk.ImageMenuItem(gtk.STOCK_QUIT)
menuItem.connect('activate', quit_cb, statusIcon)
menu.append(menuItem)

statusIcon.set_from_stock(gtk.STOCK_HOME)
statusIcon.set_tooltip("StatusIcon test")
statusIcon.connect('activate', activate_icon_cb)
statusIcon.connect('popup-menu', popup_menu_cb, menu)
statusIcon.set_visible(True)

gtk.main()

This simple program was successfully tested on KDE 3.5. When I start KDE 4.3 session, system tray icon does not apeear. As simple as that. Something prevent gtk.Systray to shine on KDE 4.3.

Workaround

I made simple PyQt based wicd-client launcher, using original set of pixmaps and same animation logic. Right click on icon to open menu, and start Wicd connection manager.

Here is source code.

Next: XCHM rpm for SuSE 9.1


Vanas, Inverse