Skip to content

main: Set environment var GSETTINGS_BACKEND=memory

Teemu Ikonen requested to merge tpikonen/geoclue:gsettings-memory into master

Some distros (like Debian) run GeoClue with a filesystem restricted to read-only (ProtectSystem=strict). This results in warnings in the debug log via GLibs GSettings dconf backend:

Oct 23 00:34:23 mobian geoclue[218542]: unable to create file '/var/lib/geoclue/.cache/dconf/user': Read-only file system.  dconf will not work properly.

GeoClue does not use GSettings, so this warning is harmless, but the log spam is annoying.

The only way to disable dconf use in GLib I could find was to set the GSettings backend to 'memory' via the GSETTINGS_BACKEND environment variable. The 'memory' backend does not need filesystem access. The environment is changed in main() before any GLib calls.

Merge request reports