DaemonForums  

Go Back   DaemonForums > OpenBSD > OpenBSD Packages and Ports

OpenBSD Packages and Ports Installation and upgrading of packages and ports on OpenBSD.

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1   (View Single Post)  
Old 12th November 2018
Prevet Prevet is offline
Shell Scout
 
Join Date: Oct 2017
Posts: 84
Default GKrellM weather plugin woes

http://openports.se/sysutils/gkrellm/plugins/weather

I'm having a little trouble getting this to work right. Out of the box the plugin doesn't give the weather. So I found this link that says to update a weblink in the script '/usr/local/bin/gkrellm.GrabWeather'

https://groups.google.com/forum/#!to...st/zilMiI9WHRI

But when I make the change and run gkrellm it says:

Quote:
unable to fetch weather: 0 at /usr/local/bin/gkrellm.GrabWeather line 46.
This is the line it stops on in the code below:
Code:
 die "unable to fetch weather: $?" if `$cmd` == 0;
Code:
# Is LWP installed?
eval { require LWP::UserAgent };
if ($@) {
  my $cmd = qq{ftp -o $home/$ReportDir/$HTMLFileName $URL};
  die "unable to fetch weather: $?" if `$cmd` == 0; 
} else {
  $ENV{FTP_PASSIVE} = 1; # LWP uses Net::FTP internally.
  my $ua  = new LWP::UserAgent;
  my $req = new HTTP::Request( GET => $URL );
  my $rsp = $ua->request( $req );
  die $rsp->status_line unless $rsp->is_success;
  my $fh = new IO::File "> $home/$ReportDir/$HTMLFileName" 
    or die "unable to write '$home/$ReportDir/$HTMLFileName': $!";
  print $fh $rsp->content;
  close $fh or die "error closing '$home/$ReportDir/$HTMLFileName': $!";
}
Does it need LWP or is the script broken? Is LWP a specific package?

It is definately getting the data from the website. When I hover the mouse over it a text file with all the weather data appears, however the interface just shows. +0C -99%. It is a great program otherwise.
Reply With Quote
 

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
USB modem woes Paianni OpenBSD General 2 25th August 2018 05:54 PM
Xorg woes... jb_daefo FreeBSD General 1 5th June 2011 04:35 AM
torsmo displaying weather question neurosis FreeBSD General 6 20th October 2008 10:53 PM
widescreen woes jbhappy FreeBSD General 8 25th June 2008 08:25 PM
gkrellm launches slowly hydra FreeBSD Ports and Packages 1 16th May 2008 07:00 PM


All times are GMT. The time now is 05:01 PM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Content copyright © 2007-2010, the authors
Daemon image copyright ©1988, Marshall Kirk McKusick