#!/bin/sh # Determine if X is running if [[ "$DISPLAY" ]]; then # If X is running # Get pid of wicd daemon if running pidd=$(ps ax 2>/dev/null | grep "wicd/daemon\.py" | grep -v grep | cut -c -4 | sed -e "s/ //g") if [ ! -z ${pidd} ] ; then # wicd daemon is running # Get pid of tray applet if running pidtray=$(ps ax 2>/dev/null | grep "wicd/tray\.py" | grep -v grep | cut -c -4 | sed -e "s/ //g") # Start the tray applet if it's not running if [ -z ${pidtray} ] ; then exec /usr/share/wicd/tray.py 2> /dev/null & fi # Launch the main window exec /usr/share/wicd/gui.py "$@" else # wicd daemon is not running Xdialog --title "ERROR" --msgbox "The wicd service is not running. You need to enable the wicd service before you launch wicd. You can do that from your Zenpanel by using the \"Startup Services\" applet." 12 60 fi else # If X is not running echo "The wicd GUI needs X to run!" fi