GEOCLUE(5)
π GEOCLUE CONFIGURATION β okay bestie, let's get you configured π
hi hi hiii π«Ά you've stumbled into the File Formats Manual, section 5, and honestly? iconic. this is the whole vibe of GeoClue's config files. no cap, read all of it, it's not even that long. π
β¨ NAME β¨
geoclue.conf β geoclue configuration parameters πΈ
π SYNOPSIS π
Main configuration file:
/etc/geoclue/geoclue.conf
Overwriting parameters files:
/etc/geoclue/conf.d
π DESCRIPTION π
so the main GeoClue config file, geoclue.conf, is the one that specifies the parameters that control how geoclue operates. it's giving main character energy, but it doesn't have to do it alone. π
you can overwrite parameters by dropping configuration files into the conf.d directory, and they get applied in alphabetic order. so like, a config file called 90-config.conf will overwrite parameters specified in another config file called 50-config.conf in the conf.d directory. numbers are doing the sorting, bestie, not vibes. π₯
every single configuration setting down below is mandatory, and the defaults are literally just what you see before you edit them in geoclue.conf. so if you want to keep the default values around (smart, queen behavior π), copy and comment out the appropriate line(s) before you change them.
also important: a missing enable key for a particular source in the main configuration file causes that source to be enabled by default. adding an enable key setting to any further config file can overwrite this default. so like, silence = yes in this house. π
π¦ AGENT CONFIGURATION OPTIONS π¦
[agent] is used to begin the agent configuration. cute little header, right? π
whitelistβ the whitelist of desktop IDs (without the.desktoppart, bestie, don't add it) of all agents we recognise, separated by a;. periodt.
whitelist=geoclue-demo-agent;gnome-
shell;io.elementary.desktop.agent-geoclue2
πΈ LOCATION SOURCE CONFIGURATION OPTIONS πΈ
π§ [ip]
IP source configuration options β¨
enable=true
Enable the GeoIP source.
method=ichnaea
Method (backend) to use for IP location. Currently implemented are:
"ichnaea": Use the Ichnaea API with the URL from the wifi source."gmaps": Use the location determined by Google Maps."reallyfreegeoip": reallyfreegeoip.org. This API does not return accuracy, so we use a constant value. See theaccuracyoption below.
The following options do not need to be set, but can be provided if you want to override the method defaults:
url=https://example.com/v1/geolocate
Alternative URL to the GeoIP service implemented by the selected method.
accuracy=30000.0
Override the accuracy received from the GeoIP server (or hardcoded into the method) with this value. π
π°οΈ [network-nmea]
Network NMEA source configuration options π«
Network NMEA sources are automatically discovered using avahi, domain "_nmea-0183._tcp". An NMEA service in your network can be registered to avahi by running:
$ avahi-publish-service -H my.nmea.host "NMEA over TCP" _nmea-0183._tcp 50000
Here 'my.nmea.host' and '50000' are the hostname and port of the NMEA service. π«Ά
enable=true
Fetch location from NMEA sources on local network?
nmea-socket=/var/run/gps-share.sock
Use a unix socket as the NMEA data source. If not set, unix socket will not be used. ngl that default is doing nothing and that's fine. π
π‘ [3g]
3G source configuration options π
enable=true
Enable 3G source. The 3G source uses the wireless geolocation service URL defined in the "wifi" section. iykyk, it borrows the wifi section's fit. β¨
πΆ [cdma]
CDMA source configuration options π
enable=true
Enable CDMA source.
π°οΈ [modem-gps]
Modem GPS source configuration options π
enable=true
Enable Modem-GPS source.
πΆ [wifi]
WiFi source configuration options π₯
enable=true
Enable WiFi source.
url=https://example.com/v1/geolocate?key=YOUR_KEY
URL to wireless geolocation service compatible with the Ichnaea API (https://ichnaea.readthedocs.io/en/latest/api/geolocate.html). If not set, defaults to an URL set in the build configuration. If an URL is not set here or in the build configuration, the wifi and 3g sources will be disabled. An API key can be set with the "key" URL parameter. π
submit-data=false
Submit data to a wireless geolocation service. If set to true, geoclue will automatically submit network data to a wireless geolocation service each time it gets a GPS lock. Currently, only Modem-GPS or Network NMEA sources are supported as providers of a location to submit (one at a time). If Modem-GPS source is enabled above it will be the exclusive provider (regardless whether the system is actually equipped with such modem), otherwise Network NMEA source will be considered. so like, one at a time, no polyamory here. π
submission-url=https://example.com/v2/geosubmit?key=YOUR_KEY
URL to submit data to a wireless geolocation service with an Ichnaea compatible API (https://ichnaea.readthedocs.io/en/latest/api/geosubmit2.html).
submission-nick=geoclue
A nickname to submit network data with. Sets an "X-Nickname" HTTP header to the submit request. If set to an empty string, omitted from the submission. Otherwise, must be 2 to 32 characters long. Defaults to "geoclue". pick a cute name bestie, but stay in the character limit. π
π§ [compass]
Compass configuration options β
enable=true
Enable Compass.
π [static-source]
Static source configuration options. This source reads location from "geolocation" file in /etc. See "STATIC LOCATION FILE" below for the format of this file. While this file is constantly monitored for changes during geoclue operation, and the reported static location is updated accordingly, this source isn't meant for inputting a dynamically changing location to geoclue (please use the Network NMEA source for that). no cap, that's not what it's for, use the right source bestie. π
enable=true
Enable the static source. If you make use of this source, you probably should disable other location sources in geoclue.conf so they won't override the configured static location. π
π APPLICATION CONFIGURATION OPTIONS π
Having an entry here for an application with allowed=true means that geoclue will not ask an agent to authorize the application. This is to ensure that applications with built-in authorization mechanism (e.g web browsers) do not have to be bound to agents. slay, they handle their own business. π
If your application is denied access to location information and your operating system doesn't provide any mechanism to change that, it is likely a bug in your operation system (or geoclue). The solution is to report the issue with all details, rather than adding your application to this list. fr fr, don't just sneak yourself onto the list, that's not it. π
Format:
[random-app]
Desktop ID of application without .desktop part.
allowed=true|false
Allowed access to location information?
system=true|false
Is application a system component?
users=
List of UIDs of all users for which this application is allowed location info access, separated by ';'. Keep it empty for allowing it for all users. π«Ά
Examples:
[gnome-datetime-panel]
allowed=true
system=true
users=
[gnome-color-panel]
allowed=true
system=true
users=
[org.gnome.Shell]
allowed=true
system=true
users=
[io.elementary.desktop.agent-geoclue2]
allowed=true
system=true
users=
[epiphany]
allowed=true
system=false
users=
[firefox]
allowed=true
system=false
users=
look at them go, all lined up and thriving. π
π STATIC LOCATION FILE π
π Basic format:
The static location file in /etc (used by the static source) is a text file consisting of the following:
- Latitude (floating point number; positive values mean north, negative south)
- Longitude (floating point number; positive values mean east, negative west)
- Altitude (floating point number; in meters)
- Accuracy radius (floating point number; in meters)
These values need to be separated by newline characters. one per line, bestie, don't get creative. π
πΈ Additional format information:
- The
'#'character starts a comment, which continues until the end of the current line. - Leading and trailing white-space on each line is ignored.
- Empty lines (or containing just white-space or a comment) are ignored.
β¨ Example:
# Example static location file for a machine inside Statue of Liberty torch
40.6893129 # latitude
-74.0445531 # longitude
96 # altitude
1.83 # accuracy radius (the diameter of the torch is 12 feet)
the torch diameter lore is genuinely sending me ππ₯
π Notes:
For extra security, the static location file can be made readable just by the geoclue user:
# chown geoclue /etc/geolocation
# chmod 600 /etc/geolocation
lock it down bestie, nobody else needs to read your coordinates. π
π«Ά CLIENT LIST π«Ά
Sending SIGUSR1 to a running geoclue process prints the current list of clients to the log. that's it, that's the whole section, and it ate. π
π AUTHOR π
Sachin Chand
okay that's the whole page, you made it, I'm so proud of you π₯Ήβ¨ this was the GeoClue Configuration page, section 5, hanging out in the File Formats Manual β and that footer line you saw, GEOCLUE CONFIGURATION(5), is just this page's source/version tag signing off. no date on it, so nothing to report there, bestie. go configure something iconic. π
ππ¦
π¦ where this page comes from
- arch rolling: geoclue 2.8.2-2 Β· LGPL-2.1-or-later AND GPL-2.0-or-later
- fedora 43: geoclue2 2.8.2-1.fc43 Β· GPL-2.0-or-later
- fedora 44: geoclue2 2.8.2-1.fc44 Β· GPL-2.0-or-later
- nixpkgs unstable: geoclue 2.8.2
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms