Version: (using KDE KDE 3.2.1) Installed from: Debian testing/unstable Packages Compiler: gcc (GCC) 3.3.3 (Debian 20040321) OS: Linux For me, the Connection Status plugin doesn't. From what I've googled, this plugin uses netstat -rn to see if a default gateway exists. When I'm offline, netstat -rn gives me meldroc@localhost:~$ netstat -rn Kernel IP routing table Destination Gateway Genmask Flags MSS Window irtt Iface Online, I get meldroc@localhost:~$ netstat -rn Kernel IP routing table Destination Gateway Genmask Flags MSS Window irtt Iface 170.147.45.137 0.0.0.0 255.255.255.255 UH 0 0 0 ppp0 0.0.0.0 170.147.45.137 0.0.0.0 UG 0 0 0 ppp0 which theoretically should let Kopete know when I'm on or not. Nevertheless, if I disconnect using kppp, kopete shows my status as still online, and if I start kopete while offline, then go online, kopete shows the pulsating connecting icons for each service forever (or until I manually disconnect all & connect all.) The current method strikes me as being very brittle. Maybe Kopete should use DCOP messaging to talk to kppp and fetch connection status. I guess this is also a feature request for kppp - a DCOP interface that allows other apps to query it for connection status.
I had this problem too. I made kopete use 'netstat -r' instead of 'netstat -rn'. This give the desired 'default' in the netstats output. The second issue was, that I had set my ICQ account to 'automatically connect at startup' _and_ used the connectionstatusplugin at the same time. This way the status shown in kopete was always at connecting and didn't change when I was going online. When disabling this 'automatically connect at startup' the connectionstatusplugin worked as expected. System: SuSE 9.0 with KDE 3.2.0, Qt 3.3.0 Kopete: cvs 20040416 Mit freundlichen Grüßen Bernhard Übelacker
will changing it from 'netstat -rn' to just 'netstat -r' work for everyone or will it just give problems for other people. Chris, do you have any ideas?
As a workaround for this problem, I tried a different approach. Instead of trying to get the connection status plugin to work, I started by making a couple shell scripts: Connection script: #!/bin/sh sleep 10 dcop kopete KopeteIface connect AIMProtocol username dcop kopete KopeteIface connect ICQProtocol username Disconnection script: #!/bin/sh dcop kopete KopeteIface disconnect AIMProtocol username dcop kopete KopeteIface disconnect ICQProtocol username I then used the feature in KPPP that allows the user to run programs before & after connection & disconnection to run the connection script right after the link goes up, and the disconnection script right before the link goes down. This scheme works quite nicely for me. One idea would be to set up some additional DCOP functionality in Kopete for this purpose - perhaps connectAll and disconnectAll functions.
Whats happening with this bug? I still have this problem in kopete 0.8.3 because using -n report "0.0.0.0" instead of "default". Seems like a simple fix to me.
*** Bug 88148 has been marked as a duplicate of this bug. ***
CVS commit by mattr: Fix bug 78836 by removing the n parameter from netstat. CCBUG: 78836 M +1 -1 connectionstatusplugin.cpp 1.23 --- kdenetwork/kopete/plugins/connectionstatus/connectionstatusplugin.cpp #1.22:1.23 @@ -66,5 +66,5 @@ void ConnectionStatusPlugin::slotCheckSt // default gateway. If so, we're connected, if not, we're offline m_process = new KProcess; - *m_process << "netstat" << "-rn"; + *m_process << "netstat" << "-r"; connect( m_process, SIGNAL( receivedStdout( KProcess *, char *, int ) ), this, SLOT( slotProcessStdout( KProcess *, char *, int ) ) );
CVS commit by mattr: Backport of fix for bug 78836. Should be in KDE 3.3.3 if there is one. BUG: 78836 M +1 -1 connectionstatusplugin.cpp 1.20.4.1 --- kdenetwork/kopete/plugins/connectionstatus/connectionstatusplugin.cpp #1.20:1.20.4.1 @@ -66,5 +66,5 @@ void ConnectionStatusPlugin::slotCheckSt // default gateway. If so, we're connected, if not, we're offline m_process = new KProcess; - *m_process << "netstat" << "-rn"; + *m_process << "netstat" << "-r"; connect( m_process, SIGNAL( receivedStdout( KProcess *, char *, int ) ), this, SLOT( slotProcessStdout( KProcess *, char *, int ) ) );