GPSd and xGPS on OSX 10.6.8

Just documenting how I got GPSd and xGPS running on a Mac running OSX 10.6 (Snow Leopard).

First off, install MacPorts – this is a bunch of *nix tools, utilities and applications packages for OSX. After you do the basic install of MacPorts, do a self-update and upgrade:

sudo port update
[Lots of output will happen, no errors should occur]

sudo port upgrade
[Lots of output will happen, no errors should occur]

If the two commands above work, then you should be able to install gpsd quite easily:

sudo port install gpsd

Then try xgps with the command “xpgs”

If this briefly draws a window on screen then complains that gpsd isn’t running then all is ok, and you can skip the next section. If you get errors suggesting that either gobject or gtk are missing, you need to do the following:

sudo port uninstall gpsd [yes, we uninstall it, because it leads to a missing library problem when we add python27 – this seems to be a MacPorts bug]
sudo port install python27  py27-gobject py27-gtk
sudo port select python python27
sudo port install gpsd

You should then be able to start xgps, but it will most probably complain that gpsd isn’t running. To correct this you need to know what terminal device your gps receiver is attached to, if it is attached via a usb to serial converter, then a reasonable device to try is /dev/tty.usbserial. In my case I can start up gpsd and xgps like this:

gpsd -n /dev/tty.usbserial
xgps

When everything is running and your GPS receiver is talking to the computer, you’ll see satellite and position information displayed in xgps – success.

xGPS on OSX
xGPS on OSX