3

My weather widget doesn't work anymore. I'm using Ubuntu MATE. Here is a screenshot:

ss

2
  • 2
    Without more information, it's very unlikely anyone will be able to help. What weather widget are you using? What about it isn't working? What settings do you have for it? What Ubuntu version are you running? When did this start?
    – Zeiss Ikon
    Aug 26, 2016 at 11:37
  • the add to panel one. I doesn't show. settings: i.cubeupload.com/jVpWap.png MATE Desktop Environment 1.21.1 - Ubuntu 16.04.1 LTS. It started 3-4 day ago
    – cyberdelic
    Aug 27, 2016 at 5:27

2 Answers 2

3

The weather information in METAR format was being downloaded from the NOAA website (it was world wide information) via the libgnomeweather library (and later via the libmateweather library). Around four years ago the NOAA announced it would discontinue that service. Apparently nobody noticed and when the service was discontinued a couple of weeks ago people started to find the message Failed to get METAR data: 404 Not Found in the syslog log (or in my case Falló al obtener datos METAR: 404 Not Found., as my computer is in Spanish).


UPDATE: this has already been fixed in the latest libmateweather (1.12.2) released for Ubuntu Mate 16.04, so this solution is not needed anymore. (However, that version may not work behind a proxy, but that's a different problem).


The fix to this has already been implemented in libmateweather, you can see the patch in the Mate Desktop GitHub repository as commit 835055e0d0b950d3f66ad236de7e40942f6f7d8e. However, it is not clear to me if this fix will be distributed for this Ubuntu Mate LTS (16.04) or not (as this is not really a security fix). Apparently it will be distributed for 16.10, as according to a post in the Mate Desktop blog regarding "known issues" with 16.10:

Weather reports in the Clock and Weather applets are currently unavailable. A fix has already been committed and an updated package will land soon after Beta 1.

This is how I fixed it in my computer (recompile the libmateweather using the Ubuntu sources):

  • Enable sources downloading in APT. You can do this in the System / Administration / Software and Updates dialog, by checking the Source code item in the Ubuntu software tab. You can also enable them in the /etc/apt/sources.list file.

  • Using the MATE Terminal (or any other terminal program or directly in the Linux console), create a temporary directory where you can compile the libmateweather sources (for example, mkdir newlibmateweather) then change to that directory (cd newlibmateweather).

  • Download the sources of libmateweather (apt-get source libmateweather), note this does not require to use sudo).

  • Install the dependencies required to build the package (sudo apt-get build-dep libmateweather). Also install the fakeroot package (sudo apt-get install fakeroot).

  • Edit the ./libmateweather-1.12.1/libmateweather/weather-metar.c file, changing the following lines: enter image description here

    • At line 525, change "National Weather Service" to "AVIATION WEATHER CENTER"

    • At line 553, change "http://weather.noaa.gov/mgetmetar.php" to "http://aviationweather.gov/metar/data"

    • At line 554, change "cccc" to "ids"

  • Change to the library source directory (cd libmateweather-1.12.1/).

  • Create .deb packages (dpkg-buildpackage -rfakeroot -uc -b). This may take a while. At the end you will find several .deb files in the parent directory according to the architecture of your computer (for example, in mine, that created libmateweather1_1.12.1-1_amd64.deb, libmateweather1-dbg_1.12.1-1_amd64.deb, libmateweather-common_1.12.1-1_all.deb and libmateweather-dev_1.12.1-1_amd64.deb.

  • Install the main lib package you just compiled (sudo dpkg -i libmateweather1_1.12.1-1_amd64.deb).

  • You may need to restart the applet(s) or the whole panel or remove it and then add it or logout and login again.

This is the result: enter image description here

Notes:

  • All required packages to recompile libmateweather will be installed automatically when you run the apt-get build-dep command and when you install the fakeroot package.

  • I'm not sure what will happen if a new version of libmateweather is released and distributed for 16.04 (my guess is that this change will be overwritten). However, if a new version is released for this LTS then it may include (or not) this fix. A way to avoid that (the overwriting) is to use sudo apt-mark hold libmateweather1.

  • If you have multiple computers, just compile this once per-architecture and use the .deb file in all your computers. If you have lots of computers to maintain (in your company, organization, school or whatever), a more complete solution would be to create a local private repository so that APT can install the package automatically from it.

5
  • 1
    Instructions worked perfectly on a live cd, but i had to install fakeroot which the system told me; 64bit deb: mediafire.com/?6urjj40783r70wb Sep 3, 2016 at 19:58
  • @GM-Script-Writer-62850, you are right. The "apt-get build-dep" step will install all needed tools to create the new packages, except "fakeroot". I'll update the text.
    – MV.
    Sep 4, 2016 at 18:05
  • Seems like a lot of work. I forecast people will start looking outside instead. Oct 13, 2016 at 1:39
  • @WinEunuuchs2Unix, ha ha. True. But this is no longer needed, as a fix has already been released (except for people behind a proxy who use SSL tunneling, because the released version cannot work with it).
    – MV.
    Oct 13, 2016 at 2:03
  • Today clock-applet failed to retrieve weather, I get 403 Forbidden. error.
    – kenn
    Nov 20, 2020 at 11:17
2

The US government changed something and broke the data used by these apps (broke my conky too).

Specifically :

The entire ‘weather.noaa.gov‘ URL the app references shows a “Service Removed” error. GNOME Weather (or more specifically the library libgweather) uses this URL to fetch its METAR data. It needs to be updated to work with changes made to the domain structure for NOAA’s METAR delivery.

Source OMG-Ubuntu

2
  • but i'm from europe - romania
    – cyberdelic
    Aug 27, 2016 at 5:32
  • The OMG Ubuntu writer is from the UK. Aug 27, 2016 at 11:22

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .