Skip to content

Commit

Permalink
Try to use DISPLAY=:0 if not in X
Browse files Browse the repository at this point in the history
Signed-off-by: Mattias Andrée <[email protected]>
  • Loading branch information
maandree authored and jonls committed Apr 20, 2014
1 parent 79efce3 commit c65af6e
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/location-geoclue.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit c65af6e

Please sign in to comment.