Daily Notes for 2024-01-23

ยท 1229 words ยท 6 minute read

My GNOME location odyssey ๐Ÿ”—

Ed complaining about GNOME weather’s terrible UI for city names (no mention of state or any other regional indicator, so you’re out of luck if you live in one of two Portlands or Grand Rapidses, for instance) reminded me of my own GNOME weather issue, which is that the GNOME Weather app accepts that I am in Portland, Oregon, but the GNOME shell weather widget does not. Until today it believed I am in Everett, WA, which is 180 miles north of me.

This is one of those classic desktop Linux issues that is miserably complicated by the usual questions of distro, underlying service, etc. etc. and there is a phenomenally broad set of remedies depending on how you phrase your search query.

So, for anyone stumbling across this some day: This is for GNOME 45 running on Fedora Workstation 39. I don’t know what to tell you if you’re having this problem with any other distro or desktop environment, my “solution” is only partial, and my “fix” is probably just fine but will make completists furious.

After a lot of poking around and blind alleys, I came across a reddit post titled “Fedora 37 insists that I live in a place called Hutchinson and I can’t change it.

The two-comment thread reveals that Fedora is using the Geoclue system service, which offers a host of ways to guess your location but seems to mostly rely on Mozilla Location Services (MLS), a service that has been defunct for three years next month. MLS built its database by harvesting location data from Android Firefox and Mozilla Stumbler, which consumed phone location data and nearby Wi-Fi hotspots.

So, two things, I guess:

First, I remember the first time I came across location-via-nearby-hotspots, and I am not going to lie: I thought, “oh, sure, clever.”

And I also remember the first time I got a weird outcome from one of those databases, because I couldn’t unstick a device from my old address across town and it dawned on me that hotspots are one of those things that do, indeed, move around at about the same rate as the general population (with some qualifications about the influence of the demographics of hotspot owners, which have surely shifted over the decades). I thought, “too clever by half, I guess.”

And that brings us to today: It was too clever by half to begin with, and now the underlying service isn’t even getting updated, so the database is so much limburger in the heat ducts.

The Google geolocation API fix ๐Ÿ”—

But it’s cool! You can “solve” the problem by getting an API key for Google’s geolocation services and using that as a fallback for Geoclue’s WiFi location source. It takes about two minutes, you uncomment a URL and add your API key to the end, restart the service (with Fedora it’s sudo systemctl restart geoclue.service), and … your system location might be as correct as possible given the rickety underpinnings of WiFi-based geolocation (but honestly, if one of the world’s richest surveillance companies trusts it, it must be viable) but the GNOME shell weather widget will still be screwy.

The hard-coded locaton fix ๐Ÿ”—

So I complained to Ed that the weather widget was reporting that my location had shifted from Everett, WA to Accra, Ghana, and how I wish I could just hard-code my system location and leave it at that. I so seldom actually care and so often end up just telling my laptop where I am anyhow that it’d just be easier.

With Fedora, and Geoclue 2.7, you can do that. You just have to create /etc/geolocation and make it look like this:

39.971210     # latitude
-78.957570    # longitude
708           # elevation (m)
1             # accuracy (m)

(I used LatLong.net’s address converter to get my coordinates, and because I was feeling extra precise I used PortlandMaps to get my altitude. No, those are not my coordinates.)

But still with the Ghana thing in the widget! But when you click the widget, it opens the Portland location in GNOME Weather.

The “fuckit” fix ๐Ÿ”—

So I turned off location services in my settings, and suddenly the weather widget said Portland, OR and the GNOME Weather app said Portland, OR.

However, GNOME Maps doesn’t go to my current location when I open it with location services turned off. If I toggle them back on to use it, it goes “home.”

In conclusion ๐Ÿ”—

“This is terrible”?

I mean, I have no idea how much meaningful stuff gets done by these services and how much is “it saves you typing your zip code into the weather widget.” And I guess if location really matters you’re doing something else to get it onto the machine.

But the whole “we just default to using this defunct service that was always a compromise on its best day, and if you don’t like it you can just use Google” thing – ugh.

Footnote ๐Ÿ”—

I messed with this on two separate machines, both of which were completely consistent with each other. I picked this entry back up on a third machine – also Fedora 39, also GNOME 45, and I have changed nothing on it – and wondered if it also thought I am in Everett, so I opened the weather widget.

Nope.

It thinks I’m in Portland.

Chop wood, carry water ๐Ÿ”—

Al went to her temple this afternoon to meet with the people who all work together to keep the temple running. They face a very prosaic set of organizing tasks. She told me a few of them and said “sounds dumb, doesn’t it?”

No. It sounded very satisfying.

“It’s interesting to me,” I said, “that we know what people do when there is not an economic gun to their heads, and it’s pretty similar. They go to their temple or synagogue or church or club or gaming group and do sort of prosaic things that serve their little communities they’ve figured out for themselves. Sometimes, yeah, they’re dickheads to each other, but the thing it’s all about is that they have these associations they tend to, and what they’re doing can be pretty simple, but it’s satisfying and they’re deciding some simple things …”

“But there’s trust,” she said.

“But when there’s an economic gun to your head, you don’t get to choose those associations. And you’re probably acting unnaturally in some way. The obvious path isn’t the one that’s most economically advantageous to your employer. Or there’s some reason you have to be stupid about things. Because the institution demands it. And you do it because there’s an economic gun to your head.”

So we shared our discontents about work for the day. I recounted in minor detail two particularly squandered hours, and she talked about having to do something the wrong way because, she was told, the right way was “a four course meal,” whereas the organization is content to “serve a hamburger” to the mentally ill, the indigent, and the addicted.

We talked about what we wish we could do, then talked about what we probably ought to do. Then we talked about how to be as we do it.

I said, “I’m just saying to myself what I say to you when I feel boxed in and the real answer is about waiting …”

“Chop wood, carry water,” she said.

Woodcut: Taming the Bull from the Ten Bulls

Taming the bull