2 Maps Directory
Tom Russo edited this page 2026-01-03 13:25:42 -07:00

The Xastir Maps directory

When you install Xastir, a directory called "maps" is created under the install prefix. This is typically "/usr/local/share/xastir/maps" if you built Xastir from source, and "/usr/share/xastir/maps" if you installed Xastir from a Linux package.

This directory is populated initially with some default maps and a few Online map options. You may add your own maps to this directory, which is system-wide and available to all users of Xastir on the system.

The directory is free-form

Xastir will look for maps in this directory and any subdirectories of it for maps to display. You can organize them anyway you like.

One recommended way to organize might be to have a directory hierarchy that looks something like this:

           World/
           Canada/
           Canada/Province/
           USA/
           USA/State/WA/
           USA/State/WA/County/
           ...
           Online/
           Overlay/
           ...

But this is entirely up to you.

The directory must be readable by all users

Since this central directory is in a system directory and usually owned by the "root" user, you must make sure it and all files under it are readable by everyone.

Set map FILES to permissions 644 ("rw-r--r--"), map DIRECTORIES to 755 ("rwxr-xr-x") using the "chmod" command. These permissions will allow anyone on the box to read the map files, and access the map directories. Type these commands exactly as shown in order to set the map directory's permissions properly. Do this as the root user:

cd /usr/local/share/xastir/maps
sudo find . -type d -exec chmod 755 {} \;
sudo find . -type f -exec chmod 644 {} \;

You can repeat these commands at anytime, to fix up errant map permissions that are created by downloading/installing new maps.

Watch out when switching from a package to your own source-built Xastir

Xastir stores a lot of its own per-user configuration in under your home directory, in the directory ".xastir." If you install and use Xastir from a system package manager, that per-user configuration will contain references to the /usr/share/xastir files.

If you then discard the version of Xastir from the package and reinstall from source, the new version of Xastir will be looking for files in /usr/local/share/xastir, but your per-user configuration files will reference /usr/share/xastir. This can lead to confusion.

If you choose to start with a packaged version and then go to the source-built version (usually because the git repo is updated far more often than the packages are), you must be aware of this configuration issue and edit the configuration files in $HOME/.xastir/config to fix the path names.