GPSDCTL(8)

πŸ’– GPSDCTL πŸ’–

okay bestie, you found the gpsdctl(8) page β€” it's part of the GPSD Documentation set, and it is lowkey one of the most "behind the scenes, doing the real work, no one claps for her" little tools in the whole family. she's not for you, she's not for me, she's for the machine. iconic behavior honestly. πŸŽ€


✨ NAME ✨

gpsdctl β€” the tool that sends commands over to gpsd through its control socket πŸ¦‹


🌸 SYNOPSIS 🌸

gpsdctl action device

πŸ’… OPTIONS πŸ’…

  • action β€” bestie this one is a choice, and it can only be add or remove. and listen: if you ask for an add and there's no daemon instance running yet? this program will just go ahead and launch one for you. main character energy, no hesitation. πŸ‘‘
  • device β€” this should be the pathname of a device. gpsd is gonna open it up to read sensor data from it. that's the whole point. πŸ›°οΈ

🫢 DESCRIPTION 🫢

so basically this is a tool for sending an instance of gpsd commands over its control socket, to add or remove devices from the daemon's device list. simple, right? ✨

and here's the tea: it is not intended to be called by users. nope. it's for the Linux hotplug system and similar facilities β€” the quiet little background gremlins that keep everything running while you're out here living your life. it's giving supporting cast that carries the entire show. 😭


🌈 ENVIRONMENT 🌈

two environment variables get interpreted. just two. count 'em. ✌️

  • GPSD_SOCKET β€” sets the location of the control socket. now if the effective user ID of this program is root, it usually defaults to /run/gpsd.sock β€” although some systems may use the deprecated /var/run/gpsd.sock instead. and non-root users? they get /tmp/gpsd.sock. iykyk. πŸ”₯
  • GPSD_OPTIONS β€” this one may be a list of options to be passed to gpsd when this tool launches it. and it defaults to an empty string. so, y'know, nothing unless you say something. πŸ’€

⭐ RETURN VALUES ⭐

  • 0 β€” on success. slay. βœ…
  • 1 β€” if the action was unknown, or the write to the control socket failed. πŸ™ˆ

🧚 SEE ALSO 🧚

gpsd(8), gpsctl(1), gps(1), libgps(3), libgpsmm(3), gpsprof(1), gpsfake(1).

go read the whole friend group, they're all so good. πŸ’œ


🌸 RESOURCES 🌸

Project web site: https://gpsd.io/ β€” the mothership. go say hi. πŸ¦‹


πŸ‘‘ COPYING πŸ‘‘

This file is Copyright 2013 by the GPSD project SPDX-License-Identifier: BSD-2-clause


πŸŽ€ AUTHOR πŸŽ€

Eric S. Raymond


and that's the whole page, bestie!! πŸ’– this was GPSD, Version 3.27.5, dated 2025-11-04 β€” write that down, it's important, periodt. ✨🫢