{"id":72,"date":"2025-03-31T09:13:54","date_gmt":"2025-03-31T07:13:54","guid":{"rendered":"https:\/\/linuxundich.de\/en\/?p=72"},"modified":"2026-10-03T21:49:46","modified_gmt":"2026-10-03T19:49:46","slug":"adding-custom-locations-to-gnome-weather","status":"publish","type":"post","link":"https:\/\/linuxundich.de\/en\/gnu-linux\/adding-custom-locations-to-gnome-weather\/","title":{"rendered":"Adding Custom Locations to GNOME Weather"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">If you live in a bigger city like Berlin, Munich, London, or New York, you&#8217;ll have no trouble finding your location in GNOME Weather. Just open the app, type the city into the location picker, and you&#8217;re done. It gets harder with smaller places. GNOME Weather offers no convenient way to add them manually. A small script gets around the problem, though.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Why are so many places missing from GNOME Weather?<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">GNOME uses the <a href=\"https:\/\/gitlab.gnome.org\/GNOME\/libgweather\">libgweather<\/a> library for location selection. It contains a large database of cities and weather stations. The location data lives in the file <a href=\"https:\/\/gitlab.gnome.org\/GNOME\/libgweather\/-\/blob\/main\/data\/Locations.xml\">Locations.xml<\/a>. On top of that, libgweather can use OpenStreetMap&#8217;s Nominatim geocoding service to search over the internet.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Not every place makes it into the static database, though. As a rule of thumb, GNOME names cities with at least 100,000 inhabitants. The limit isn&#8217;t rigid: smaller places can be included too, for example if they have regional importance or if there is no larger city nearby that could serve as an alternative. GNOME describes the current criteria and how to contribute <a href=\"https:\/\/gnome.pages.gitlab.gnome.org\/libgweather\/adding-locations.html\">in its documentation<\/a>.<\/p>\n\n\n\n<p class=\"has-pale-cyan-blue-background-color has-background wp-block-paragraph\"><strong>UPDATE August 12, 2026:<\/strong> The original script is offline by now. I therefore point to a current fork that is available as a gist on GitHub.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">If you still want to use your small hometown directly in GNOME Weather, you can fall back on a script. The original script by <a href=\"https:\/\/gitlab.com\/julianfairfax\">Julian Fairfax<\/a> is no longer available. A maintained fork exists, though, <a href=\"https:\/\/gist.github.com\/dotbanana\/1dc4d95d644ce72ab8741d6886b86acc\">as a gist on GitHub<\/a>. The script looks up the place you want via OpenStreetMap and then adds it to the GNOME Weather settings.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Adding your own locations to GNOME Weather<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">You don&#8217;t need to install the script, since you&#8217;ll usually only need it once. First download it from the gist, then make it executable:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>$ &lt;strong&gt;wget https:\/\/gist.githubusercontent.com\/dotbanana\/1dc4d95d644ce72ab8741d6886b86acc\/raw\/add-location-to-gnome-weather.sh&lt;\/strong&gt;\n$ &lt;strong&gt;chmod +x add-location-to-gnome-weather.sh&lt;\/strong&gt;<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Then run the script:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>$ &lt;strong&gt;.\/add-location-to-gnome-weather.sh&lt;\/strong&gt;<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">The script asks for the place you want and runs a search via Nominatim. It then shows you the entry it found, so you can check whether it picked the right place:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>$ &lt;strong&gt;.\/add-location-to-gnome-weather.sh&lt;\/strong&gt;\nType the name of the location you want to add to GNOME Weather: Ravensburg\nIf this is not the location you wanted, consider adding search terms\nAre you sure you want to add Ravensburg, Verwaltungsverband Mittleres Schussental, Landkreis Ravensburg, Baden-W\u00fcrttemberg, Deutschland? &amp;#91;y\/n] : y\nAdding location<\/code><\/pre>\n\n\n\n<figure data-wp-context=\"{&quot;imageId&quot;:&quot;6ac192206b421&quot;}\" data-wp-interactive=\"core\/image\" data-wp-key=\"6ac192206b421\" class=\"wp-block-image wp-lightbox-container\"><img decoding=\"async\" data-wp-class--hide=\"state.isContentHidden\" data-wp-class--show=\"state.isContentVisible\" data-wp-init=\"callbacks.setButtonStyles\" data-wp-on--click=\"actions.showLightbox\" data-wp-on--load=\"callbacks.setButtonStyles\" data-wp-on--pointerdown=\"actions.preloadImage\" data-wp-on--pointerenter=\"actions.preloadImageWithDelay\" data-wp-on--pointerleave=\"actions.cancelPreload\" data-wp-on-window--resize=\"callbacks.setButtonStyles\" src=\"https:\/\/linuxundich.de\/wp-content\/uploads\/2025\/03\/gnome-wetter-ravensburg-1280x735.webp\" alt=\"Location successfully added to GNOME Weather.\" style=\"width:100%\"\/><button\n\t\t\tclass=\"lightbox-trigger\"\n\t\t\ttype=\"button\"\n\t\t\taria-haspopup=\"dialog\"\n\t\t\tdata-wp-bind--aria-label=\"state.thisImage.triggerButtonAriaLabel\"\n\t\t\tdata-wp-init=\"callbacks.initTriggerButton\"\n\t\t\tdata-wp-on--click=\"actions.showLightbox\"\n\t\t\tdata-wp-style--right=\"state.thisImage.buttonRight\"\n\t\t\tdata-wp-style--top=\"state.thisImage.buttonTop\"\n\t\t>\n\t\t\t<svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"12\" height=\"12\" fill=\"none\" viewBox=\"0 0 12 12\">\n\t\t\t\t<path fill=\"#fff\" d=\"M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z\" \/>\n\t\t\t<\/svg>\n\t\t<\/button><figcaption class=\"wp-element-caption\">Location successfully added to GNOME Weather.<\/figcaption><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">After you confirm, the script creates the location directly in the GNOME Weather settings. The current fork supports both a regular installation and the Flatpak version of GNOME Weather. Afterwards, the new location should show up in the app&#8217;s location list.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">How does GNOME Weather store locations?<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">The locations selected in GNOME Weather are stored via GSettings. The script sets the key <code>org.gnome.Weather locations<\/code>. For a regular installation it uses <code>gsettings<\/code>; for the Flatpak version it runs the command inside the Flatpak environment.<\/p>\n\n\n\n<figure data-wp-context=\"{&quot;imageId&quot;:&quot;6ac192206bb24&quot;}\" data-wp-interactive=\"core\/image\" data-wp-key=\"6ac192206bb24\" class=\"wp-block-image wp-lightbox-container\"><img decoding=\"async\" data-wp-class--hide=\"state.isContentHidden\" data-wp-class--show=\"state.isContentVisible\" data-wp-init=\"callbacks.setButtonStyles\" data-wp-on--click=\"actions.showLightbox\" data-wp-on--load=\"callbacks.setButtonStyles\" data-wp-on--pointerdown=\"actions.preloadImage\" data-wp-on--pointerenter=\"actions.preloadImageWithDelay\" data-wp-on--pointerleave=\"actions.cancelPreload\" data-wp-on-window--resize=\"callbacks.setButtonStyles\" src=\"https:\/\/linuxundich.de\/wp-content\/uploads\/2025\/03\/gnome-weather-dconf.webp\" alt=\"Editing GNOME Weather's location data in dconf.\" style=\"width:100%\"\/><button\n\t\t\tclass=\"lightbox-trigger\"\n\t\t\ttype=\"button\"\n\t\t\taria-haspopup=\"dialog\"\n\t\t\tdata-wp-bind--aria-label=\"state.thisImage.triggerButtonAriaLabel\"\n\t\t\tdata-wp-init=\"callbacks.initTriggerButton\"\n\t\t\tdata-wp-on--click=\"actions.showLightbox\"\n\t\t\tdata-wp-style--right=\"state.thisImage.buttonRight\"\n\t\t\tdata-wp-style--top=\"state.thisImage.buttonTop\"\n\t\t>\n\t\t\t<svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"12\" height=\"12\" fill=\"none\" viewBox=\"0 0 12 12\">\n\t\t\t\t<path fill=\"#fff\" d=\"M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z\" \/>\n\t\t\t<\/svg>\n\t\t<\/button><figcaption class=\"wp-element-caption\">Editing GNOME Weather&#8217;s location data in dconf.<\/figcaption><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">If you want to remove a location added this way, you can edit the stored settings with the <em>dconf Editor<\/em>, for example. The relevant entry is located at <code>org.gnome.Weather<\/code>. The format of the stored location data isn&#8217;t exactly user-friendly, so be careful when you do this.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The current solution isn&#8217;t particularly elegant, but it works reliably. GNOME has since extended the location database with an online search via Nominatim, so the library can also find places that aren&#8217;t in the static database. The script uses exactly that and then transfers the place it found into the settings GNOME Weather uses.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The fork by <a href=\"https:\/\/gist.github.com\/dotbanana\/1dc4d95d644ce72ab8741d6886b86acc\">dotbanana<\/a> is therefore a practical solution for everyone whose hometown can&#8217;t be selected through GNOME Weather&#8217;s regular search. Since both GNOME Weather and libgweather keep evolving, this behavior may change in the future. As of now, the script also works with the Flatpak version of GNOME Weather.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>GNOME Weather doesn&#8217;t list many smaller places. A script lets you add the missing towns and cities yourself, without waiting for an official update.<\/p>\n","protected":false},"author":2,"featured_media":71,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"lui_source_id":44246,"lui_source_hash":"f9810df172530ffd56774b90ebb59b37a21217d623bb7c9f66d69cbdf1482d2d","lui_source_translated":"2026-10-03","lui_source_reviewed":true,"lui_via_url":"","lui_via_label":"","lui_source_url":"","lui_source_label":"","footnotes":""},"categories":[2],"tags":[],"class_list":["post-72","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-gnu-linux"],"_links":{"self":[{"href":"https:\/\/linuxundich.de\/en\/wp-json\/wp\/v2\/posts\/72","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/linuxundich.de\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/linuxundich.de\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/linuxundich.de\/en\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/linuxundich.de\/en\/wp-json\/wp\/v2\/comments?post=72"}],"version-history":[{"count":1,"href":"https:\/\/linuxundich.de\/en\/wp-json\/wp\/v2\/posts\/72\/revisions"}],"predecessor-version":[{"id":75,"href":"https:\/\/linuxundich.de\/en\/wp-json\/wp\/v2\/posts\/72\/revisions\/75"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/linuxundich.de\/en\/wp-json\/wp\/v2\/media\/71"}],"wp:attachment":[{"href":"https:\/\/linuxundich.de\/en\/wp-json\/wp\/v2\/media?parent=72"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/linuxundich.de\/en\/wp-json\/wp\/v2\/categories?post=72"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/linuxundich.de\/en\/wp-json\/wp\/v2\/tags?post=72"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}