Redshift and Geoclue

I was looking for instructions on how to get Redshift working again (in Zorin Lite 17.3), and came across these:

As far as I can tell, Redshift receives location information from Geoclue, and Geoclue previously relied on Mozilla Location Service (MLS). But beaconDB is proposed as an alternative to MLS. The instruction is to add a few lines to /etc/geoclue/conf.d

[wifi]
enable=true
url=https://api.beacondb.net/v1/geolocate

This solution seems to get Redshift working again. But it made me wonder about Geoclue.

Why does Ubuntu (and thus Zorin) have a location service under the hood? It seems to be activated by default, and there isn't an obvious way (in the graphical menus) to deactivate it. Under Session and Startup, under Application Autostart, there are entries for GeoClue2 Authentication Agent (though the command refers to zorin-agent-geoclue2) and Geoclue Demo agent. Are these the relevant switches?

Geolocation is, if memory serves me correctly under Settings | Privacy.

Only in Gnome a setting for privacy exists, not in XFCE.
Aravisian wrote few years ago that the location services can be disabled in Zorin lite by installing dconf editor

sudo apt install dconf-editor

and then go to
/org/gnome/system/location
and toggle off the slider at "enabled"

You can also use the terminal command

gsettings set org.gnome.system.location enabled false

instead.
I'm not sure if it does the same as removing geoclue from autostart.

There is also the option to mask the geoclue services but I don't know what the difference is to the other ways.

sudo systemctl mask geoclue.service

Thanks for your responses, @swarfendor437 and @Forpli. Correct, I can't see any privacy setting in XFCE.

This is puzzling: it seems that I must start Geoclue manually in the terminal to get Redshift working.

systemctl start geoclue

In other words, the Startup entries don't seem to be autostarting Geoclue.

But even once it's started, and Redshift is working, the slider in dconf Editor appears to be toggled off.

Any idea why Geoclue isn't starting at startup? Is zorin-agent-geoclue2 different from Geoclue?

I misunderstood you. I thought you wanted to disable geoclue (because you can Redshift use without geoclue by setting the location coordinates manually).
In the dconf editor, turn on the slider or replace "false" with "true" in the gsettings terminal command.

1 Like