Note: This page describes an obsolete version of GPSBabel that may substantially differ from the current or development version.

Working with predefined options

GPSBabel can read a file on startup to set defaults for options. All module and filter options may be set this way.

The format of the file is identical to the inifile-format often seen on Windows. Here is an example:

[Common format settings]
snupper=Y
snlen=10
[gpx]
gpxver=1.1
[magellan]
baud=115200
[tiger]
[Garmin categories]
; any # from 1 to 16
1=fixed waypoints
2=temporary waypoints

Each section of the file starts with a '[section]' header followed by any number of lines formatted option=value. Leading and trailing whitespace will be automatically removed from header, option and value items. Lines starting with '#' or ';' will be treated as comments and ignored.

There are three optional sections.

  • Common format settings.

    Any option from any of the formats listed here will be used by GPSBabel unless explicitly provided on the command line.

  • Common filter settings.

    As above, but for filters.

  • Garmin categories

    This allows you to give readable names to the numeric categories used internally in some Garmin devices and the Mapsource formats such as GDB and MPS. This is information is also used by our GPX and garmin_txt formats as well.

By default, GPSBabel tries at startup to load the file named gpsbabel.ini from the following locations:

  • current working directory

  • Windows: all paths "APPDATA", "WINDIR", "SYSTEMROOT" declared in environment.

  • Unix like OS'ses: ${HOME}/.gpsbabel/, /usr/local/etc/ and /etc/

If the -p option is specified, the above locations are not searched. Only the filename specified by that option will be used.

There may be situations where predefined values are not useable (i.e. wrapper applications using GPSBabel in the background). The inifile mechanism can be disabled with an empty filename.

gpsbabel -p "" -i gpx -f something.gpx -o tiger -F -