From XastirWiki
Jump to: navigation, search

Debian Squeeze is very old! It is best to upgrade to the latest stable version!

If you already installed the binary version

Fyi, the description below originally appeared in one of the Ubuntu HowTo documents. Although I expect it does apply to Debian given I have seen a Xastir binary in the Debian repositories, I have not tried installing the binary version in Debian Squeeze and then removing it using this procedure.

If you installed a binary version of xastir using the "apt-get install xastir" option (or via Synaptic), you'll have a somewhat outdated version, and it will have installed into /usr instead of /usr/local. The source install described on this page will install into /usr/local, so you'll want to remove your binary install first before following these directions.

If you did a lot of map configuration with the binary install, all of your maps will be in /usr/share/xastir/maps. You'll need to copy those to a safe place before removing the binary install:

    mkdir /tmp/maps
    cp -r /usr/share/xastir/maps/* /tmp/maps

Then remove the binary package:

    su (enter your root password if prompted)
    apt-get remove xastir

You can then follow the instructions below to re-install xastir to /usr/local from sources. Once you're done, copy your maps back to the new installation directory:

    cp -r /tmp/maps/* /usr/local/share/xastir/maps

Then you need to edit your ~/.xastir/config/xastir.cnf file to change all occurances of "/usr/share" to "/usr/local/share"

You'll be back in business with a more easily updated xastir.

Preparing the system

I didn't have to do anything to the repository settings after installing Debian Squeeze.

First, make sure you have a working Debian Squeeze installation. Also check that you can access the Internet. If your installation is very important to you, it is advisable to make a complete backup of your system, just in case something goes wrong.

I recommend updating your installed packages to the latest versions first. This can be done using APT:

    su (enter your root password when prompted)
    apt-get update

Optionally you can upgrade installed packages with the following command

    apt-get upgrade

If there was a kernel upgrade or something you may want to reboot your system before proceeding.

Start installing packages

  • Get the basic set of build tools:

Note: if you are already in root mode after the previous step, there is no need to enter "su" again.

    su (enter your root password if prompted)
    apt-get install build-essential
  • Get the libraries essential for building xastir:
    apt-get install git autoconf automake lesstif2-dev imagemagick gv libxp-dev libxpm-dev libcurl4-openssl-dev

Note: On my system imagemagick was already installed by default, but the package is included above in case this is not true for all Debian Squeeze installations.

These packages are required for the most basic minimum build of xastir. gv is not strictly required, but if you don't install it you will be unable to print. Note that this imagemagick package is not the one that gives you on-line map support, it's the one that provides the "convert" utility needed to create the postscript that gv will use to print. This package and gv are both required to be able to print from xastir even with minimal map support.

  • Get additional libraries that will help for extra features:
    apt-get install gpsman gpsmanshp libpcre3-dev proj libproj-dev libdb4.8-dev python-dev libax25-dev shapelib libshp-dev
    apt-get install festival festival-dev libmagickcore-dev libgeotiff-dev

Note: Be sure to type exit as shown above in order to exit out of superuser mode.

Get XASTIR source code Github

In this method, you get your source code directly from the repository the developers use to work on the software. Here's the step-by-step method for getting it this way.

  • Get the source code.

You can make different choices here for where you want to store your code. I'm putting it in a src directory under my home directory:

    mkdir ~/src
    cd ~/src
    git clone

The command above could take a while to finish if you're on a slow link, as there are a lot of files to download.

  • Run bootstrap to generate and configure:
    cd Xastir

One More Rarely Used Package

GDAL is an extremely optional paackage. If you don't want/need GDAL, skip the GDAL installation below. 99% of Users won't need it.

Install GDAL

  • Download the GDAL source

As of this writing, the latest GDAL source can be downloaded like this:

    cd ~/src
  • Unpack GDAL
    tar zxvf gdal-2.1.1.tar.gz
    cd gdal-2.1.1
  • Build and install GDAL:
    make install

The GDAL 'make' step typically takes a long time to complete

Install Xastir

You've now got all the libraries in place and can build the fully enabled code.

  • Configure the code:
    cd ~/src/Xastir
    ./configure CPPFLAGS="-I/usr/include/geotiff"

You should be rewarded with a list of features that all say "yes" after them. If you followed all the steps above, that should look like this:

xastir 2.x.x has been configured to use the following
options and external libraries:

  ShapeLib (Vector maps) ................. : yes

  GraphicsMagick/ImageMagick (Raster maps) : yes (ImageMagick)
  pcre (Shapefile customization) ......... : yes
  dbfawk (Shapefile customization) ....... : yes
  rtree indexing (Shapefile speedups) .... : yes
  map caching (Raster map speedups) ...... : yes
  internet map retrieval ................. : yes (libcurl)

  AX25 (Linux Kernel I/O Drivers) ........ : yes
  libproj (USGS Topos & Aerial Photos) ... : yes
  GeoTiff (USGS Topos & Aerial Photos) ... : yes
  Festival (Text-to-speech) .............. : yes
  GDAL/OGR (Obtuse map formats) .......... : yes
  GPSMan/gpsmanshp (GPS downloads) ....... : yes

  • Build the code:
    make install
  • Enjoy! You now have a fully functional xastir with all features enabled. You can launch it like this:

The first time Xastir is run it'll pop up a dialog box asking you to set some station parameters.

Additional points

Updating Xastir

The developers are always adding new features to Xastir and fixing bugs. You'll likely want to update your Xastir semi-regularly. Fortunately for you, you don't have to repeat all of the above steps each time. Updating is actually very simple:

Periodically, you can update the code by going into the repo directory and executing:

 git pull

then compiling normally per the "Compiling and Installing Xastir" instructions shown above. Note to developers only: "git pull" is risky for you if you are modifying code.

-OR- you can type:


which will do EVERYTHING for you from the "git pull" to the "chmod" command. This will be adequate if you don't need support for GeoTiff maps, which require the CPPFLAGS="-I/usr/include/geotiff" statement when you run the configure script.


You have to start the festival server by hand in a shell window before starting xastir.

    festival --server &

Clicking File->Configure->Speech in xastir, I could get it to talk just by clicking the "Test" button in the dialog.