aboutsummaryrefslogtreecommitdiffstats
path: root/src/location-geoclue.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/location-geoclue.c')
-rw-r--r--src/location-geoclue.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/location-geoclue.c b/src/location-geoclue.c
index d420457..5c027c7 100644
--- a/src/location-geoclue.c
+++ b/src/location-geoclue.c
@@ -60,6 +60,10 @@ location_geoclue_start(location_geoclue_state_t *state)
state->position = geoclue_position_new(state->provider,
state->provider_path);
} else {
+ if (getenv("DISPLAY") == NULL || *getenv("DISPLAY") == '\0') {
+ /* TODO This (hack) should be removed when GeoClue has been patched. */
+ putenv("DISPLAY=:0");
+ }
GError *error = NULL;
GeoclueMaster *master = geoclue_master_get_default();
GeoclueMasterClient *client = geoclue_master_create_client(master,