1 # Service Daemon and CLI
3 The location service offers a daemon executable and a corresponding
4 command-line interface for interacting with it. The daemon does not
5 necessarily require root privileges, but might so depending on your
8 Run the following command to receive an overview of the arguments to
11 ubuntu-location-serviced --help
13 An example invocation of the daemon, configuring a GPS provider that
14 relies on the Android HAL to talk to the chipset, exposing the service
15 on the system DBus instance:
17 ubuntu-location-serviced --bus system --provider gps::Provider
19 The cli allows for querying properties of a running service instance, e.g.:
21 ubuntu-location-serviced-cli --bus system --get --property is_online
23 ## Configuring an Out-Of-Process Provider
25 If you want to run a provider out of process, the daemon executable
26 allows you to do so by instantiating a so-called remote provider. The
27 following invocation of the service tries to connect to the provider
28 instance described by the given unique DBus name and path.
30 ubuntu-location-serviced \
32 --provider remote::Provider \
33 --remote::Provider::bus=system \
34 --remote::Provider::name=com.ubuntu.location.provider.Gps \
35 --remote::Provider::path=/
37 Please note that the service allows for decorating provider names to
38 uniquely identify per provider configuration options and to allow for
39 loading more than one provider of a certain kind. The following
40 configuration configures two remote providers, one relying on GPS
41 (decorated with @gps) and another one relying on network-based
42 positioning (decorated with @network):
44 ubuntu-location-serviced \
46 --provider remote::Provider@gps \
47 --remote::Provider@gps::bus=system \
48 --remote::Provider@gps::name=com.ubuntu.location.provider.Gps \
49 --remote::Provider@gps::path=/ \
50 --provider remote::Provider@network \
51 --remote::Provider@network::bus=system \
52 --remote::Provider@network::name=com.ubuntu.location.provider.Network \
53 --remote::Provider@network::path=/