Unix & Linux Stack Exchange
Q&A for users of Linux, FreeBSD and other Unix-like operating systems
Latest Questions
13
votes
3
answers
23446
views
geoclue2: how to get location and configure
At the command line, how do I get the current location that `geoclue2` would report? There's no man page or `bin/` executable in my Arch package. `redshift` (which uses `geoclue2`) is reporting my location as: > 7.98 98.37 But google maps gives me: > 9.749160, 99.975484 Is there any way to configure...
At the command line, how do I get the current location that
geoclue2
would report?
There's no man page or bin/
executable in my Arch package.
redshift
(which uses geoclue2
) is reporting my location as:
> 7.98 98.37
But google maps gives me:
> 9.749160, 99.975484
Is there any way to configure what sources geoclue2
uses to get better accuracy?
Most google geoclue2
searches bring up redshift
which isn't too helpful :(
Tom Hale
(32892 rep)
Nov 5, 2018, 11:28 AM
• Last activity: Mar 25, 2025, 02:56 PM
3
votes
3
answers
7749
views
How to change temperature of the screen and set my position manually with redshift?
I'd like to use the [`redshift`][1] to change the screen color temperature. Now it looks like redshift requires me to install [`geoclue`][2]. But I don't want to have that package installed. And in addition, I'd like to specify the times for my screen color to be changed manually. Either by setting...
I'd like to use the
redshift
to change the screen color temperature.
Now it looks like redshift requires me to install geoclue
. But I don't want to have that package installed. And in addition, I'd like to specify the times for my screen color to be changed manually. Either by setting my position manually or by simply specifying the time it should start and end dimming.
Is there a way to change my screen color temperature like that with some other tool or with some trick maybe? I'm also interested in *why* that isn't possible with redshift even though it shouldn't matter whether it gets the data from geoclue position data or by some data entered manually.
I'm using Debian 9 with KDE.
mYnDstrEAm
(4708 rep)
Sep 17, 2017, 02:33 PM
• Last activity: Mar 25, 2025, 02:15 PM
6
votes
1
answers
4629
views
geoclue "Failed to query location: Not Found"
I have noticed that `redshift` does not work anymore on my machine with Linux Mint 21.3. I am sure that about half a year ago it was still working (that could be under Linux Mint 21.2 though). Trying to debug this, I found out that the problem must be with `geoclue`: ```console $ redshift Trying loc...
I have noticed that
redshift
does not work anymore on my machine with Linux Mint 21.3. I am sure that about half a year ago it was still working (that could be under Linux Mint 21.2 though). Trying to debug this, I found out that the problem must be with geoclue
:
$ redshift
Trying location provider `geoclue2'...
Using provider `geoclue2'.
Could not connect to wayland display, exiting.
Failed to start adjustment method wayland.
Trying next method...
Using method `randr'.
Waiting for initial location to become available...
^Cpoll: Interrupted system call
Unable to get location from provider.
(I do not know why it talks about wayland, it is not a wayland session.)
Executing /usr/libexec/geoclue-2.0/demos/where-am-i
from geoclue-2-demo
package just times out after a while without any output or error. (Sometimes it did produce some error message about something missing IIRC, but I could not reproduce it reliably.)
Here is the status of geoclue.service
:
$ systemctl status geoclue.service | cat
● geoclue.service - Location Lookup Service
Loaded: loaded (/lib/systemd/system/geoclue.service; static)
Active: active (running) since Sat 2024-06-15 13:53:51 CEST; 7min ago
Main PID: 2434 (geoclue)
Tasks: 4 (limit: 18810)
Memory: 19.1M
CPU: 424ms
CGroup: /system.slice/geoclue.service
└─2434 /usr/libexec/geoclue
Jun 15 13:53:51 Alexey-InfinityBook-Mint systemd: Started Location Lookup Service.
Jun 15 13:54:12 Alexey-InfinityBook-Mint geoclue: Failed to query location: Not Found
Jun 15 13:54:17 Alexey-InfinityBook-Mint geoclue: Failed to query location: Not Found
[...]
Googling "geoclue.service Failed to query location Not Found" did not return anything relevant on the top of the search results.
I have the same problem (at least it looks the same) under LMDE 6 (Linux Mint Debian Edition).
Any help will be appreciated.
Alexey
(2310 rep)
Jun 15, 2024, 12:21 PM
• Last activity: Jun 16, 2024, 09:57 PM
0
votes
1
answers
372
views
geoclue redhat selinux annoyance
on a clean install of RHEL-8.9 from iso, with selinux in its default state of enforcing, **geoclue** shows up via `sealert -a /var/log/audit/audit.log` SELinux is preventing /usr/libexec/geoclue from search access on the directory /proc/ /cgroup. ***** Plugin catchall (100. confidence) suggests ****...
on a clean install of RHEL-8.9 from iso, with selinux in its default state of enforcing, **geoclue** shows up via
sealert -a /var/log/audit/audit.log
SELinux is preventing /usr/libexec/geoclue from search access on the directory /proc//cgroup.
***** Plugin catchall (100. confidence) suggests **************************
If you believe that geoclue should be allowed search access on the cgroup directory by default.
Then you should report this as a bug.
You can generate a local policy module to allow this access.
Do
allow this access for now by executing:
# ausearch -c 'geoclue' --raw | audit2allow -M my-geoclue
# semodule -X 300 -i my-geoclue.pp
trying to stop this selinux alert with those two commands does not work.
- can geoclue be uninstalled?
- the geoclue.service shows up as static
; can this be disabled to stop the selinux alert from happening?
- what is geoclue and why is it there?
ron
(8647 rep)
May 7, 2024, 08:19 PM
• Last activity: May 8, 2024, 08:14 PM
2
votes
0
answers
1418
views
Why does KDE come with geoclue and gpsd running by default (which could be used for location tracking) and how to disable it?
Why are these things enabled by default on Debian12 with KDE (Plasma 5.27)? Maybe it could be useful for a few users if it was installed but not enabled and not running by default and just an option one could enable in the configs or which could be enabled by the user through a prompt. If it's runni...
Why are these things enabled by default on Debian12 with KDE (Plasma 5.27)?
Maybe it could be useful for a few users if it was installed but not enabled and not running by default and just an option one could enable in the configs or which could be enabled by the user through a prompt. If it's running by default this also means that after upgrades it could be running again. This is a privacy issue, an undesired bloat service, and a larger attack surface even if there was a proper and vulnerability-free permissions-management for GPS-location-access. So **why is it enabled and running by default** (links such as existing KDE discussions about this and explanations please).
**Is this the correct best way to disable it** (one may still have to check after every OS upgrade and this should also work for users who don't want to uninstall things if they use geoclue sometimes on demand):
1.
sudo start-stop-daemon -T --name gpsd
2. sudo rm /etc/xdg/autostart/geoclue-demo-agent.desktop
3. sudo apt-get remove geoclue-2.0
(if not needed at all)
Issue about it is here .
mYnDstrEAm
(4708 rep)
Apr 7, 2024, 12:41 PM
• Last activity: Apr 10, 2024, 10:57 PM
3
votes
1
answers
4038
views
Geoclue2 insists that permission is forbidden
I am trying to get Redshift to work again. And it seems to fail because of geoclue2. Here's the weird thing. Until earlier today, it worked just fine, and geoclue was not updated since December (2.5.2). Whatever I do, I keep getting the following > geoclue[2905]: Failed to query location: Forbidden...
I am trying to get Redshift to work again. And it seems to fail because of geoclue2.
Here's the weird thing. Until earlier today, it worked just fine, and geoclue was not updated since December (2.5.2).
Whatever I do, I keep getting the following
> geoclue: Failed to query location: Forbidden
When I run
systemctl status geoclue.service
.
**Nothing** works. Not downgrading redshift, or geoclue2, or even running as sudo
the redshift process. Absolutely nothing. It all ends up in the same result: forbidden.
(Yes, I have added redshift to the geoclue.conf
file at /etc/geoclue/geoclue.conf
.)
---
I am using Arch Linux with Openbox and Xinitrc.
Ink blot
(203 rep)
Jan 18, 2019, 06:33 PM
• Last activity: Jan 19, 2019, 03:40 PM
1
votes
1
answers
2062
views
Redshift user service disallowed from using GeoClue2
I can't get Redshift to retrieve geolocation information from GeoClue2. The state right now, after a reboot and without having changed any packages or configuration since the reboot, is that - the GeoClue service is running: $ systemctl status geoclue.service ● geoclue.service - Location Lookup Serv...
I can't get Redshift to retrieve geolocation information from GeoClue2. The state right now, after a reboot and without having changed any packages or configuration since the reboot, is that
- the GeoClue service is running:
$ systemctl status geoclue.service
● geoclue.service - Location Lookup Service
Loaded: loaded (/usr/lib/systemd/system/geoclue.service; static; vendor preset: disabled)
Active: active (running) since Wed 2018-09-05 18:49:03 NZST; 3s ago
Main PID: 8489 (geoclue)
Tasks: 4 (limit: 4915)
Memory: 2.1M
CGroup: /system.slice/geoclue.service
└─8489 /usr/lib/geoclue
Sep 05 18:49:03 machine systemd[1] : Starting Location Lookup Service...
Sep 05 18:49:03 machine systemd[1] : Started Location Lookup Service.
- the packages are up to date:
$ pacman --sync --info geoclue2 redshift
Repository : extra
Name : geoclue2
Version : 2.4.12-1
Description : Modular geoinformation service built on the D-Bus messaging system
Architecture : x86_64
URL : https://www.freedesktop.org/wiki/Software/GeoClue/
Licenses : LGPL
Groups : None
Provides : None
Depends On : libsoup json-glib libmm-glib avahi libnotify
Optional Deps : None
Conflicts With : geoclue
Replaces : None
Download Size : 154.42 KiB
Installed Size : 1206.00 KiB
Packager : Jan Alexander Steffens (heftig)
Build Date : Sun 02 Sep 2018 07:42:59 NZST
Validated By : MD5 Sum SHA-256 Sum Signature
Repository : community
Name : redshift
Version : 1.12-2
Description : Adjusts the color temperature of your screen according to your surroundings.
Architecture : x86_64
URL : http://jonls.dk/redshift/
Licenses : GPL3
Groups : None
Provides : None
Depends On : geoclue2 libdrm libxcb libxxf86vm
Optional Deps : python-gobject: for redshift-gtk
python-xdg: for redshift-gtk
gtk3: for redshift-gtk
Conflicts With : None
Replaces : None
Download Size : 130.88 KiB
Installed Size : 851.00 KiB
Packager : Evangelos Foutras
Build Date : Tue 24 Jul 2018 03:19:05 NZST
Validated By : MD5 Sum SHA-256 Sum Signature
- GeoClue is configured to allow access from Redshift:
$ tail --lines=4 /etc/geoclue/geoclue.conf
[redshift]
allowed=true
system=false
users=
and yet Redshift is unable to start:
$ redshift
Trying location provider `geoclue2'...
Using provider `geoclue2'.
Using method `randr'.
Waiting for initial location to become available...
Unable to start GeoClue client: GDBus.Error:org.freedesktop.DBus.Error.NoReply: Message recipient disconnected from message bus without replying.
Unable to get location from provider.
The user service exhibits a *different* behaviour:
Trying location provider `geoclue2'...
Using provider `geoclue2'.
Using method `randr'.
Waiting for initial location to become available...
Unable to start GeoClue client: GDBus.Error:org.freedesktop.DBus.Error.AccessDenied: 'redshift' disallowed, no agent for UID 1000.
Access to the current location was denied by GeoClue!
Make sure that location services are enabled and that Redshift is permitted
to use location services. See https://github.com/jonls/redshift#faq for more
information.
Unable to get location from provider.
There seems to be a hack available to work around a similar problem - the error message above is different from that page when starting the program manually - but I'm interested in whether a more permanent fix is available or being worked on.
l0b0
(53368 rep)
Sep 5, 2018, 07:08 AM
• Last activity: Oct 23, 2018, 03:10 AM
Showing page 1 of 7 total questions