1
2General steps to configure/compile/install Xastir:
3(See detailed steps and library installation instructions below)
4----------------------------------------------------------------------
5
61) Get one of the source releases from Github at
7      https://github.com/Xastir/Xastir/releases
8   and explode it.  (Replace X.Y.Z with the release number below)
9
10  mkdir Xastir
11  cp Xastir-Release-X.Y.Z.tar.gz Xastir
12  cd Xastir
13  tar xzvf Xastir-Release-X.Y.Z.tar.gz
14
15An alternative to the above steps is to use git to download the
16Xastir sources.  See README.GIT for those instructions. Git allows
17you to easily keep up to date with the developers.
18
192) Go into the xastir directory to build the executable:
20
21  cd Xastir
22
23  The first time you do this you need to create the "configure"
24  script.  To do this run:
25
26  ./bootstrap.sh
27
28  Note that bootstrap requires that you have GNU Autoconf and Automake
29  installed on your system.  Any error messages from bootstrap mean
30  that something is missing and you will be unable to proceed, so fix
31  those problems first.
32
33Then create a build directory, configure and build the code:
34
35  mkdir -p build
36  cd build
37  ../configure
38  make
39  su (become the root user)
40  make install (make install-strip can be used after the first time)
41  chmod 4555 /usr/local/bin/xastir (only if you use kernel ax.25, see below)
42  exit (from root)
43
443) Xastir should be installed in /usr/local/bin (the default on most
45systems).  You can run it by typing this from a shell:
46
47    xastir &
48
49
50Short summary of libraries Xastir can use:
51-------------------------------------------------------------------------
52Motif or OpenMotif or LessTiff  Required  The GUI widget set
53pthreads                        Required  Threading capability
54Shapelib                        Recommended ESRI Shapefile maps and WX alerts
55pcre                            Recommended used with Shapefile maps
56Xpm                             Optional  XPM images + Snapshots + Printing
57ImageMagick                     Optional  MANY graphics images
58libtiff/libgeotiff/libproj      Optional  geoTIFF maps (USGS topos)
59AX.25                           Optional  Kernel AX.25 networking support
60festival                        Optional  Speaking alerts
61libcurl or wget                 Optional  Internet images as maps
62GPSMan/gpsmanshp                Optional  Converts GPS data to Shapefiles
63libdb (4.0 or newer)            Optional  Internet map caching (fast!)
64libpq                           Experimental Persistent data with Postgis
65libmysqlclient                  Experimental Persistent data with MySQL
66
67Library/Option Heirarchy:
68-------------------------
69
70    ImageMagick (Usually requires additional libraries)
71
72    error_popups (Annoying popups, turned off by default)
73
74    libgc (developer stuff:  memory leak testing)
75
76    "festival --server &" (Xastir connects to this server)
77      |
78      `-----------> Festival
79
80    gprof
81      |
82      `-+---------> profiling (developer stuff)
83       /
84      |
85    gprof-helper.so
86
87    libax25
88      |
89      `-----------> AX25
90
91    libProj
92      |
93      `-+-------+-> GeoTiff
94       /       /
95      /       /
96    libtiff  /
97            /
98    libgeotiff
99
100    gpsmanshp
101      |
102      `-+------+--> GPSMan
103       /      /
104      |      /
105    tcl/tk  /
106           /
107    ShapeLib
108      |
109      +-----------> rtree
110      |
111      `-+---------> Dbfawk
112       /
113      |
114    PCRE
115
116    libcurl or wget
117       |
118       `-+--------> map_caching
119        /
120       |
121    Berkeley DB
122
123
124    MySQL --------> MySQL database interfaces (Experimental)
125      |
126      `-+---------> db2APRS (Xastir connects to this server)
127       /
128      |
129    Meteo
130
131    Postgresql
132      |
133      `-+--------> Postgis database interfaces (Experimental)
134        |                      +
135       /        QGIS [station data in another GIS application]
136      |
137    Postgis
138
139---------------------------------
140
141
142Installing only the required libs gives you these capabilities:
143
144    PocketAPRS maps
145    aprsDOS maps
146    WinAPRS maps
147    MacAPRS maps
148    GNIS labels
149    Address searching
150    serial port and Internet gateway connectivity.
151
152Adding XPM or ImageMagick libs, ImageMagick's "convert" utility, and
153the "gv" utility gives you printing capability.  Postscript or
154emulated postscript printing capability is required for this as well.
155
156Adding XPM or ImageMagick libs plus "convert" also give the
157capability to create automatic PNG images on disk from the map
158screen (useful for web pages!).
159
160Adding Shapelib support also gives you the capability to use Tiger
1612000 maps which were converted to Shapefile format by ESRI.  This
162allows you to use free detailed street maps for any point in the
163U.S.
164
165Adding other libraries gives you the additional capabilities listed
166above.
167
168For those who would like to see the full list of libraries Xastir
169might use (to decide what packages to install), here's the ldd
170command run against a pretty much fully-loaded Xastir.  Note that
171quite a few of these libraries are pulled in by the ImageMagick
172library, and your library list may look little like it due to
173differences in how ImageMagick was compiled:
174
175  > ldd /usr/local/bin/xastir
176    libXm.so.3 => /usr/X11R6/lib/libXm.so.3 (0x40030000)
177    libXt.so.6 => /usr/X11R6/lib/libXt.so.6 (0x40287000)
178    libX11.so.6 => /usr/X11R6/lib/libX11.so.6 (0x402db000)
179    libMagick.so.0 => /usr/lib/libMagick.so.0 (0x403d7000)
180    liblcms.so.1 => /usr/lib/liblcms.so.1 (0x4052f000)
181    libfreetype.so.6 => /usr/lib/libfreetype.so.6 (0x40553000)
182    libexif.so.9 => /usr/lib/libexif.so.9 (0x405a9000)
183    libXext.so.6 => /usr/X11R6/lib/libXext.so.6 (0x405be000)
184    libSM.so.6 => /usr/X11R6/lib/libSM.so.6 (0x405cc000)
185    libICE.so.6 => /usr/X11R6/lib/libICE.so.6 (0x405d5000)
186    libbz2.so.1 => /usr/lib/libbz2.so.1 (0x405ed000)
187    libz.so.1 => /usr/lib/libz.so.1 (0x405fd000)
188    libpthread.so.0 => /lib/i686/libpthread.so.0 (0x4060c000)
189    libm.so.6 => /lib/i686/libm.so.6 (0x4065d000)
190    libdb-4.1.so => /usr/lib/libdb-4.1.so (0x40680000)
191    libXpm.so.4 => /usr/X11R6/lib/libXpm.so.4 (0x40744000)
192    librt.so.1 => /lib/librt.so.1 (0x40755000)
193    libcurl.so.2 => /usr/lib/libcurl.so.2 (0x40768000)
194    libXp.so.6 => /usr/X11R6/lib/libXp.so.6 (0x4078f000)
195    libshp.so.1 => /usr/local/lib/libshp.so.1 (0x40797000)
196    libpcre.so.0 => /usr/lib/libpcre.so.0 (0x4079f000)
197    libproj.so.0 => /usr/local/lib/libproj.so.0 (0x407ab000)
198    libtiff.so.3 => /usr/lib/libtiff.so.3 (0x407e2000)
199    libgeotiff.so => /usr/local/lib/libgeotiff.so (0x4082b000)
200    libax25.so.0 => /usr/lib/libax25.so.0 (0x4084d000)
201    libc.so.6 => /lib/i686/libc.so.6 (0x40b64000)
202    libdl.so.2 => /lib/libdl.so.2 (0x40c97000)
203    /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x40000000)
204    libssl.so.0.9.7 => /usr/lib/libssl.so.0.9.7 (0x40c9b000)
205    libcrypto.so.0.9.7 => /usr/lib/libcrypto.so.0.9.7 (0x40ccb000)
206    libjpeg.so.62 => /usr/lib/libjpeg.so.62 (0x40dbd000)
207    libjasper-1.700.so.2 => /usr/lib/libjasper-1.700.so.2 (0x40ddd000)
208    libpng.so.3 => /usr/lib/libpng.so.3 (0x40e2c000)
209    libstdc++.so.5 => /usr/lib/libstdc++.so.5 (0x40e5b000)
210    libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x40f1b000)
211
212
213
214Things you need for this version:
215---------------------------------
216 * Get Lesstif/OpenMotif from your favorite Linux/Unix distribution.
217-or-
218 * Lesstif: www.lesstif.org (look below for RED-HAT instructions)
219-or-
220 * OpenMotif: www.openmotif.org
221
222 * AX25 packages: (if you want support for kernel AX25 interfaces)
223    Lib AX25
224    AX25 apps
225    AX25 tools
226    The apps package is not required, but strongly suggested.
227
228     These packages are in most Linux distributions but may be out
229     of date.  See the linux-hams mailing list for details.
230
231 * You should have glibc on your system that supports threads!
232
233
234For geoTIFF support (such as USGS DRG topo maps) you also need:
235
236    libtiff (should be in the package set of most distributions):
237    ------------------------------------------------
238        http://www.simplesystems.org/libtiff/
239
240    libproj (proj-4.4.9 or later):
241    ---------------------
242        http://proj4.org/
243
244    Datum translations (proj-nad27 or proj-datumgrid):
245    --------------------------------------------------
246        http://proj4.org/
247
248    libgeotiff (any version later than libgeotiff-1.1.5):
249    --------------------------------------------------
250        http://geotiff.osgeo.org/
251
252    Please note that the order of installation for the above libraries is
253    critical.  Follow the instructions below carefully.  Also, the particular
254    libgeotiff you use depends on the version of libtiff you have installed.
255
256For Linux kernel AX.25 interfaces, you require these packages:
257    Lib AX25
258    AX25 apps
259    AX25 tools
260
261    These packages are in most Linux distros.  Source code and other
262    information about them can be found at:
263        http://www.linux-ax25.org/wiki/Main_Page
264    The apps package is not required, but strongly suggested.
265
266    See the AX.25 HOWTO and the linux-hams mailing list for
267     details.
268
269For speech support via the festival speech synthesis software you need:
270    festival.  Many package management systems have it already
271    but source and documentation are at:
272
273       http://www.cstr.ed.ac.uk/projects/festival/
274
275
276
277
278For ESRI Shapefile format maps/weather alert maps:
279    Shapelib:
280        http://shapelib.maptools.org/
281    pcre:
282        http://www.pcre.org
283
284For ImageMagick support for maps in any of 68 major graphics formats,
285   including the capability to use online maps and weather radar images:
286    ImageMagick:
287        http://www.imagemagick.org/
288
289To use online maps or findu.com historical data, you'll need wget or
290   libcurl/libcurl-devel installed.  Many systems have these pre-installed,
291   so check first.  You may need to upgrade your installed version for
292   this feature to work correctly from within Xastir:
293    Wget:
294        ftp://ftp.gnu.org/gnu/wget/
295    libcurl:
296        http://curl.sourceforge.net/
297
298
299To download GPS tracks/waypoints/routes from a Garmin GPS into Xastir,
300converting to Shapefile format maps as it runs, you'll need gpsmanshp and
301GPSMan.  GPSMan 6.0 and later has command-line support built-in so that
302Xastir can control it directly, but only GPSMan 6.1 and later are currently
303usable with Xastir:
304    gpsmanshp:
305        http://www.ncc.up.pt/gpsmanshp/
306    GPSMan:
307        http://www.ncc.up.pt/gpsman/
308        http://sunsite.unc.edu/pub/Linux/science/cartography
309
310See below for instructions on installing all of these libraries. Once the
311  libraries are installed, ./configure should find the libraries and allow
312  compiling in support for the new features.
313
314
315If you wish to enable/disable configure's testing of certain
316features, you can add any of the following flags to configure:
317
318    --without-ax25
319    --without-festival
320    --without-gpsman
321    --without-imagemagick
322    --without-libproj
323    --without-geotiff
324    --without-shapelib
325    --without-pcre
326    --without-dbfawk
327    --without-map-cache
328    --with-errorpopups
329    --with-libgc
330    --with-profiling
331    --with-rtree
332    --with-lsb
333    --with-postgis
334    --with-mysql
335
336For example, "./configure --without-ax25" will disable the AX.25
337networking code in Xastir.
338
339If you have installed Xastir before, read the "UPGRADE" file for
340information on changes in file location and permissions.
341
342
343First Time Install:
344-------------------
345
346   1. OPTIONAL:  If you wish to use AX.25 interfaces, install the AX.25
347      packages.  Verify that they are configured and working. Use "listen"
348      to watch the packets fly by after getting AX.25 configured and hooked
349      to a TNC.  Use the AX.25 HOWTO document to guide you in this process.
350
351
352   2. Install LessTif or OpenMotif
353
354     If you already have Motif or OpenMotif on your system, including
355     the development headers, then you won't need to install LessTif. Most
356     distributions include one of these; step 2a describes building from
357     source, while 2b describes installing from pre-built packages on
358     your distribution. Now that OpenMotif is available, you may be happier
359     running it than LessTif, but either one should work with Xastir.
360
361     Some users have had problems with OpenMotif, and others have had troubles
362     with LessTif. Symptoms are often menu problems (menus don't draw
363     correctly, menus won't respond to clicks). If you encounter these
364     problems, then uninstall the current Motif and install the other.  Several
365     Mac users have reported problems with OpenMotif, so LessTif may be a
366     better place to start.
367
368        2a. Download LessTif version 0.91.1 or higher or download OpenMotif.
369        Follow the instructions provided, compile it and install it.
370
371        Usually,
372         ./configure
373         make
374         su (root)
375         make install
376         /sbin/ldconfig
377         exit (from root)
378
379        Or you can try any other OSF/Motif(R) version 1.2
380
381
382       2b. Install LessTif or OpenMotif (from a package)
383
384       Download the lestif-devel (if it exists) and lestif, and install it
385       as your distribution instructs you to install packages.
386
387
388   3. OPTIONAL:  Install geoTIFF support.  Allows using USGS DRG topo maps or
389     other types of geoTIFF maps/images and has the ability to tile smaller
390     maps into a larger contiguous map of an area:
391
392
393       3a.  Check/Edit your startup files:
394       -----------------------------
395       Check that /usr/local/lib, /usr/lib, and /usr/X11R6/lib are
396       all listed in /etc/ld.so.conf, and run /sbin/ldconfig to
397       re-create the system's cache file. If you don't have
398       permission to edit this file:
399            Edit ~/.bashrc, ~/.bash_profile, .cshrc, or
400            .login and add:
401
402            export LD_LIBRARY_PATH=/usr/local/lib:/usr/lib:/usr/X11R6/lib
403
404       This will let the loader find the shared libraries when it tries to
405       load Xastir into memory.
406
407       If you instead have a /etc/ld.so.conf.d directory, then this will add
408       the /usr/local/lib directory to the search:  Create a file in the
409       /etc/ld.so.conf.d called "local.conf".  The file should contain exactly
410       one line:
411
412            /usr/local/lib
413
414       Use your favorite text editor or use these commands:
415
416           echo "/usr/local/lib" > /etc/ld.so.conf.d/local.conf
417           ldconfig -v
418
419       Check that you aren't already defining LD_LIBRARY_PATH somewhere else.
420       If so, just add the paths above to it.  Make sure this environment
421       variable is defined in the current shell you're using to compile Xastir.
422       Note that if you're running Xastir SUID root, the LD_LIBRARY_PATH
423       variable is ignored.
424
425
426       3b. Install libproj:
427       --------------------
428     NOTE: You must install libproj BEFORE compiling libgeotiff, because
429       libgeotiff uses libproj to do the datum translations. If you install
430       libgeotiff first, datum translations won't work.
431
432       proj-nad27-1.1.tar.gz or proj-datumgrid-1.3.zip must be decompressed in
433       the nad subdirectory of the proj distribution directory before you run
434       configure.
435
436        tar xzvf proj-4.4.9.tar.gz (or newer)
437        cd proj-4.4.9/nad
438        unzip ../../proj-datumgrid-1.3.zip (or tar xzvf ../../proj-nad27-1.1.tar.gz)
439        cd ..
440        ./configure
441        make
442        su (root)
443        make install
444        /sbin/ldconfig
445        exit (from root)
446
447        libproj should now be installed in:
448
449            /usr/local/include/
450            /usr/local/lib/
451            /usr/local/bin/
452            /usr/local/share/proj/
453
454       You may need to do this (as root) if the "make install" portion fails
455       because it can't find "ginstall":
456
457       cd /usr/bin
458       ln -s install ginstall
459
460       Then retry the "make install" portion above.
461
462
463       3c. Upgrade libtiff if needed:
464       -----------------------------
465       The best way to install libtiff is to get it from the ftp site
466       for your Linux distribution.  You must have libtiff 3.5.5 or
467       newer for libgeotiff 1.1.x to compile and run correctly, or libtiff
468       3.6.0 BETA or newer for libgeotiff 1.2.x to work correctly.
469
470       If you're using libtiff 3.6.0 BETA or newer, things are simplified.
471       Just use libgeotiff 1.2.x or newer and they should play nicely together.
472
473       ---------
474       Notes for older libtiff (less than 3.6.0 BETA):
475
476           If you are compiling libtiff from source, you must use
477           "make install_private" because the libtiff private include files
478           are required for libgeotiff to compile and work correctly.
479
480           You may also snag just the include files listed below from the
481           source distribution or the source RPM, and copy them manually to
482           their destinations.
483
484           The errors you'll get if you don't match up the older libtiff and
485           libgeotiff by way of the include files:  Xastir will seg-fault when
486           it tries to read a geotiff file.
487       ---------
488
489       If you upgrade libtiff, check that programs like XV, ImageMagick, and
490       the Gimp still run (if you have these programs installed).  Graphics
491       programs that read/write TIFF format depend on libtiff.
492
493
494       3d. Install libgeotiff:
495       -----------------------
496
497     NOTE: Depending on your version of libtiff, either libgeotiff-1.1.5 or
498       libgeotiff-1.2.4 may compile properly.  libgeotiff is intimately
499       tied to your version of libtiff.  libgeotiff 1.2.x or greater
500       requires libtiff-3.6.0 BETA or later.  If your version of libtiff is
501       older, get libgeotiff 1.1.4 or 1.1.5.  For the latter case you may
502       also have to download the sources for your version of libtiff in
503       order to copy one libtiff header file into the libgeotiff source
504       directory.
505
506     -----------------------
507     Pre 3.6.0 libtiff NOTE: You may need to snag some files from your exact
508       libtiff source distribution and place them into your /usr/include
509       directory before libgeotiff will compile.  Note:  I said use files from
510       the EXACT same distribution of libtiff that you already have installed!
511
512            libtiff/tiffconf.h
513            libtiff/tiffiop.h
514            libtiff/tif_dir.h
515            contrib/dosdjgpp/port.h
516
517       Drop all four files into the /usr/include/ directory, creating no
518       subdirectories at all.  This allows the libgeotiff code to "see"
519       into the libtiff library so that it can use some functions that
520       aren't normally (publicly) available.  Try to make sure that
521       you're not overwriting any files in /usr/include/ by the same name.
522       Some of these files may already be present in /usr/local/.  If so,
523       they should be exact duplicates.  "diff filename1 filename2" will
524       tell you if there are any differences between two files.
525
526       If you'd rather not mess with the /usr/include directory,
527       you can drop the four files into the
528       libgeotiff-1.1.5/libtiff_private/ directory instead.  Libgeotiff
529       will pick up the files there, issue a warning to you that you're
530       using private include files, yet still compile in support for your
531       particular version of libtiff.
532
533       With libgeotiff-1.2.4/libtiff-3.6.0-beta or newer you shouldn't
534       need to copy these files across.  The newer libtiff and libgeotiff
535       can work together using public interfaces.
536     ------------------------
537
538        tar xzvf libgeotiff-1.2.4.tar.gz (or newer)
539        cd libgeotiff-1.2.4
540        ./configure
541        make
542        su (root)
543        make install
544        /sbin/ldconfig (tells the loader about the new libraries)
545        exit (from root)
546       libgeotiff should now be installed in:
547
548            /usr/local/include/
549            /usr/local/lib/
550            /usr/local/share/epsg_csv/
551            /usr/local/bin/
552
553       If you must re-run "configure" for any of these libraries, remember to
554       delete "config.status" and "config.cache" files first.
555
556
557   4. RECOMMENDED:  Install ESRI Shapefile support.  Allows using many sources
558     of online polygon, polyline, and point maps, including ones from NOAA.
559     This is also the format for weather alert maps.  This support is provided
560     by the shapelib package.
561
562     NOTE:  There are TWO ways to install Shapelib, using the version of
563     Shapelib that comes with Xastir (statically linked with Xastir), or using
564     a separate Shapelib shared library (dynamically linked with Xastir).  If
565     you ONLY require Shapelib for Xastir and won't need it for any other
566     program, then you may use the private copy distributed with Xastir,
567     skipping the Shapelib install instructions in this section.  If you have
568     other programs which need Shapelib, then it is recommended that you
569     install Shapelib first as a shared library, per the instructions below.
570     If you skip the instructions in this sections, "./configure" will set the
571     compile up so that the private Shapelib code will be statically
572     linked to the executable.
573
574     It isn't clear from the install instructions in shapelib, but just
575     installing the library is sufficient, and just typing "make" and
576     "make install" doesn't make or install the libraries.  Take these steps:
577
578       make lib
579       su (root)
580       make lib_install
581       /sbin/ldconfig
582       exit (from root)
583
584     and you should have what you need.
585
586     You may also need to tweak "/etc/ld.so.conf" to contain the proper path
587     to the libraries and then run /sbin/ldconfig to update "/etc/ld.so.cache".
588     Once this is done the loader should be able to find the Shapelib library.
589     Must run /sbin/ldconfig as root for the system to be able to re-create its
590     cache file.  See the instructions earlier in this file if you have an
591     /etc/ld.so.conf.d directory instead (section 3A).
592
593     For MacOSX:  Bill Owen, N2RKL, suggested the following for
594     ShapeLib:
595
596       "The shapelib Makefile wouldn't work out of the box, so I
597       figured out what the important bits were and built them by
598       hand:"
599
600       -----------------------------------------------
601         cc -c shpopen.c
602         cc -c shptree.c
603         cc -c dbfopen.c
604         ar cru libshp.a shpopen.o shptree.o dbfopen.o
605         sudo cp libshp.a /sw/lib
606         sudo ranlib /sw/lib/libshp.a
607         sudo mkdir /sw/include/libshp
608         sudo cp shapefil.h /sw/include/libshp/
609       -----------------------------------------------
610
611    Note that you'll have to set up /etc/sudoers file to allow those
612    commands to be run by a normal user before sudo will work for
613    you.  See the README.Git file for sudo instructions.
614
615
616
617    COMPILING OPTIONAL UTILITIES FOR SHAPELIB:
618
619    These utilities are sometimes useful when writing dbfawk rules
620    but aren't necessary for running Xastir.
621
622      cd xastir/src/shapelib
623      make -f Makefile_shapelib_orig
624
625      cd contrib
626      make -f Makefile_orig
627
628     You'll be left with useful executables in the xastir/src/shapelib and
629     xastir/src/shapelib/contrib directories.  It's your choice whether to
630     copy them to a directory in your path (perhaps /usr/local/bin?) to make
631     them easier to use.
632
633
634   5. OPTIONAL:  Install -either- GraphicsMagick or ImageMagick support as
635     shown below.  Xastir will use one or the other but not both.  It'll prefer
636     GraphicsMagick over ImageMagick if both are installed.  Do step 5a -or- 5b
637     below to get this type of image support compiled into Xastir.
638
639     Allows using more than 68 different graphics format files as maps, by
640     creating an associated .geo file for each with tie-points.  This support
641     will allow use of online Tiger and Terraserver maps with Xastir, and NOAA
642     weather radar images.  Other people are working on integrating even more
643     online mapping sources.  This will also allow you to use any GIF/JPG/XPM/
644     BMP/... image as an Xastir map. Installation instructions are included in
645     the package. If you choose to install from a binary install, be sure that
646     you have all the graphic format libraries that it was originally built
647     with.
648
649     The easiest way to install one of these is via a package from your linux
650     distribution's CD or ftp site. If you install from such a package, make
651     sure the header files are installed. These are often in a separate package
652     called GraphicsMagick-devel or ImageMagick-devel or similar.
653
654
655   5a. OPTIONAL:  Install GraphicsMagick support.
656
657     Download the GraphicsMagick sources from:
658
659     http://www.graphicsmagick.org
660
661     Uncompress/un-tar them...
662
663        tar -xzvf Gr*
664
665     Change directory to the newly created GraphicsMagick directory and
666     compile:
667
668        cd Gr*
669        ./configure --with-quantum-depth=16 --enable-shared
670        make
671        su -c 'make install'
672        su -c '/sbin/ldconfig'
673
674     Skip the next step (5b) as you only need ImageMagick support installed if
675     you _don't_ install GraphicsMagick.
676
677
678   5b. OPTIONAL:  Install ImageMagick graphics support.
679
680     Note that Xastir's "./configure" stage may fail trying to compile in
681     ImageMagick support.  If this happens, make sure you have the ImageMagick
682     development package installed if using RPM packages, or have installed
683     the ImageMagick header files.  If it still fails, check the "config.log"
684     file _very_ carefully.  Often ImageMagick tests fail due to some other
685     library that ImageMagick depends upon being absent, such as liblcms,
686     libbz2, or others.  This can also cause AX.25 support to be dropped in our
687     current "configure" script.  We're working on that.
688
689     Until the RPM packagers for ImageMagick include all of the dependent
690     libraries in their RPM dependency list, the best way to assure that
691     ImageMagick is installed properly is to install it from sources.
692
693     -------------------------------------------------------------------------
694     Note: Red Hat 9.0's install of ImageMagick does not work with
695     XASTIR.  It will need to be removed and installed from sources.
696     If w3m text based web browser is installed, you will need to remove
697     it before removing ImageMagick:
698
699        rpm -e w3m
700        rpm -e ImageMagick
701
702     Download the Imagemagick sources from:
703
704	ftp://ftp.imagemagick.org/pub/ImageMagick/
705
706     At the time of writing, this was
707
708	ftp://ftp.imagemagick.org/pub/ImageMagick/ImageMagick-5.5.7-34.tar.gz
709
710     But you may need to get a newer version by the time you read this.
711
712     Uncompress/un-tar them...
713
714        tar -xzvf im*
715
716     Change directory to the newly created ImageMagick directory and
717     compile:
718
719        cd im*
720        ./configure
721        make
722        su -c 'make install'
723        su -c '/sbin/ldconfig'
724
725     These instructions are courtesy of Wes Johnston.
726     -------------------------------------------------------------------------
727
728
729   6. OPTIONAL:  If your system doesn't have wget or libcurl/libcurl-devel
730     installed, and you want to use online maps, install either or both of
731     those packages now. Installation instructions are included in the
732     package.  Some older versions of wget don't work properly with
733     Xastir, so even if you already have wget you may need to upgrade it.
734
735     Please refer to the wget man pages or the web pages at
736     http://www.gnu.org/software/wget/wget.html for info concerning wget.
737
738     Note that if the remote server is down, Xastir can appear to hang
739     for a bit before wget times out.  Xastir calls wget with no retries
740     and a 30-second timeout, but one user reported that wget takes one
741     minute fifteen seconds to time out.  Also note that the users ~/.wgetrc
742     and the system-wide wgetrc file can change the timeouts and retries as
743     well.  See the man pages for details.  Pay particular attention to
744     which file/command-line-options take priority over others.  It looks
745     like the command-line option "--execute command" will allow overriding
746     the .wgetrc files, which means the user can override the hard-coded
747     timeouts/retries in Xastir by specifying new defaults in their ~/.wgetrc
748     file.
749
750     Libcurl should be a drop-in replacement for the wget functionality that
751     we use, and it's a faster and more secure method.
752
753   7. OPTIONAL:  Installing gpsmanshp/GPSMan allows Xastir to fetch GPS
754     waypoints/routes/tracks from a GPS.  Xastir can fetch the data
755     automatically, create a Shapefile map, then index/select/display the
756     new map.
757
758     Make sure you have Shapelib installed first (see above instructions).
759
760     Note that you may have to change the gpsmanshp Makefile to call out
761     "TCLVERSION = 8.4" instead of 8.3, depending upon which version of tcl is
762     installed on your system.  Use your package manager to determine this
763     ("rpm -q -a | grep tcl"), or you may be able to find out in /usr/lib by
764     typing "ls -ld tcl*".
765
766     Install gpsmanshp:
767
768     tar xzvf gpsmanshp_1.2.2.tgz
769     cd gpsmanshp
770     make
771     su -c 'make install'
772
773     Install GPSMan:
774
775     tar xzvf gpsman-6.0.tgz
776     cd gpsman-6.0
777     vi gpsman.tcl
778       Change SRCDIR line to: "set SRCDIR /usr/lib/gpsman"
779     su (root)
780     mkdir /usr/lib/gpsman
781     cp gpsman.tcl /usr/lib/gpsman
782     ln -s /usr/lib/gpsman/gpsman.tcl /usr/X11R6/bin/gpsman
783     cd gmsrc
784     cp * /usr/lib/gpsman
785     cp -R gmicons /usr/lib/gpsman
786     chmod -R 755 /usr/lib/gpsman
787     chmod 644 /usr/lib/gpsman/gmicons
788     chmod 777 /usr/local/share/xastir/maps/GPS   (IMPORTANT!)
789     exit (from root)
790
791     Verify that GPSMan will start up and will download information from a
792     Garmin GPS in Garmin-Garmin mode.  This also creates the configuration
793     files needed to use GPSMan with Garmin GPS's from within Xastir (sets
794     GPS type, serial port, etc within GPSMan's configs).
795
796   8. OPTIONAL: Install Festival for speech support
797      To use speech you must have a sound card and the 'festival' speech
798      synthesis software installed. Install Festival and start it in 'server'
799      mode prior to starting up XASTIR.  The normal command for this is
800      "festival --server &". More info about the speech features is in the
801      Xastir help file. An easy way to get festival installed on some systems
802      is to go to rpmfind.com and search for both festival and festival-dev,
803      then install the RPM's found. Red Hat RPM's installed onto SuSE 7.3 with
804      no problems. Note that the default voice doesn't speak numbers very well.
805      Edit /usr/share/festival/voices.scm and put "ked_diphone" at the first of
806      the "defvar default-voice-priority-list". This will change the default
807      voice to "ked_diphone".
808
809      Note that you can start up the festival server and test it out manually
810      by typing these commands:
811
812        telnet localhost 1314
813        (SayText "Hello")
814
815      To exit, press control-] and then type "quit".
816
817   9. OPTIONAL:  Install Berkely DB Library to enable map caching
818      of internet maps.
819
820      Please note that segfaults (crashes) in Berkeley DB calls can be caused
821      by having multiple versions of the library installed.  The programming
822      interface has changed between the versions.  If you compile Xastir with
823      one version's header files but Xastir links to another version's
824      library, you can easily end up with segfaults when Xastir runs.  SuSE
825      Linux for instance has these available which you _should_ install:
826
827            db
828            db-devel
829
830      Plus SuSE has these additional packages available which you should _not_
831      install.  Remove them if they're on your system (using YaST or rpm):
832
833            db-40
834            db42
835
836      Xastir will normally try to use /usr/include/db.h as the header file,
837      and /usr/lib/libdb.so as the library it will link to (which is usually
838      a symlink to something else, like /usr/lib/libdb-4.1.so).  If the
839      header file and the library file don't match, a segfault often occurs.
840      The easiest way to avoid problems is to keep one and only one version
841      of the Berkeley DB library on your system.
842
843      Here's how to test what version of include file and library file you're
844      using:  Find the db.h file.  It's usually in /usr/include/db.h.
845
846            grep DB_VERSION db.h
847
848      Mine shows this:
849
850        #define DB_VERSION_MAJOR        4
851        #define DB_VERSION_MINOR        1
852        #define DB_VERSION_PATCH        25
853        #define DB_VERSION_STRING       "Sleepycat Software: Berkeley DB 4.1.25: (October  2, 2003)"
854
855      Now do this:
856
857        ldd /usr/local/bin/xastir | grep libdb
858
859      Mine shows this:
860
861        libdb-4.1.so => /usr/lib/libdb-4.1.so (0x40680000)
862
863      In this case, version 4.1 of the include file matches 4.1 of the library
864      file, so it works fine.  A mismatch in the first two numbers can cause
865      segfaults when Xastir tries to do map caching.
866
867      If you install the Berkeley DB library in an unusual place (something
868      other than /usr/lib and /usr/include), you should still be able to tell
869      configure where to find it.  This comes courtesy of Tom Russo:
870
871      > > Someone installed Berkeley DB Library here:
872      > >
873      > >     /user/local/BerkeleyDB.4.3/include/db.h
874      > >
875      > > Perhaps I can assume that the library would be located here:
876      > >
877      > >     /usr/local/BerkeleyDB.4.3/lib/libdb.so
878      > >
879      > > How does one go about specifying the location of the db.h file and
880      > > the libdb.so file so that configure/compile/loading of Xastir work
881      > > properly?
882
883      > --with-bdb-libdir=/usr/local/BerkeleyDB.4.3/lib
884      > and
885      > --with-bdb-incdir=/usr/local/BerkeleyDB4.3/include
886
887   10. OPTIONAL:  Compile db2APRS and install MySQL and Meteo to
888      allow Davis weather station support.
889
890      Install MySQL and Meteo.
891
892        "cd Davis"
893        "./bootstrap.sh"
894        "./configure"
895        "make"
896
897      This should build db2APRS in the "src" directory.  Start up db2APRS.
898      Xastir should be able to connect to the db2APRS server in order to get
899      the Davis weather station data.  See further instructions in the Davis
900      directory.
901
902   11. OPTIONAL: Experimental.  Add GIS database support.
903
904      Note: Database support is experimental and any aspect may change at
905      any time, including database structures.  Scripts to create database
906      tables for MySQL and Postgres/Postgis are in the scripts directory
907      as db_gis_postgis.sql and db_gis_mysql.sql.
908
909      Warning: If you are connected to internet feeds for APRS data, it
910      is possible to accumulate several million station records per day
911      which could amount to around 300 MB of database records per day.
912
913      Postgres + Postgis:
914      Install Postgres.  Include development packages (libpq).
915      Add Postgis spatial object support to Postgres.
916
917      Compile xastir with --with-postgis
918
919      After building xastir:
920      Create a database named xastir and a user with create rights on
921      that database.
922      Edit db_gis_postgis.sql to set username and password for an xastir
923      user with select access to the xastir database.
924      Default values are database=xastir, user=xastir_user
925      You may also need to set permissions in pg_hba.conf.
926      Run the queries in db_gis_postgis.sql.
927      Run xastir and add a SQL Database interface, start with the postgis
928      defaults, add the username and password of the xastir user.
929
930      Other GIS applications (e.g. QGIS, Mapserver, GRASS) can access and
931      display station data directly from the postgresql/postgis database.
932
933      You can configure the database interface to read station from the
934      database on startup and to save stations as they are heard to the
935      database.  This provides persistance of station data between
936      xastir sessions.
937
938      MySQL:
939      Install MySQL.  Include development packages (libmysqlclient).
940
941      Compile xastir with --with-mysql
942
943      After building xastir:
944      Create a database named xastir and a user with create rights on
945      that database.
946      Edit db_gis_mysql.sql to set username and password for an xastir
947      user with select access to the xastir database.
948      Default values are database=xastir, user=xastir_user
949      Run the queries in db_gis_mysql.sql
950         mysql xastir -p < db_gis_mysql.sql
951      Run xastir and add a SQL Database interface, start with the MySQL
952      defaults, add the username and password of the xastir user.
953
954      You can configure the database interface to read station from the
955      database on startup and to save stations as they are heard to the
956      database.  This provides persistance of station data between
957      xastir sessions.
958
959      If you have one or more spatial database interfaces set to activate on
960      startup, and this produces a situation that won't let you start xastir
961      normally [e.g. Station data with unusual characters could concevable
962      cause xastir to segfault when retrieved from the database, and
963      interactions between multiple databases that are both writing are
964      reading station data at the same time from each other could potentally
965      be unstable], you should be able to start xastir by editing the
966      device configuration in ~/.xastir/config/xastir.cnf
967      Look for DEVICEn_TYPE:14 lines (where n is the interface number, between 0
968      and 14, TYPE:14 devices are sql database interfaces), and edit the
969      device to set both query on startup and on startup values to 0.
970      DEVICEn_QUERY_ON_STARTUP:0
971      DEVICEn_ONSTARTUP:0
972      If the cause is problematic data in your database, you may need to
973      run a delete query to eliminate the problematic row(s).
974
975
976   12. Building XASTIR:  Note that you'll need autoconf 2.53 or newer and
977      automake 1.6.3 or newer in order to run the "./bootstrap.sh" script.
978
979        "./bootstrap.sh" (This step needed only for those using Git)
980        "mkdir -p build"
981        "cd build"
982        "../configure"
983        "make" ("gmake" for Solaris or *BSD)
984
985     This builds XASTIR, You should not get any error or warning messages.
986
987     If you get the message from Xastir's configure script saying:
988
989       "**** NO MOTIF HEADERS FOUND **** install Motif development headers or
990         use --with-motif-includes to specify location of Xm/Xm.h"
991
992     even though you've got the Motif libraries and headers installed in the
993     proper places, you might need to add this to the configure line:
994
995        "--x-includes=/usr/X11R6/include"
996
997     If that option does not help, then Motif is installed somewhere other
998     than with the standard X includes.  You must locate the file "Xm.h,"
999     which should be in a subdirectory called "Xm" somewhere.  Once located
1000     (let's say in /usr/include/Motif/Xm/Xm.h), use the configure option:
1001
1002       "--with-motif-includes=/usr/include/Motif"
1003
1004     If you get the message:
1005
1006       "**** MOTIF LIBRARIES NOT FOUND **** Install Motif development
1007        headers/libraries or use --with-motif-libraries to specify path
1008        to libXm.a"
1009
1010     then your Motif libraries are not installed in the same directory as your
1011     other X libraries, and you must find the file libXm.a, libXm.so,
1012     or libXm.sl.  Once found (say in /usr/lib/Motif, for example), tell
1013     configure where to find it with:
1014
1015        "--with-motif-libraries=/usr/lib/Motif"
1016
1017     If you wish to install Xastir in a location other than the default
1018     ("/usr/local/bin" and "/usr/local/share/xastir" directories), you may
1019     add the "--prefix=<path>" flag to configure before compiling.  i.e.
1020
1021     "./configure --prefix=/home/apps/xastir"
1022
1023     Which will cause executables to be installed in "/home/apps/xastir/bin/"
1024     and the rest of Xastir to be installed under the
1025     "/home/apps/xastir/xastir/" directory.
1026
1027     This is useful if you don't have root access on a machine, but still
1028     wish to install and use Xastir from your home directory.  There are
1029     probably many other uses as well.
1030
1031     If you want to disable optional "dbfawk" support (see README.MAPS) then
1032     add "--without-dbfawk" to your "./configure", i.e.
1033
1034     "./configure --without-dbfawk"
1035
1036     Most people will want the capability though.
1037
1038     You'll need the "pcre" package installed in order to compile in
1039     dbfawk support.
1040
1041     To enable spatial indexing of shapefiles you can also add "--with-rtree"
1042     to your configure command line.  Using spatial indices can speed up access
1043     of shapefiles that cover large areas if you're only viewing a smaller
1044     area, but at the cost of some additional RAM to store the spatial
1045     index.  This feature is still in the experimental phase, but some users
1046     have observed a noticeable speed-up in map redraws, especially
1047     with very large shapefiles.  The spatial indexing library used is based
1048     on public domain code obtained from Melinda Green,
1049     http://www.superliminal.com, but this code is included in xastir
1050     so you don't need to download anything to use it.
1051
1052     If you see some errors, they might be because you are missing
1053     GNU msgfmt or GNU gettext/xgettext?  These packages are required
1054     to compile the latest Xastir sources.  Beware of packages with the
1055     same names installed into /usr/openwin/bin, these are probably NOT
1056     the GNU flavor of the executables and will not work for compiling
1057     Xastir.  For SuSE Linux:  Install "development/gettext" using YaST.
1058
1059     If you do see some errors/warnings read the FAQ. If this doesn't help,
1060     or you think you have a different problem, dump the errors/warnings to
1061     a file, and send the file and the following information to the
1062     developers:
1063
1064        System type (cpu), speed, memory,
1065        Linux Distribution,
1066        Linux Version,
1067        X Window manager (KDE, GNOME, FVWM, etc..)
1068
1069
1070     To install, type (as root)
1071        "make install" (or make install-strip to remove debugging information)
1072
1073     If you later install additional libraries and just can't get
1074     ./configure to see them, remove the config.cache file via this
1075     command:  "rm config.cache", and then re-run configure.  Also
1076     see the notes above about /sbin/ldconfig.
1077
1078
1079   13. Kernel AX.25 Interfaces
1080
1081     NOTE:  Xastir is designed by amateur radio operators, for amateur
1082     radio operators.  It is intended to be used only by them.  If there's
1083     a way for unlicensed users to operate the amateur radio equipment
1084     (this usually includes sending messages through it which key up the
1085     transmitter), it is a violation of the rules and your license (and
1086     more) may be at risk.  The same goes for igating:  Be aware of the
1087     rules for your country with respect to gating traffic from the 'net
1088     onto RF.  If there's any question, don't do it.
1089
1090     Please read this entire section before typing anything, as there are
1091     serious security implications for some of this!
1092
1093     Option 1)
1094     If you compiled support for AX.25 in and wish to use Kernel-mode
1095     AX-25 interfaces, you _may_ need to type this as root:
1096
1097       chmod 4555 /usr/local/bin/xastir
1098
1099     This command makes Xastir run as user "root", no matter who actually
1100     started it.  This allows Xastir to talk to the kernel AX.25 networking.
1101     Note however that the above chmod command will prevent you from creating
1102     a core file in case Xastir of a major program fault.  This core file aids
1103     in debugging to trace what went wrong.
1104
1105     GENERAL SECURITY WARNING:
1106     Beware that Xastir has not been audited for security, and makes limited
1107     effort to drop extra privileges. Use this in a multi-user environment
1108     at your own risk!  The developers have worked hard to fix remote buffer
1109     overflows in the code to make Xastir safer to use, but there are _MANY_
1110     potential security risks remaining in the code.  User beware!  We will
1111     attempt to plug known security holes in future releases.
1112
1113     Also be aware that turning on the Interface->Server ports (TCP and UDP)
1114     will allow other users who authenticate properly to send packets.  In
1115     the case of TCP they can only get routed to other TCP ports and to the
1116     internet.  UDP packets may also get routed to your RF ports (as
1117     third-party packets).
1118
1119     LINUX-SPECIFIC SECURITY WARNING:  If you're using Linux AX.25 kernel
1120     networking, you'll need to either make Xastir SUID-root, or use a shim
1121     (which itself is set to SUID-root) between Xastir and the AX.25 ports.
1122     See Option #2 below for the (possibly safer) shim method.  If you're the
1123     paranoid type (and you should be if you're running a system with multiple
1124     users), you may wish to skip SUID-root mode/kernel AX.25 interfaces and
1125     use standard serial port TNC interfaces instead.  Any program is safer if
1126     run as a normal user (not safe, but safer).  It is currently impossible
1127     to use kernel-mode AX.25 interfaces without the program running with
1128     root privileges.
1129
1130     Option 2)
1131     A more security-conscious option is to use a shim program written by
1132     Henk de Groot, PE1DNN.  This program runs in SUID-root mode but is
1133     much smaller and so is easier to audit for security, and provides a
1134     new port that Xastir can connect to.  The new port can be read/written
1135     without having to be the root user.  The program is called aprs_tty
1136     and can be obtained here:
1137
1138     http://we7u.wetnet.net/xastir/aprs_tty.0.0.2.tgz
1139
1140     It actually responds to some TNC commands. The code is straight forward
1141     and works well.  Run the program, telling it what port to use, and then
1142     in XASTIR set up the TNC to point to the new TTY at 19200. It
1143     transmits/receives UI frames, and sets the correct unproto path.  In
1144     this case DO NOT perform the chmod 4555 command on the Xastir executable.
1145
1146     Note again that the same SUID-root warnings that were giving in option
1147     #1 above also apply to aprs_tty.  Buyer beware!  As far as we know,
1148     aprs_tty has not been audited for security, and makes no effort to drop
1149     extra privileges. Use this in a multi-user environment at your own risk!
1150
1151
1152   14. Serially-Connected TNC's
1153
1154     NOTE:  Xastir is designed by amateur radio operators, for amateur
1155     radio operators.  It is intended to be used only by them.  If there's
1156     a way for unlicensed users to operate the amateur radio equipment
1157     (this usually includes sending messages through it which key up the
1158     transmitter), it is a violation of the rules and your license (and
1159     more) may be at risk.  The same goes for igating:  Be aware of the
1160     rules for your country with respect to gating traffic from the 'net
1161     onto RF.  If there's any question, don't do it.
1162
1163     Please read this entire section before typing anything, as there are
1164     serious security implications for some of this!
1165
1166     If you're using a serial TNC, configure your TNC startup files in the
1167     /usr/local/share/xastir/config directory:
1168
1169     tnc-startup.sys is used to set up your TNC for Xastir and tnc-stop.sys
1170     is to change the TNC back to your normal settings. There are several
1171     example TNC startup files in the directory.  Choose the one that best
1172     suits your TNC and edit to taste.  See the note below about where to
1173     edit the files.  You might be unpleasantly surprised if after you type
1174     "make install" next, all your custom changes to the startup files are
1175     lost.  As always, keep a backup.
1176
1177     Some people have had trouble getting Xastir to decode packets.  While
1178     packets were scrolling quite nicely in the View->Incoming Packet Data
1179     dialog, stations weren't showing up on the Xastir screen at all. The
1180     cause was incorrect settings in the tnc-startup files for that specific
1181     TNC. If you change these files in the xastir source directories make sure
1182     to do a "make install" to install them into the
1183     /usr/local/share/xastir/config/ directory. Another option would be to
1184     edit the files in /usr/local/share/xastir/config/ directly. Keep a copy
1185     of them in a safe place in any case.  You don't want to lose your custom
1186     mods you worked so hard to create.
1187
1188     Some systems don't allow normal users to access the serial ports.  It's
1189     a permissions thing, but is actually the _correct_ way to configure the
1190     serial ports.  You can fix this in several ways:
1191
1192     1) Add the Xastir user to the group owning the serial ports.
1193     2) Make Xastir run SGID-uucp (or whatever group owns the port).
1194     3) Change the permissions of the device so that any user can access it.
1195     4) Make Xastir run SUID-root.
1196
1197     Solutions 3 and 4 are highly discouraged.  It can be a security nightmare
1198     to start opening up files or devices to read/write access by all users,
1199     and the same for SUID-root programs.  Don't do either of these.
1200
1201     Exception:  If you're going to be running AX.25 kernel networking, you
1202     may need to be running Xastir SUID-root anyway, or else you need to
1203     install a shim program between the port and Xastir.  In the latter case
1204     the shim is running SUID-root, not Xastir.  See the section above
1205     regarding AX.25 kernel networking.
1206
1207     Here are what the default permissions usually look like for the
1208     two serial ports on a Linux box:
1209
1210     crw-rw----    1 root     uucp       4,  64 Oct 19 08:15 ttyS0
1211     crw-rw----    1 root     uucp       4,  65 Apr 14  2001 ttyS1
1212
1213     (NOTE:  For a Windows/Cygwin installation, a few details are different,
1214     but the ttyS0 and ttyS1 keywords are the same.  Verify that the
1215     permissions of these ports are set appropriately for a normal user to read
1216     and write to these devices.)
1217
1218     Solution #1:  The root user would run the commands necessary to add
1219     the Xastir user to the "uucp" group, which would then give the user
1220     the necessary permissions to use the port.  Usually this involves
1221     editing the /etc/group file, but SysAdmin tools usually exist for
1222     doing this more easily.
1223
1224     Solution #2:  As root user, type these commands:
1225
1226        chgrp uucp /usr/local/bin/xastir
1227        chmod 2555 /usr/local/bin/xastir
1228
1229     If you want to restrict Xastir so that only one user can run it,
1230     (in this case "user1") type:
1231
1232        chown user1 /usr/local/bin/xastir
1233        chmod 2500 /usr/local/bin/xastir
1234        chgrp uucp /usr/local/bin/xastir
1235
1236     Solution #3:
1237     You can change the permissions of the serial port to allow use by all
1238     users, but this is highly discouraged.
1239     Here's what Jack Twilley had to say with regards to "chmod uog+rw" (same
1240     as chmod 555) for serial ports:
1241
1242     > This is not necessary, and opens up the possibility of abuse.  Not all
1243     > Xastir installations are Linux boxes used by a single person with a
1244     > single purpose -- I know of several instances that are multi-user
1245     > machines with access to the Internet by multiple parties, some of whom
1246     > are not licensed amateurs, and another couple of instances where the
1247     > serial port is not always used by a TNC but also by other devices such
1248     > as Palm HotSync cradles and GPS receivers.
1249     >
1250     > Here are two more secure solutions:
1251     >
1252     >  * use non-root users
1253     >    One way to use the setuid facilities in Unix would be to set
1254     >    the xastir binary's user ID to match the user that owns the serial
1255     >    port.  Under Solaris, the default ownership of /dev/cua/a is
1256     >    uucp:tty, with a default permission of 0600.  The command 'chown
1257     >    uucp /usr/local/bin/xastir' followed by the command 'chmod 4555
1258     >    /usr/local/bin/xastir' will allow xastir to run properly without
1259     >    changing the serial port's permissions or ownership, thus
1260     >    minimizing any impact on other applications that use the serial
1261     >    port.
1262
1263Note from Curt:  This chmod command will prevent creation of "core"
1264file that are useful for debugging in case Xastir crashes.
1265
1266     >
1267     >  * use groups
1268     >    A better way to use the setuid facilities in Unix is to set the
1269     >    xastir binary's *group* ID to match a group that already has the
1270     >    privilege to mess with the serial port.  Under FreeBSD, the default
1271     >    ownership of /dev/cuaa0 is uucp:dialer, with a default permission
1272     >    of 0660.  The command 'chgrp dialer /usr/local/bin/xastir' followed
1273     >    by the command 'chmod 2555 /usr/local/bin/xastir' will change
1274     >    Xastir's group to the serial port's group, and then add the setgid
1275     >    privilege to the binary.  Now when xastir starts up, it will have
1276     >    the minimum privilege necessary to do what it needs to do, without
1277     >    being yet another root exploit-in-waiting.
1278
1279
1280   15. Serially-Connected Garmin RINO Radio/GPS
1281
1282     If you have a Garmin RINO attached to a serial port, have GPSMan
1283     installed, and have support for GPSMan compiled into Xastir, then Xastir
1284     has the capability to periodically download waypoints from the RINO unit
1285     and create APRS(tm) Objects out of them.  Any RINO waypoints that begin with
1286     "APRS" will be automatically created, placed on the map, and transmitted
1287     as your own Xastir APRS(tm) objects.  If you wish to see them but not transmit
1288     them, turn off Object/Item transmit or global transmit in the interface
1289     menu.  Another option is to turn off the transmit enable per interface.
1290
1291     Please note that Xastir cannot cause the attached RINO to poll the other
1292     RINO units on the air.  Xastir can only download the waypoints that the
1293     attached RINO has collected from the other RINO units that it is passively
1294     monitoring.
1295
1296     Here's a blurb from Wes Johnston about the RINO's:
1297
1298     "Lets say I have three RINO radios... two in the hands of the SAR teams on
1299     the ground, and a third radio in a plane circling above.  It is preferred
1300     that the radio in the hands of the SAR teams be the nicer rino120 since it
1301     does mapping.  The radio in the plane can be the lowly rino110 since it
1302     does not do mapping but you will have a copy of xastir with maps on the
1303     laptop with you anyway.
1304
1305     If I set two of my rino radios to APRSSAR1 and APRSSAR2, and connect a
1306     third rino radio to xastir with serial in the plane, xastir will query
1307     rino radio #3 at any one minute interval between 0 and 30 minutes, get the
1308     APRS* waypoints, lop off the first four characters and publish the shorter
1309     named waypoints as SAR1 and SAR2 as APRS(tm) objects on to your TNC.  The
1310     hitch to this is that the rino radio cannot automatically poll the RINO
1311     users' locations on the ground.  You have to manually (on the radio)
1312     select a menu item called POLL and poll the users that way.  The reason
1313     the first four characters of the rino callsign have to be "APRS" is that
1314     when you send a query, rino only asks about the first 4 chars... so any
1315     station with the first four that match will answer... ie all of them in
1316     your group.  The other method is to simply fly the plane overhead and
1317     listen (eavesdrop) on the channel and passively pickup the locations of the
1318     groups as they converse with one another.  The rino will send it's
1319     location just as you un-key the PTT if it has been >30 sec since the last
1320     time you sent your position.  It would be practical to simply ask each
1321     team for an update... they just need to squeeze their PTT for a moment
1322     (ie kerchunk) to send a position."
1323
1324
1325   16. Start up XASTIR and read the help files to configure it. If you have
1326     problems, please consult the FAQ file.
1327
1328     You can now start XASTIR. On most systems that the path is set up in
1329     FHS format just type "xastir". On other systems type
1330     "/usr/local/bin/xastir" to start the program.
1331
1332     If you see errors at this point that say something like "Can't load
1333     xxx library" this means you forgot to either update /etc/ld.so.conf (or
1334     /etc/ld.so.conf.d directory on some systems) and run /sbin/ldconfig, or
1335     add the LD_LIBRARY_PATH variable for your shell, and the "ld" loader
1336     can't link the libraries with the Xastir executable to get it running in
1337     memory.  Note that if you're running Xastir as SUID root, the
1338     LD_LIBRARY_PATH variable is ignored.
1339
1340     To set a new language or change the language current choice, use
1341     this command line:
1342
1343     xastir -l <language>
1344
1345     Current choices are:
1346
1347            Dutch English French German Italian Portuguese Spanish
1348            ElmerFudd MuppetsChef OldeEnglish PigLatin PirateEnglish
1349
1350     This option will be stored in the users config file for the next time
1351     Xastir is run. On new installs Xastir will default to English unless
1352     you use this command line option.
1353
1354
1355   CONNECTING TO AN INTERNET SERVER:
1356
1357   Here are some lists of Internet servers:
1358
1359        http://members.aol.com/wa8lmf3/miscinfo/APRServe.txt
1360        http://www.wa6oft.com/APRServe.txt
1361        http://www.aprs-is.net/aprsservers.htm
1362        http://www.aprs-is.net/APRSServers.htm
1363
1364
1365   Filter port syntax (for those ports that allow user-selectable
1366   filtering):
1367
1368        http://www.aprs-is.net/javaprssrvr/javaprsfilter.htm
1369
1370
1371   The procedure to connect to one of them is this:
1372
1373    *) Select Interface->Properties.
1374    *) Click Add.
1375    *) Select Internet Server, click Add.
1376    *) Fill in the "Host" and "Port" boxes.
1377    *) Enter the Pass-code found by running "callpass" with your callsign
1378       in an xterm window.
1379    *) Set the togglebuttons and filter parameters per your preferences.  The
1380       "filter" keyword is added by Xastir, so you don't need to add that word
1381       to the box.  If the box has anything in it, "filter" is prepended to the
1382       text when Xastir sends the string to the server
1383    *) Optionally put in a comment.  That shows up in the Interface and
1384       Properties dialogs to remind you of the details for that connection.
1385    *) Click OK.
1386
1387   A short list of the first-tier servers (you may want to connect to the
1388   second-tier servers or regional/local servers instead):
1389
1390     first.aprs.net ports 10151 (history) or 10152 (no history)
1391     second.aprs.net ports 10151 (history) or 10152 (no history)
1392     third.aprs.net ports 10151 (history) or 10152 (no history)
1393     fourth.aprs.net ports 10151 (history) or 10152 (no history)
1394
1395
1396   FESTIVAL NOTE:  From: J. Lance Cotton:
1397   One thing that I found that I had to do to finally get festival to work was
1398   to get rid of the 'only localhost can connect to the server' pref in the
1399   festival configuration. I don't know if that's the default on a source
1400   install (I installed festival from RPM's), but it might be.
1401
1402   I don't know why it doesn't let localhost connect, even though it's the
1403   only one specifically allowed.
1404
1405   Here's what to do:  Open the 'festival.scm' file (I found mine in
1406   /usr/share/festival/' and look for the line that starts like:
1407
1408       (defvar server_access_list ...
1409
1410   Make it look like:
1411
1412       (defvar server_access_list nil
1413
1414   Then restart the festival server.
1415   -Lance KJ5O
1416
1417   Additional note from Alan Crosswell:  If you run the festival_server
1418   script instead of festival -server, then the permissions for localhost
1419   get set up for you.
1420
1421
1422You probably want to download some maps and additional data files. The
1423instructions for this are in the README.MAPS.
1424
1425-----------------------------------------------------------------------
1426
1427NOTES FOR DEVELOPERS:
1428---------------------
1429
1430Profiling:
1431----------
14321) "./configure --with-profiling"
1433
1434This will add "-pg" to the CFLAGS section of the Makefiles, which
1435turns on the collection of profiling data while the executable is
1436running (on Linux anyway).
1437
14382) "make clean"
1439
14403) "make install" (Don't do "make install-strip" here, as that will
1441strip off the symbol table information that gprof requires)
1442
14434) "xastir &"
1444
14455) Let Xastir run for some period of time.
1446
14476) Close Xastir
1448
14497) "gprof /usr/local/bin/xastir | tee profile.txt"
1450
1451Gprof will use the Xastir binary and the gmon.out file created from
1452running Xastir to give you the profile listing.
1453
1454Add the "-l" flag to the gprof line to give you a line-by-line
1455profile listing, but be prepared for a long run-time and a lot of
1456CPU to be used by gprof to generate it:
1457
1458    "gprof -l /usr/local/bin/xastir | tee profile.txt"
1459
1460Also see this link, which talks about how to profile multi-threaded
1461applications:
1462
1463    http://sam.zoy.org/writings/programming/gprof.html
1464
1465With the method described, you compile/install their library code,
1466then invoke Xastir like this:
1467
1468    LD_PRELOAD=xastir/src/gprof-helper.so xastir &
1469
1470
1471    mv gmon.out gmon.old; gprof /usr/local/bin/xastir gmon.old \
1472    | tee profile.txt; gprof -l /usr/local/bin/xastir gmon.old \
1473    | tee profile2.txt
1474
1475
1476Checking for Memory Leaks:
1477--------------------------
1478
1479A simple method for just checking malloc's/free's is to set
1480MALLOC_CHECK to a 1 or a 2, at least on Linux.  See the malloc man
1481page for more info.
1482
1483For more thorough checks, use libgc:
1484
14851) Install libgc, the conservative garbage collector for C and C++.
1486
1487SuSE packages needed are "libgc1" and "gc-devel". If you must compile
1488from sources instead, find libgc at:
1489
1490    http://www.hpl.hp.com/personal/Hans_Boehm/gc
1491
1492Configure/install libgc like this:
1493
1494    ./configure --enable-threads=posix
1495
1496Make sure that "-DGC_LINUX_THREADS" and "-D_REENTRANT" are defined
1497in the Makefile if you're compiling it on Linux.
1498
1499Optional:  Change Makefile to add "-DSAVE_CALL_CHAIN" on the DEFS
1500line.  This will provide more of a stack trace each time a leak is
1501found.  This is sometimes useful but much more verbose.
1502
1503    make
1504    make check
1505    su
1506    make install
1507    exit (from root)
1508
15092) Now, back in the xastir directory:
1510
1511    ./configure --with-libgc
1512
1513Make sure that "-fomit_frame_pointer" is _NOT_ in the Makefiles.
1514This will mess up the optional stack trace if present.
1515
1516    make clean
1517    make install
1518    xastir &
1519
1520Let Xastir run for some period of time.
1521
1522Libgc will dump messages to the xterm as memory leaks are found.
1523Any Xastir memory leaks should have a filename and a line number
1524listed.  Memory leaks from lower-level libraries will be missing the
1525detailed information, so they are easy to spot (and mostly useless
1526for the purpose of finding and patching memory leaks).
1527
1528Note also that libgc will take Xastir's memory usage up quite a bit,
1529so don't be surprised if Xastir uses two or three times the normal
1530amount of memory while you're debugging memory leaks with libgc.
1531
1532
1533
1534  ------------------------------------------------------------------------
1535APRS(tm) is a Trademark of Bob Bruninga
1536
1537Copyright (C) 1999 Frank Giannandrea
1538Copyright (C) 2000-2019 The Xastir Group
1539
1540