Topic: What to do when you can't install or uninstall WICD (guide)

I got into this very odd problem when I messed up and selected yes to keep one of old version scripts...

Well since all scripts other than that one was new, it completely broke WICD.

Normally I would just uninstall and reinstall to fix such a problem but in this case...

I was little scared when it couldn't get uninstalled! Even more mysterious... overwriting install won't work either...

It took me a while.. (Yes, I'm not Linux guru.. wink ) but solution were pretty simple. I found some guys suggestion of removing a file /var/lib/dpkg/info/wicd.prerm, then uninstalled it.

Orginially I had second step of manually removing wicd, but see below for much easier method for next step...

By la3875:
"Second, open Synaptic ... and search for wicd and mark for complete removal and apply change"

Hope this helps someone! smile

Update: Changed step 2 to la3875's easier method.

Last edited by Iare Tosevite (2008-10-16 08:55:54)

Re: What to do when you can't install or uninstall WICD (guide)

What version were you uninstall/installing?

Re: What to do when you can't install or uninstall WICD (guide)

Originally 1.4 something (one in apt) I first installed 1.5.1 over that one but made one mistake.

Apparently 1.5.1 refuses to overwrite existing files, which makes it very hard to recover from such a mistake.

Re: What to do when you can't install or uninstall WICD (guide)

Just had this same problem today after not paying attention in the 1.5.3 update.
Found this pretty quick and uninstalled no problems after deleting the wicd.prerm file.
Reloaded and all is good again.
Thanks.

Re: What to do when you can't install or uninstall WICD (guide)

That's great. smile Glad this guide worked for you.

Re: What to do when you can't install or uninstall WICD (guide)

Dear god thank you first poster!

This was killing me.  I actually don't know how I am using the Internet right now (not joking) because WICD was broken, but somehow I am still connected.

Got WICD uninstalled, trying reinstall now.

Re: What to do when you can't install or uninstall WICD (guide)

After upgrade to 1.5.3 last night, wifi doesn't work today (Ubuntu). Tried uninstalling but wouldn't let me. Found the post above and deleted wicd.prerm and could then uninstall using Synaptic and - apparently - also reinstall successfully but Wicd doesn't work: no tray icon, no wireless activity, can't start the program by clicking on menu item. Done all this twice, no luck.
I'm typing this from XP (dual boot) where wireless still works fine. I don't understand the reference to the deb package file list in the above post, can someone post simple instructions how I can restore Wicd for a Linux noob?

Re: What to do when you can't install or uninstall WICD (guide)

Open up /etc/init.d/wicd and make sure it looks like file below.  If it doesn't, replace what's there with this

#! /bin/sh
### BEGIN INIT INFO
# Provides:          wicd
# Required-Start:    dbus
# Required-Stop:     
# Default-Start:     2 3 4 5
# Default-Stop:      0 1 6
# Short-Description: Starts and stops Wicd
# Description:       Starts and stops Wicd, a network manager
### END INIT INFO

# Author: Adam Blackburn <compwiz18@users.sourceforge.net>
#

# Do NOT "set -e"

# PATH should only include /usr/* if it runs after the mountnfs.sh script
PATH=/usr/sbin:/usr/bin:/sbin:/bin
DESC="Network connection manager"
NAME=wicd
DAEMON=/usr/sbin/$NAME
DAEMON_ARGS=""
PIDFILE=/var/run/wicd/wicd.pid
SCRIPTNAME=/etc/init.d/wicd

# Exit if the package is not installed
[ -x "$DAEMON" ] || exit 0

# Read configuration variable file if it is present
[ -r /etc/default/$NAME ] && . /etc/default/$NAME

# Load the VERBOSE setting and other rcS variables
[ -f /etc/default/rcS ] && . /etc/default/rcS

# Define LSB log_* functions.
# Depend on lsb-base (>= 3.0-6) to ensure that this file is present.
. /lib/lsb/init-functions

# Perhaps not the best idea
# but a confirmation is nice
# when starting/stopping the daemon
VERBOSE=yes

#
# Function that starts the daemon/service
#
do_start()
{
    # Return
    #   0 if daemon has been started
    #   1 if daemon was already running
    #   2 if daemon could not be started
    #   vvvv -- don't do this -- vvvv
    #   [ -e $PIDFILE ] && return 1
    start-stop-daemon --start --quiet --pidfile $PIDFILE --startas $DAEMON --test > /dev/null \
        || return 1
    start-stop-daemon --start --quiet --pidfile $PIDFILE --startas $DAEMON -- \
        $DAEMON_ARGS > /dev/null 2> /dev/null\
        || return 2
    # Add code here, if necessary, that waits for the process to be ready
    # to handle requests from services started subsequently which depend
    # on this one.  As a last resort, sleep for some time.
}

#
# Function that stops the daemon/service
#
do_stop()
{
    # Return
    #   0 if daemon has been stopped
    #   1 if daemon was already stopped
    #   2 if daemon could not be stopped
    #   other if a failure occurred
    start-stop-daemon --stop --quiet --retry=TERM/30/KILL/5 --pidfile $PIDFILE --name $NAME
    RETVAL="$?"
    [ "$RETVAL" = 2 ] && return 2
    # Wait for children to finish too if this is a daemon that forks
    # and if the daemon is only ever run from this initscript.
    # If the above conditions are not satisfied then add some other code
    # that waits for the process to drop all resources that could be
    # needed by services started subsequently.  A last resort is to
    # sleep for some time.
    start-stop-daemon --stop --quiet --oknodo --retry=0/30/KILL/5 --exec $DAEMON
    [ "$?" = 2 ] && return 2
    # Many daemons don't delete their pidfiles when they exit.
    rm -f $PIDFILE
    return "$RETVAL"
}

#
# Function that sends a SIGHUP to the daemon/service
#
do_reload() {
    #
    # If the daemon can reload its configuration without
    # restarting (for example, when it is sent a SIGHUP),
    # then implement that here.
    #
    start-stop-daemon --stop --signal 1 --quiet --pidfile $PIDFILE --name $NAME
    return 0
}

case "$1" in
  start)
    [ "$VERBOSE" != no ] && log_daemon_msg "Starting $DESC" "$NAME"
    do_start
    case "$?" in
        0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;;
        2) [ "$VERBOSE" != no ] && log_end_msg 1 ;;
    esac
    ;;
  stop)
    [ "$VERBOSE" != no ] && log_daemon_msg "Stopping $DESC" "$NAME"
    do_stop
    case "$?" in
        0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;;
        2) [ "$VERBOSE" != no ] && log_end_msg 1 ;;
    esac
    ;;
  #reload|force-reload)
    #
    # If do_reload() is not implemented then leave this commented out
    # and leave 'force-reload' as an alias for 'restart'.
    #
    #log_daemon_msg "Reloading $DESC" "$NAME"
    #do_reload
    #log_end_msg $?
    #;;
  restart|force-reload)
    #
    # If the "reload" option is implemented then remove the
    # 'force-reload' alias
    #
    log_daemon_msg "Restarting $DESC" "$NAME"
    do_stop
    case "$?" in
      0|1)
        do_start
        case "$?" in
            0) log_end_msg 0 ;;
            1) log_end_msg 1 ;; # Old process is still running
            *) log_end_msg 1 ;; # Failed to start
        esac
        ;;
      *)
          # Failed to stop
        log_end_msg 1
        ;;
    esac
    ;;
  *)
    #echo "Usage: $SCRIPTNAME {start|stop|restart|reload|force-reload}" >&2
    echo "Usage: $SCRIPTNAME {start|stop|restart|force-reload}" >&2
    exit 3
    ;;
esac

:

Re: What to do when you can't install or uninstall WICD (guide)

Double click the wicd deb file, then there should be tab that lists files included in deb file, that was the list of files I was referring to. Sorry I wasn't clear. big_smile

10

Re: What to do when you can't install or uninstall WICD (guide)

Still no luck, here's what I did:

1. Deleted wicd.prerm and all the files indicated in the deb file list. Checked that there was no trace of Wicd installation left, not even my configuration files. Reinstalled 1.5.3. Didn't work.

2. Checked on /etc/init.d/wicd as per dano's post, it didn't exist. So I created it with the suggested contents. Rebooted, still nothing.

Wicd appears in the menu, and both the application and the icon appear in the session autostarts. The client is listed as running in current session. But no icon, no network connection, and nothing happens when I click on the menu item under Applications.

This is very frustrating. The update process needs improving I suppose: I got a message saying that I'd changed some scripts, did I want to keep them? I'd changed nothing except enter my network details which I didn't want to lose so I chose "Keep". Next thing I know is Wicd is broken...

The previous version is 1.4.2, so the Ubuntu repositories seem to have been a little behind. It's still archived, should I try reinstalling that? At least it worked.

11

Re: What to do when you can't install or uninstall WICD (guide)

Uninstalled 1.5.3, reinstalled 1.4.2. Works perfectly.

12

Re: What to do when you can't install or uninstall WICD (guide)

Have just been offered an update to 1.5.3 now that I'm back on line. Thanks but no thanks :-)

Re: What to do when you can't install or uninstall WICD (guide)

HGM wrote:

After upgrade to 1.5.3 last night, wifi doesn't work today (Ubuntu).

What version did you upgrade from? (just for my knowledge)

14

Re: What to do when you can't install or uninstall WICD (guide)

1.4.2 (from memory, now writing from a different machine).
Keep getting bugged by update offers from the Ubuntu repository. Do you think it would be safe to update, but this time rejecting the "Keep" offers?

Re: What to do when you can't install or uninstall WICD (guide)

Were you trying to run "wicd-client" or /opt/wicd/tray.py when you upgraded 1.5.3?  I'd try 1.5.3 again, if you run into an issue after installing it (make sure /etc/init.d/wicd is correct afterward), and try running wicd-client from the console and see if it still fails to start.  If it does, post here and I'll be able to help you get it working pretty quickly.  It shouldn't make a different if you accept or reject the "Keep" offers.  They'll just copy your config files over to a new location.

Re: What to do when you can't install or uninstall WICD (guide)

I think part of the problem is that apt thinks that the init file is a config file and asks if you want to upgrade it... I'm not sure why, though.

17

Re: What to do when you can't install or uninstall WICD (guide)

I'll give it a go tomorrow, if only to get rid of the update prompt. Need to get some work done tonight which requires a working wifi Internet connection without having to boot XP or switching to another laptop...

Re: What to do when you can't install or uninstall WICD (guide)

I had solve this problem and it does not need to reinstall the wicd package. For ubuntu 8.04, if you had wicd on startup you simply need to go to system, preferences then session after that you just need to change the command for wicd that run on startup from /opt/wicd/tray.py or /opt/wicd/gui.py to wicd-client and that's it enjoy.

19

Re: What to do when you can't install or uninstall WICD (guide)

Looks like I'm not the only one:

http://diva-urd.livejournal.com/55372.html

20

Re: What to do when you can't install or uninstall WICD (guide)

Thanks, MagicSeeker, I'll try that if I come to grief again tomorrow, as expected, in the interest of science. If it works like you describe, it's a solution but not really what you'd expect from an automatic update...

Re: What to do when you can't install or uninstall WICD (guide)

I don't see why having a entry in Sessions with an invalid entry in it should cause Wicd to crash...

MagicSeeker: is there still an /opt/wicd/tray.py file on your system?

Re: What to do when you can't install or uninstall WICD (guide)

well adam, it did not crash just that it won't execute. It is because of the change in command in the new version of wicd that's why it won't execute during startup

i gotten the idea and decided to try it out after reading from your topic on the new version of wicd

Re: What to do when you can't install or uninstall WICD (guide)

I think I have just fallen victim to this.  It had lost the text "wlan0" from preferences-> wireless interface, all I had to do was retype and I was back working with 1.5.3.

When I said all I had to do, I meant after I had done everything from recompiling my drivers, to reading every post I could find on the net!!  Off to bed now my brain hurts.

Re: What to do when you can't install or uninstall WICD (guide)

If your update broke your wicd like it did mine, i recommend the following solution:

First follow the first post in the thread to uninstall

code: sudo rm /var/lib/dpkg/info/wicd.prerm

Second, open Synaptic (I'm on Ubuntu 7.10 - Gutsy) and search for wicd and mark for complete removal and apply change

Third, I downloaded the .deb package (not the .tar) onto a usb drive and installed and I'm back including my previous wireless profiles!

Hope this helps!

25

Re: What to do when you can't install or uninstall WICD (guide)

Finally done it and works fine but now I have two tray icons in perfect symmetry :-) Better than a non-working connection I admit.
Is that because I have "wicd-client" under *both sections* referring to Wicd under Sessions?