On Ubuntu, I could go to settings and enable “Location Services”. Is there any way to do the same in Plasma? I tried Geoclue, but it was off by 3 miles.
Do you have a GPS device in your computer?
If not, geoclue would probably use any available info on what your provider is and adjacent Wifi networks who’s location is known.
can be pretty accurate
I don’t know what that does or what sources of info it uses.
probably just geoclue as well
From your question I presume that the accuracy was better?
My accuracy was three miles with Geoclue, but a few meters with Google location services. So what I am basically saying is can you use Google location services as the global location provider for all apps?
… I seem to be unable to correctly parse this
I have no clue what you just asked about.
Sorry, let me try to say it a little clearer: For example, if I open KWeather it uses Geoclue to get my current location. So I’m asking, can you make all apps use Google location services?
I don’t know.
The “problem” seems to be
that you don’t know
how your location is determined.
I do not know this either.
Find Out how Ubuntu does it
(they have no magic, they use the same services and info that you can use here)
then apply that new found knowledge to your current system …
I think it depends which app you are using. From the KWeather link given below:
Online APIs used
api.met.no - Weather data geonames.org - Coordinates -> Timezone geoip.ubuntu.com - IP -> Coordinates
Well, sometimes … but if you check the terminal logs when running KWeather’s location finding feature, you will see a line that begins with
qt.positioning.geoclue2 that means that internally it is using Geoclue.
Yup, that’s my problem. I know Ubuntu uses some third party location service and uses that as the source for location in all apps, but I couldn’t find any option like that in Manjaro. The best way I could come up with so far is create a fake Geoclue using the same API, but instead use a third party location service instead of Geoclue’s magic.
IF that is so …
if that is so, then it is relatively easy to find out what it is and what is needed to replicate it.
that is on you
You had (or still have) Ubuntu.
easy to find out in any case
I asume so. I don’t have this installed, so I can’t tell.
The thing is this is a plasma mobile app, so it will work like above on a mobile while probably the way on a desktop it will use geoclue. Just my guess.
KDE also uses Mozilla’s Location Service in some cases, for example for the Night Color function which you find in system settings.
Just wish I could change that to Google .
a mobile device will likely have a GPS device
laptops / PC’s usually don’t
and Geoclue can only use provider data or (known) adjacent wifi
(as far as my imagination of the process goes - I have no actual knowledge)
This is why all this will be messed up and confused
when you are using a VPN (originating in some very distant other part of the world than where you actually are …)
Guess I should’ve read more. In the Geoclue configuration you can specify the location provider. Thanks for your help anyway .
# URL to the WiFi geolocation service. If not set, defaults to Mozilla's # Location Service with a hardcoded key. To use a custom key, uncomment this URL # while changing YOUR_KEY to your MLS API key. #url=https://location.services.mozilla.com/v1/geolocate?key=YOUR_KEY # To use the Google geolocation service instead of Mozilla's, uncomment this URL # while changing YOUR_KEY to your Google API key. # # WARNING: Please make sure that you are complying with the Google's ToS and # policies if you uncomment this: # # https://developers.google.com/maps/documentation/geolocation/policies # #url=https://www.googleapis.com/geolocation/v1/geolocate?key=YOUR_KEY
In order to activate Google Location Services with Geoclue follow these steps:
- Open an account with Google Cloud Console if not done so yet.
- Request an Google Location Service API key within Google Cloud Console. (Paid service with some free quota; requires complete account and payment details for Google Cloud Console).
- Copy API key from Google Cloud Console and replace YOUR_KEY from below`s line of /etc/geoclue/geoclue.conf
- Uncomment above line by removing # in front.
- Test Location Service
… since you where at it:
What does this look like?
… of course I could just supply my actual (or wanted) GPS position
in that configuration
But that would be me, locating me, myself.
Not it, getting my actual location.
Check my accepted solution.
… not a real, proper answer
but from what is there I gather that it is indeed the (known) location of nearby wifi networks
that is used to give you your location
… as I said …
… so: you still do not know
I already knew that possibility.
@Nachlese I think it should work like that when having a G API key.
The question only is if it works together with the apps which the OP wants. Trying.
Have you tried that before?
Yeah, It’s fine. Most of the apps I want use Geoclue.