1<?xml version="1.0" encoding="ISO-8859-1"?> 2<!-- 3This file is Copyright (c) 2010 by the GPSD project 4SPDX-License-Identifier: BSD-2-clause 5--> 6<!DOCTYPE refentry PUBLIC 7 "-//OASIS//DTD DocBook XML V4.1.2//EN" 8 "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd"> 9<refentry id='gpsdctl.8'> 10<refentryinfo><date>25 Jun 2011</date></refentryinfo> 11<refmeta> 12<refentrytitle>gpsdctl</refentrytitle> 13<manvolnum>8</manvolnum> 14<refmiscinfo class="source">The GPSD Project</refmiscinfo> 15<refmiscinfo class="manual">GPSD Documentation</refmiscinfo> 16</refmeta> 17<refnamediv id='name'> 18<refname>gpsdctl</refname> 19<refpurpose>tool for sending commands to gpsd over its control socket</refpurpose> 20</refnamediv> 21<refsynopsisdiv id='synopsis'> 22 23<cmdsynopsis> 24 <command>gpdsctl</command> 25 <arg choice='plain'><replaceable>action</replaceable></arg> 26 <arg choice='plain'><replaceable>device</replaceable></arg> 27</cmdsynopsis> 28</refsynopsisdiv> 29 30<refsect1 id='description'><title>DESCRIPTION</title> 31 32<para>This is a tool for sending an instance of 33<application>gpsd</application> commands over its control socket to 34add or remove devices from the daemon's device list. It is not 35intended to be called by users, but rather by the Linux hotplug 36system and similar facilities.</para> 37 38<para>The action argument may be "add" or "remove". If no daemon 39instance is running when an add is requested, this program will launch 40one.</para> 41 42<para>The "device" argument should be the pathname of a device. A 43device on the list will be opened to read sensor data whenever a 44client requests a watch.</para> 45 46<para>Two environment variables are 47interpreted. <envar>GPSD_SOCKET</envar> sets the location of the 48control socket. It defaults to 49<filename>/var/run/gpsd.sock</filename> if the effective user ID of 50this program is root, <filename>/tmp/gpsd.sock</filename> 51otherwise.</para> 52 53<para><envar>GPSD_OPTIONS</envar> 54may be a list of options to be passed to <application>gpsd</application> 55when this tool launches it. It defaults to an empty string.</para> 56</refsect1> 57 58<refsect1 id='exit_status'><title>RETURN VALUES</title> 59 60<para>1 if the action was unknown or the write to the control socket 61failed, 0 otherwise</para> 62 63</refsect1> 64 65<refsect1 id='see_also'><title>SEE ALSO</title> 66<para> 67<citerefentry><refentrytitle>gpsd</refentrytitle><manvolnum>8</manvolnum></citerefentry>, 68<citerefentry><refentrytitle>gpsctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>, 69<citerefentry><refentrytitle>gps</refentrytitle><manvolnum>1</manvolnum></citerefentry>, 70<citerefentry><refentrytitle>libgps</refentrytitle><manvolnum>3</manvolnum></citerefentry>, 71<citerefentry><refentrytitle>libgpsmm</refentrytitle><manvolnum>3</manvolnum></citerefentry>, 72<citerefentry><refentrytitle>gpsprof</refentrytitle><manvolnum>1</manvolnum></citerefentry>, 73<citerefentry><refentrytitle>gpsfake</refentrytitle><manvolnum>1</manvolnum></citerefentry>. 74</para> 75</refsect1> 76 77<refsect1 id='maintainer'><title>AUTHOR</title> 78 79<para>Eric S. Raymond <email>esr@thyrsus.com</email>.</para> 80</refsect1> 81</refentry> 82