Not able to select/type location/city in Weather app

I have had the following problem since the first day I installed Zorin 17, but was hoping the problem would be solved in future updates, or that anyone in the forum would also post about it. But I have not seen any post about it, and problem is still there for me, so maybe it is only me? Here is the problem:

When I click on "Select weather location..." under the "Clock" in Dash-bar, it opens the default Weather app (I do not live in Texas, it is just for testing I typed it):

Then I try to type my location city, but nothing happens. Also when trying any other city in the world, nothing happens. I also tried to click the "Enter" button after typing, but still nothing happens.

I must also say that I did have the same problem during installation of Zorin 17, meaning during installation I was asked to type in my location, but it did not work, instead I only get the main city in my contry wich is Oslo.

Back to the weather app. Previous I was able to open the app and see forecast for Oslo, this happened after I turned on "Location Services" in "Settings - Privacy - Location Services". However when I did try to type in another location in the weather app when having it open with the forecast, it still did not work and was having the same problem as descibed above.

I have also tried to uninstall the app, and then install it again, but it did not help. I have also tried to install a different weather app from "Software" in Zorin, but I was not able to make it display under the "Clock/Time" in "Dash-bar", wich still displayed the text "Select weather location..."

So if anybody know a solution to one of the number question below, I would be grateful, or if somone has any information regarding my problem:

1: How can I overcome the "bug" that I am not able to select/type a city in the default weather app in Zorin?

2: If I install a different weather app instead of the default app, how can I make it default so that it will display weather forecast under the "Clock/Time" in "Dash-bar"?

3: How can I remove the text "Select weather location..." under the "Clock/Time" in "Dash-bar"?

I have searched a lot in Google. It seems the Weather app does not have added cities wich are smaller then 100 thousand inhabitants or does not have a airport. I want to add my city manually. I am so close, but need some help:

First, I have tried to add my city details in /usr/share/libgweather/Locations.xml but I am not able to save the file, only get a error when trying to save it. But I also don't think it will work, as others have tried that without success.

What I need is to open the dconf editor and edit these two keys:

org/gnome/Weather/locations
org/gnome/shell/weather/locations

However I do not understand how I can open dconf editor? Can somone point me in the right direction? I did try to run this command in terminal, but it did not work:

xxx@xxx:~$ gsettings get org.gnome.Weather locations
No such schema “org.gnome.Weather”

Also, I must say that I have uninstalled the default Weather app because it was a very old version, and then I have installed the very same Weather app, but from Flathub (with is only 4 month old).

Here is some references from my searches:

https://www.reddit.com/r/gnome/comments/x0v8ez/custom_weather_location/?rdt=51363

https://www.reddit.com/r/gnome/comments/umgrur/new_weather_app_doesnt_show_my_location/

https://www.reddit.com/r/Fedora/comments/w0fbf0/gnome_weather_not_finding_locations_only_some/

Here is the official page about it, it does not give any help, I feel. I do not like this weather app: Projects/LibGWeather/ImprovingLocations - GNOME Wiki!

Edit: By the way, by uninstalling the Zorin Weather app, and installing the same app but from Flathub, it now does work to type in a city, but I am only able to add a city that is already defined in /usr/share/libgweather/Locations.xml - and that file only have a very few cities from my contry, and my own city is not listed there. So as said I need to manually add my city in the app using "dconf editor", but I do not understand how to open dconf editor?

You can install dconf-editor with

sudo apt install dconf-editor

Launch it from the app menu, terminal or alt+F2. In terminal or alt+F2, you would enter in dconf-editor. The App Menu will list as Dconf Editor.
Once open, you can see at the top the path it will open.
For example, mine opened to /org/nemo/desktop... Probably because it is the last thing I edited.

You can click on the portions of that path, such as click on org to land in the Org path, then scroll through the list in the window below the path to go to gnome, then weather.

1 Like

Thank you so much. I was not able to make it work with Flathub version of Weather app, but I installed the Xorin version of Weather app again, and I was able to make it work by using dconf editor in zorin version of Weather app. However I still need help. But first this is what I did:

Open dconf editor and then I past my custom value in the text field "Custom value" in both this path: org/gnome/Weather/locations and org/gnome/shell/weather/locations

However I am not able to calculate the correct "newlat" and "newlong" from my current lat/long as I get wrong temperatur and weather when doing this. I am trying to do what user "ParitTheGrey" posted here: https://www.reddit.com/r/gnome/comments/194dvz1/advice_needed_re_modifications_to_gnome_weather/

Modifying those gsettings should be enough. I used what this doeshttps://gitlab.com/julianfairfax/scripts/-/blob/main/add-location-to-gnome-weather.sh

Go to https://nominatim.openstreetmap.org/ and search for your area. Get the lat/long.

Then do some math for the value you need.

newlat = lat / (180 / 3.141592654)

newlong = lat / (180 / 3.141592654)

Then you want to set the value of /org/gnome/Weather/locations. Should look like this;

[<(uint32 2, <('YourAreaYouWantAsTextInApp', '', false, [(newlat, newlong)], @a(dd) [])>)>]

I am using the calculator and taking my latitude and dividing it with 180 and then dividing with 3.141592654 to get the "newlat", and then do the same thing with my longitude. There must be something I misunderstand here.

I finally made it work! I was not able to calculate the newlong and newlat from the longitude and latitude available in maps. So I ended up with running this .sh script: add-location-to-gnome-weather.sh · main · Julian / scripts · GitLab

XXX@XXX:~$ '/home/XXX/Downloads/add-location-to-gnome-weather.sh'
Type the name of the location you want to add to GNOME Weather: XXXX
If this is not the location you wanted, consider adding search terms
Are you sure you want to add XXXX, Agder, Norge? [y/n] : y
Adding location
XXX@XXX:~$

(I have removed my city name with XXXX).

However it still did not work. However all this script did was adding "Custom value" to org/gnome/Weather/locations and org/gnome/shell/weather/locations - soo I looked there, and it had added four pieces of altitude and longitude in the code there, and the last two once worked when I used them in my own code found in previous links above:

[<(uint32 2, <('YourAreaYouWantAsTextInApp', '', false, [(newlat, newlong)], @a(dd) [])>)>]

Anyway, so all I did was using the .sh script to generate/calculate the correct format for the altitude and longitude, and now it works!

Edit (final solution): I just discovered that the temperature was several degrees wrong. So I uninstalled the default Zorin weather app and installed the newer version from Flathub. Then I run the .sh script again. And this time it worked out of the box. The temperature is also correct. Also I did not need to edit anyhting using dconf editor, the .sh script worked correct in the Flathub version of Weather app. So this is the solution for me.

1 Like

Great persistence, @emit.
If your last post contains a full solution, please feel free to hit the checkbox for the solution on that post so others can find it.

If not fully solved, can you quickly detail what remains?

1 Like

It is solved for me. Let me summarize and mark this post as solution:

If you are not able to have your own city in the Zorin Weather app, you can do this: Uninstall the default Weather app in Zorin, because it is to old and seems not compatible with the .sh script wich is only two months old. Then install the newer version of the same Weather app using Flathub. Then download the .sh script: add-location-to-gnome-weather.sh · main · Julian / scripts · GitLab - then right click the .sh script and click "Properties" and then on "Permissions" selct "Allow executing file as program". Then right click the .sh script and click "Run as Program". Then answer the question about name of the city in terminal, and you are good to go. :slight_smile:

This is not related to the solution: By the way, thank you @Aravisian for helping me understand I needed to install dconf-editor. I was confused and did not think about it was something I needed to install. Maybe I can look at it like "regedit" in Windows. I am getting more and more happy about not using Windows any more. I feel free now. :slight_smile: Thank you, and all of you! I love Zorin, and this forum is great!

1 Like

While a bit of a stretch, I admit this is a good way of self-training.
I also used regedit a lot when I was a Windows User. I... do not... miss it.

But, in a way, it is a similar concept- By applying a value to a boolean (In Windows, often to a binary), you can change that apps behavior.

1 Like