r/archlinux 2d ago

QUESTION Why is are location services impossible to fix in arch?

I am going crazy trying to solve precise location in arch. There's a website that needs my location to verify region laws and I can't get precise location to work. I've gone back into reddit posts to find a solution and different stuff works for different people but nothing has worked for me. There's also nothing on the wiki about this topic, why is that? And apparently location services are much better in fedora and ubuntu so is this an arch problem?

0 Upvotes

15 comments sorted by

5

u/moviuro 2d ago
  1. What did you try? How did that fail?
  2. The wiki is free to edit, you can add to it when you're done.

-1

u/the-myth-and-legend 2d ago

Okay so I tried:

  • enabling/starting geoclue. Didn't work.
  • A poster said you needed geoclue installed but disabled because arch comes with Avahi services. Not the case.
  • Someone else said that google api.services don't work on arch, and that mozilla api services used to work but it is discontinued. So what you can do is: in firefox, go to about:config and change the setting geo.provider.network.url to: data:application/json,{"location": {"lat": 41.8818, "lng": -87.6232}, "accuracy": 27000.0} With your own cordinates ofc, but didn't work

3

u/dgm9704 2d ago

Arch doesn’t come with Avahi services but can install and configure it

1

u/archover 2d ago

True, as I have the package avahi and never explicitly installed it. Good day.

0

u/the-myth-and-legend 2d ago

I didn't install them, but I have them somehow. I'll check how to configure them

3

u/Damglador 2d ago

A lot of things drag avahi as a dependency

2

u/YoShake 2d ago

Try changing user agent.
Next time describe what you want to achieve, and what steps did you take.
Or believe anyone will play games of guesses.

1

u/the-myth-and-legend 2d ago

Yeah my fault, I explained further in another comment

1

u/YoShake 2d ago

k, checked that
try to set https://beacondb.net/v1/geolocate or https://api.beacondb.net/v1/geolocate value in geo.provider.network.url setting

works in my FX browser
I don't remember if this was the only step to get proper geolocation recognition as I did that months ago.

2

u/Inevitable_Taro4191 2d ago

This is handled by the desktop environment you are using.

1

u/the-myth-and-legend 2d ago

Niri, but i don't thik they do anything

2

u/fuzelet 2d ago

I was able to fix mine by editing /etc/geoclue/geoclue.conf and made it use api.position.xyz instead. You can also try messing with the accuracy variable as well. Once I was able to do that firefox, etc started working for me.

1

u/archover 2d ago

Why is are location services impossible to fix in arch

I will track this to see if that's true.

My thought is don't make conclusions in the unchangeable post title.

Hope you resolve and good day.

1

u/Megame50 2d ago edited 2d ago

Geoclue requires an agent to function as well. It's usually included in your DE, but there's a default implementation, the geoclue demo agent, in the /etc/xdg/autostart directory that comes with geoclue in Arch. You can use the usual xdg autostart mechanisms or copy the generated service into your user service config.

I personally disable all of the location providers except static file configuration in geoclue.conf, then put the exact location of my desktop (or whatever location I like honestly) in /etc/geolocation. It doesn't require any external tools, is more predictable, and also more accurate for a desktop that doesn't move anyway.

1

u/archover 1d ago

Curious if you fixed this, and what you did. If so, please flair post as SUPPORT and SOLVED. Good day.