Author Topic: Slow Wifi Network Connection Upsets Update Notifier !.  (Read 2506 times)

Offline pclinmike

  • Hero Member
  • *****
  • Posts: 637
  • I Only 'Clean' Windows !.
Slow Wifi Network Connection Upsets Update Notifier !.
« on: January 22, 2010, 09:59:29 AM »
On a Acer 5738z (2.6.26.8 tex3 KDE4 ) laptop at boot the wifi network makes its connection after the Update Notifier is looking for a connection to the internet, so it then complaints with an a 'No network connection' error.

Can anyone give me a guide to how I can delay Update Notifier for say 15 to 20 sec before it runs its scripts please.

Or is there ways to speed up the network connection to stop this happening ?.



Edit ... re-posted to this section.
« Last Edit: February 11, 2010, 01:34:22 PM by pclinmike »
Michael.
From South-Derbyshire, England.U.K.Earth.

I Normally Do A Search Before I Post A New Question !.

Thanks to all who replied to my posts.

Offline parnote

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 4436
  • The truth is out there ... PCLinuxOS!
Re: Slow Wifi Network Connection Upsets Update Notifier !.
« Reply #1 on: January 22, 2010, 11:02:44 AM »
Great question, Mike! I'll be watching to see what answers come out of this.

parnote
PCLinuxOS Magazine Chief Editor

Linux Registered User #485009

In a world without walls, who needs Windows?

PCLinuxOS Wiki: Contribute tips/tricks/how-to's!

Offline MaddogF16

  • Hero Member
  • *****
  • Posts: 2711
Re: Slow Wifi Network Connection Upsets Update Notifier !.
« Reply #2 on: January 22, 2010, 11:14:43 AM »
Setting a static ip might help some, or uninstall the update manager and just go to synaptic and reload then check for updates. Maybe the code boys could help you with a script to delay it's start.
Why?

Offline YouCanToo

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 5333
  • Location: Lebanon, OR., USA
    • Spreading the word.......
Re: Slow Wifi Network Connection Upsets Update Notifier !.
« Reply #3 on: January 22, 2010, 12:52:13 PM »
Setting a static ip might help some, or uninstall the update manager and just go to synaptic and reload then check for updates. Maybe the code boys could help you with a script to delay it's start.

Having a static IP does not help the problem a bit. I have machine that use dynapic and static ip's and have the same issue with both. It appears that update notifier is running before the network connection is made.




Be sure to visit the NEW Knowledge Base


Linux is user-friendly- it's just picky who its friends are!

Offline parnote

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 4436
  • The truth is out there ... PCLinuxOS!
Re: Slow Wifi Network Connection Upsets Update Notifier !.
« Reply #4 on: January 22, 2010, 12:55:07 PM »
Hmmmm ... maybe a script that basically says ...

ifup ath0
      update-notifier

Just thinking out loud.

parnote
PCLinuxOS Magazine Chief Editor

Linux Registered User #485009

In a world without walls, who needs Windows?

PCLinuxOS Wiki: Contribute tips/tricks/how-to's!

Offline pclinmike

  • Hero Member
  • *****
  • Posts: 637
  • I Only 'Clean' Windows !.
Re: Slow Wifi Network Connection Upsets Update Notifier !.
« Reply #5 on: January 22, 2010, 07:08:13 PM »
On a test machine I have been looking at the details in the 'shell script'  /usr/share/apps/update-notifier

I'm no expert in this but this seems to be something to do with checking the connection.
---------------------------------
function notify_net_connect_error () {
   echo -e $"\n\nERROR: Unable to connect to internet\n\n"
   if [ "$POP_UPS" == "true" ]; then notify-send -i $LOGO3 -t 4000 $"Connection Failed" $"Your internet connection does not appear to be working.  Please configure it and reload update-notifier"; fi

   zenity --question --title=$" Update-Notifier " --window-icon=$LOGO0 --width=400 --height=200 --text $"Would you like to configure your internet connection and check for updates?"
   if [ $? == 0 ]; then
      /usr/bin/draknetcenter
      check_connected

   fi

   LOGO_X=$LOGO3
   NOTIFY_MSG=$"Your internet connection does not appear to be working.  Please configure it and reload update-notifier"
}


------------------------------------------------

How do I set up a delay ?
Michael.
From South-Derbyshire, England.U.K.Earth.

I Normally Do A Search Before I Post A New Question !.

Thanks to all who replied to my posts.

Offline travisN000

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1758
Re: Slow Wifi Network Connection Upsets Update Notifier !.
« Reply #6 on: January 24, 2010, 01:12:38 PM »
Update notifier is auto-started because of a copy of its desktop file located at /usr/share/autostart/update-notifier.desktop

If you change the Exec= line from

Code: [Select]
Exec=update-notifier-launcher
to

Code: [Select]
Exec=update-notifier-launcher-delay
..and then create a file (as root) by that name in /usr/bin with the following contents:

Code: [Select]
#!/bin/bash

#change delay as needed (in seconds)
sleep 10
update-notifier-launcher

« Last Edit: January 24, 2010, 06:27:26 PM by travisn000 »

Offline pclinmike

  • Hero Member
  • *****
  • Posts: 637
  • I Only 'Clean' Windows !.
Re: Slow Wifi Network Connection Upsets Update Notifier !.
« Reply #7 on: January 24, 2010, 04:53:20 PM »
Hi travisn000. Thanks for your help  :)

On my test machine I did the above and to make sure it was working I set the delay to 30.

Re-booted but it did not delay it !. :(.

I made a text file as root 'update-notifier-launcher-delay'  in    /usr/bin.

In /usr/bin  there are two files ..  'update-notifier-launcher' a shell script of  size 3.0 Kib

and 'update-notifier'  a shell script of 22.9 Kib

Michael.
From South-Derbyshire, England.U.K.Earth.

I Normally Do A Search Before I Post A New Question !.

Thanks to all who replied to my posts.

Offline travisN000

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1758
Re: Slow Wifi Network Connection Upsets Update Notifier !.
« Reply #8 on: January 24, 2010, 06:24:17 PM »
Try the following in your delay script:

Code: [Select]
#!/bin/bash

#change delay as needed (in seconds)
sleep 10

#Prompt for permission before starting update-notifier
zenity --question --text "Would you like to start Update-Notifier?" && update-notifier-launcher


..it could also be that the connection to your repo is too slow; if this does not work, try installing / running the repo speed test.

[/quote]

Offline pclinmike

  • Hero Member
  • *****
  • Posts: 637
  • I Only 'Clean' Windows !.
Re: Slow Wifi Network Connection Upsets Update Notifier !.
« Reply #9 on: January 25, 2010, 05:57:21 PM »
With nothing I try changes the start of the launch of Update Notifier I commented out
 /usr/share/autostart/update-notifier.desktop to # Exec=update-notifier-launcher-delay

That made no difference so I changed the name of   /usr/share/autostart/  update-notifier.desktop to
old.update-notifier.desktop and guess what that made no difference on logging out then back in, update-notifier still launched after about 7sec .!

So what is starting it ?.
Michael.
From South-Derbyshire, England.U.K.Earth.

I Normally Do A Search Before I Post A New Question !.

Thanks to all who replied to my posts.

Offline pags

  • Hero Member
  • *****
  • Posts: 2515
  • Keep it clean.
Re: Slow Wifi Network Connection Upsets Update Notifier !.
« Reply #10 on: January 26, 2010, 12:35:01 PM »
Well...I found this:
Quote
[jpaglia@core2pclinuxos ~]$ locate autostart | grep update
/etc/xdg/autostart/update-notifier.desktop
/usr/share/autostart/kabcdistlistupdater.desktop
/usr/share/autostart/update-notifier.desktop
[jpaglia@core2pclinuxos ~]$

So, there appears to be two autostart folders, both with an update-notifier.desktop file...

and:
Quote
[jpaglia@core2pclinuxos ~]$ cat /etc/xdg/autostart/update-notifier.desktop /usr/share/autostart/update-notifier.desktop
[Desktop Entry]  <-- Beginning of file in /etc/xdg
Encoding=UTF-8
Type=Application
Name=Update-Notifier
Exec=update-notifier-launcher
Icon=synaptic_ok
Comment=Notification of updates
Comment[de]=Benachrichtigung über Updates
Comment[it]=Notifica degli aggiornamenti
Comment[es]=Demonio de notificación de actualizaciones
Comment[fr]=Notification des mises á jour
Comment[pl]=Powiadamianie o aktualizacjach
X-GNOME-Autostart-enabled=true
[Desktop Entry] <-- Beginning of file in /usr/share
Encoding=UTF-8
Name=Update-Notifier
Name[de]=Update-Notifier
Name[it]=Update-Notifier
Name[es]=Update-Notifier
Name[fr]=Update-Notifier
Name[pl]=Update-Notifier
GenericName=update-notifier
GenericName[de]=update-notifier
GenericName[it]=update-notifier
GenericName[es]=update-notifier
GenericName[fr]=update-notifier
GenericName[pl]=update-notifier
Comment=Notification of updates
Comment[de]=Benachrichtigung über Updates
Comment[it]=Notifica degli aggiornamenti
Comment[es]=Demonio de notificación de actualizaciones
Comment[fr]=Notification des mises à jour
Comment[pl]=Powiadamianie o aktualizacjach
Exec=update-notifier-launcher
Icon=synaptic_ok
Terminal=false
Type=Application
OnlyShowIn=KDE;
X-KDE-StartupNotify=false
X-KDE-autostart-after=panel
X-KDE-autostart-condition=update-notifier:General:Autostart:true
[jpaglia@core2pclinuxos ~]$

it would appear they are not the same!!

Offline travisN000

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1758
Re: Slow Wifi Network Connection Upsets Update Notifier !.
« Reply #11 on: January 27, 2010, 10:42:39 PM »
Try changing the Exec= line in both of them.

Which ever one runs last will kill the process of the previous one (that is part of the function of the launcher script); I'm guessing there are multiple autostart desktop files so that it will start on most all desktop environments.

Offline pclinmike

  • Hero Member
  • *****
  • Posts: 637
  • I Only 'Clean' Windows !.
Re: Slow Wifi Network Connection Upsets Update Notifier !.
« Reply #12 on: February 11, 2010, 07:12:39 AM »
This is the answer I came up with and have been testing it for two weeks and seems to be ok.

In /usr/bin there are two files 'update-notifier-launcher' and 'update-notifier'   with Kwrite on the first line of each I put

# delay as needed in seconds.
sleep 30


then save it.

So I have a delay of 1 minute before update-notifier starts and that for me is long enough for my access point to give out an IP address. :)
Michael.
From South-Derbyshire, England.U.K.Earth.

I Normally Do A Search Before I Post A New Question !.

Thanks to all who replied to my posts.

Offline travisN000

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1758
That is good for the short term and will work fine until update-notifier gets updated and over written...  at which point your problem will retun..  :-X :-\ 

..this is why I suggested using a "delay-update-notifier-launcher" shortcut in your auto-start folders; by putting the delay into a seperate file that is not part of the update-notifier package, your fix should persist across updates.  ;D

Offline Bguitar

  • New Friend
  • *
  • Posts: 5
Re: Slow Wifi Network Connection Upsets Update Notifier !.
« Reply #14 on: March 05, 2012, 06:09:03 PM »
Hey guys, thanks for starting this thread.  It's one I'd like to fix as well.  I have two Thinkpad laptops. My old T23 with XFCE works fine, but on my T20 LXDE (both with 512MB ram and I hear you laughing!), the update notifier starts before the wi-fi is connected, which causes the errors described in the original post. I've tried the suggestion with the 30 sec time-out but that didn't do a thing. Apt is NOT scheduled on boot, yet I still get this error.  Otherwise, I'm extremely happy with all else.  I'd like to get this T20 to work for my two young sons.  I've been with PCLinuxOS since .93 and I've been back for about six months, after a few short-lived excursions with Mint. 
Thanks for any suggestions!